<commit_before>/*
 * Data service
 */

app.factory('data', function($rootScope, $http, $q) {

	// local testing urls
	var printchompUrl = 'https://sandbox.printchomp.com';
	var apiUrl = 'http://localhost:8080';
	var devDomain = 'dev.bizcardmaker.com';
	var liveDomain = 'www.bizcardmaker.com';
	
	// staging
	if(document.domain === devDomain) {
		apiUrl = 'http://devapi.bizcardmaker.com';
	}
	
	// live
	//if(document.domain === liveDomain) {
		apiUrl = 'http://api.bizcardmaker.com';
		printchompUrl = 'https://printchomp.com';
	//}

	// local model
	var model = {
		offers: []
	};

	// regions
	model.regions = {
		'United States': [
			{"name":"Alabama","id":"AL"},
			{"name":"Alaska","id":"AK"},
			{"name":"Arizona","id":"AZ"},
			{"name":"Arkansas","id":"AR"},
			{"name":"California","id":"CA"},
			{"name":"Colorado","id":"CO"},
			{"name":"Connecticut","id":"CT"},
			{"name":"Delaware","id":"DE"},
			{"name":"District of Columbia","id":"DC"},
			{"name":"Florida","id":"FL"},
			{"name":"Georgia","id":"GA"},
			{"name":"Hawaii","id":"HI"},
			{"name":"Idaho","id":"ID"},
			{"name":"Illinois","id":"IL"},
			{"name":"Indiana","id":"IN"},
			{"name":"Iowa","id":"IA"},
			{"name":"Kansa","id":"KS"},
			{"name":"Kentucky","id":"KY"},
			{"name":"Lousiana","id":"LA"},
			{"name":"Maine","id":"ME"},
			{"name":"Maryland","id":"MD"},
			{"name":"Massachusetts","id":"MA"},
			{"name":"Michigan","id":"MI"},
			{"name":"Minnesota","id":"MN"},
			{"name":"Mississippi","id":"MS"},
			{"name":"Missouri","id":"MO"},
			{"name":"Montana","id":"MT"},
			{"name":"Nebraska","id":"NE"},
			{"name":"Nevada","id":"NV"},
			{"name":"New Hampshire","id":"NH"},
			{"name":"New Jersey","id":"NJ"},
			{"name":"New Mexico","id":"NM"},
			{"name":"New York","id":"NY"},
			{"name":"North Carolina","id":"NC"},
			{"name":"North Dakota","id":"ND"},
			{"name":"Ohio","id":"OH"},
			{"name":"Oklahoma","id":"OK"},
			{"name":"Oregon","id":"OR"},
			{"name":"Pennsylvania","id":"PA"},
			{"name":"Rhode Island","id":"RI"},
			{"name":"South Carolina","id":"SC"},
			{"name":"South Dakota","id":"SD"},
			{"name":"Tennessee","id":"TN"},
			{"name":"Texas","id":"TX"},
			{"name":"Utah","id":"UT"},
			{"name":"Vermont","id":"VT"},
			{"name":"Virginia","id":"VA"},
			{"name":"Washington","id":"WA"},
			{"name":"West Virginia","id":"WV"},
			{"name":"Wisconsin","id":"WI"},
			{"name":"Wyoming","id":"WY"}
		],
		'Canada': [
			{"name":"Alberta", "id":"AB"},
			{"name":"British Columbia","id":"BC"},
			{"name":"Manitoba","id":"MB"},
			{"name":"New Brunswick","id":"NB"},
			{"name":"Newfoundland","id":"NL"},
			{"name":"Northwest Territories","id":"NT"},
			{"name":"Nova Scotia","id":"NS"},
			{"name":"Nunavut","id":"NU"},
			{"name":"Ontario","id":"ON"},
			{"name":"<NAME>","id":"PE"},
			{"name":"Quebec","id":"QC"},
			{"name":"Saskatchewan","id":"SK"},
			{"name":"Yukon Territory","id":"YT"}
		]
	};

	// get list of offers
	var GetOffers = function(params) {
		var deferred = $q.defer();

		$http.get(apiUrl + '/api/v1/offers')
		.success(function(response) {
			
			deferred.resolve(response);
			
		}).error(function(err) {
			
			deferred.reject(err);
			
		});

		return deferred.promise;
	};

	var SendOrder = function(params) {
		var deferred = $q.defer();

		$http.post(apiUrl + '/api/v1/orders', params)
		.success(function(response) {
			deferred.resolve(response);
		}).error(function(err) {
			deferred.reject(err);
		});

		return deferred.promise;
	};

	return {
		printchompUrl: printchompUrl,
		model: model,
		GetOffers: GetOffers,
		SendOrder: SendOrder
	}
});
<commit_msg>change api url to use ssl<commit_after>/*
 * Data service
 */

app.factory('data', function($rootScope, $http, $q) {

	// local testing urls
	var printchompUrl = 'https://sandbox.printchomp.com';
	var apiUrl = 'http://localhost:8080';
	var devDomain = 'dev.bizcardmaker.com';
	var liveDomain = 'www.bizcardmaker.com';
	
	// staging
	if(document.domain === devDomain) {
		apiUrl = 'http://devapi.bizcardmaker.com';
	}
	
	// live
	//if(document.domain === liveDomain) {
		apiUrl = 'https://live-bizcardmaker.rhcloud.com';
		printchompUrl = 'https://printchomp.com';
	//}

	// local model
	var model = {
		offers: []
	};

	// regions
	model.regions = {
		'United States': [
			{"name":"Alabama","id":"AL"},
			{"name":"Alaska","id":"AK"},
			{"name":"Arizona","id":"AZ"},
			{"name":"Arkansas","id":"AR"},
			{"name":"California","id":"CA"},
			{"name":"Colorado","id":"CO"},
			{"name":"Connecticut","id":"CT"},
			{"name":"Delaware","id":"DE"},
			{"name":"District of Columbia","id":"DC"},
			{"name":"Florida","id":"FL"},
			{"name":"Georgia","id":"GA"},
			{"name":"Hawaii","id":"HI"},
			{"name":"Idaho","id":"ID"},
			{"name":"Illinois","id":"IL"},
			{"name":"Indiana","id":"IN"},
			{"name":"Iowa","id":"IA"},
			{"name":"Kansa","id":"KS"},
			{"name":"Kentucky","id":"KY"},
			{"name":"Lousiana","id":"LA"},
			{"name":"Maine","id":"ME"},
			{"name":"Maryland","id":"MD"},
			{"name":"Massachusetts","id":"MA"},
			{"name":"Michigan","id":"MI"},
			{"name":"Minnesota","id":"MN"},
			{"name":"Mississippi","id":"MS"},
			{"name":"Missouri","id":"MO"},
			{"name":"Montana","id":"MT"},
			{"name":"Nebraska","id":"NE"},
			{"name":"Nevada","id":"NV"},
			{"name":"New Hampshire","id":"NH"},
			{"name":"New Jersey","id":"NJ"},
			{"name":"New Mexico","id":"NM"},
			{"name":"New York","id":"NY"},
			{"name":"North Carolina","id":"NC"},
			{"name":"North Dakota","id":"ND"},
			{"name":"Ohio","id":"OH"},
			{"name":"Oklahoma","id":"OK"},
			{"name":"Oregon","id":"OR"},
			{"name":"Pennsylvania","id":"PA"},
			{"name":"Rhode Island","id":"RI"},
			{"name":"South Carolina","id":"SC"},
			{"name":"South Dakota","id":"SD"},
			{"name":"Tennessee","id":"TN"},
			{"name":"Texas","id":"TX"},
			{"name":"Utah","id":"UT"},
			{"name":"Vermont","id":"VT"},
			{"name":"Virginia","id":"VA"},
			{"name":"Washington","id":"WA"},
			{"name":"West Virginia","id":"WV"},
			{"name":"Wisconsin","id":"WI"},
			{"name":"Wyoming","id":"WY"}
		],
		'Canada': [
			{"name":"Alberta", "id":"AB"},
			{"name":"British Columbia","id":"BC"},
			{"name":"Manitoba","id":"MB"},
			{"name":"New Brunswick","id":"NB"},
			{"name":"Newfoundland","id":"NL"},
			{"name":"Northwest Territories","id":"NT"},
			{"name":"Nova Scotia","id":"NS"},
			{"name":"Nunavut","id":"NU"},
			{"name":"Ontario","id":"ON"},
			{"name":"Prince Edward Island","id":"PE"},
			{"name":"Quebec","id":"QC"},
			{"name":"Saskatchewan","id":"SK"},
			{"name":"Yukon Territory","id":"YT"}
		]
	};

	// get list of offers
	var GetOffers = function(params) {
		var deferred = $q.defer();

		$http.get(apiUrl + '/api/v1/offers')
		.success(function(response) {
			
			deferred.resolve(response);
			
		}).error(function(err) {
			
			deferred.reject(err);
			
		});

		return deferred.promise;
	};

	var SendOrder = function(params) {
		var deferred = $q.defer();

		$http.post(apiUrl + '/api/v1/orders', params)
		.success(function(response) {
			deferred.resolve(response);
		}).error(function(err) {
			deferred.reject(err);
		});

		return deferred.promise;
	};

	return {
		printchompUrl: printchompUrl,
		model: model,
		GetOffers: GetOffers,
		SendOrder: SendOrder
	}
});

{'fraction_non_alphanumeric': 0.313381255183854, 'fraction_numerical': 0.0016588332872546309, 'mean_word_length': 5.064543168482817, 'pattern_counts': {'":': 256, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2733346', 'n_tokens_mistral': 3053, 'n_tokens_neox': 2567, 'n_words': 343}