<commit_before>/*! Angular API Mock v0.1.7
 * Licensed with MIT
 * Made with ♥ from Seriema + Redhorn */
angular.module("apiMock",[]).config(["$httpProvider",function(a){a.interceptors.push("httpInterceptor")}]).provider("apiMock",function(){function a(a){var b,c=/apimock/i;return angular.forEach(a,function(a,d){c.test(d)&&(b=a)}),b}function b(b){return a(b)}function c(a){var c=b(a);return void 0===c&&(c=e()),c}function d(a){switch(typeof a){case"number":if(0!==a&&!isNaN(a))return{type:"respond",value:a};break;case"string":switch(a.toLowerCase()){case"auto":return{type:"recover"};case"true":return{type:"reroute"}}break;case"boolean":if(a===!0)return{type:"reroute"}}return{type:"ignore"}}function e(){return a(l.search())}function f(a){var b={status:a,headers:{"Content-Type":"text/html; charset=utf-8",Server:"Angular ApiMock"}};return m.info("apiMock: mocking HTTP status to "+a),n.reject(b)}function g(a){return 0===a.indexOf(o.apiPath)}function h(a){g(a.url)&&p.push(a)}function i(a){var b=!1;return angular.forEach(p,function(c,d){c.method===a.method&&c.url===a.url&&(b=!0,p.splice(d,1))}),b}function j(a){if(!g(a.url))return a;var b=a.url,c=a.url.substring(o.apiPath.length);c=o.mockDataPath+c;var d=/[a-zA-z0-9/.\-]*/;return c=d.exec(c)[0],"/"===c[c.length-1]&&(c=c.slice(0,-1)),c+="."+a.method.toLowerCase()+".json",a.url=c,m.info("apiMock: rerouting "+b+" to "+c),a}function k(a,b,c){l=a,m=b,n=c}var l,m,n,o={mockDataPath:"/mock_data",apiPath:"/api",disable:!1},p=[],q=k.prototype;q._countFallbacks=function(){return p.length},q.onRequest=function(a){if(o.disable)return a;var b=c(a),e=d(b);switch(e.type){case"reroute":return j(a);case"recover":return h(a),a;case"respond":return f(e.value);case"ignore":return a;default:return a}},q.onResponse=function(a){return o.disable?a:(i(a),a)},q.recover=function(a){return o.disable?!1:void 0===a.config?!1:i(a.config)?(m.info("apiMock: recovering from failure at "+a.config.url),j(a.config)):!1},this.config=function(a){angular.extend(o,a)},this.$get=["$location","$log","$q",function(a,b,c){return new k(a,b,c)}]}).service("httpInterceptor",["$injector","$q","apiMock",function(a,b,c){this.request=function(a){return a=c.onRequest(a),a||b.when(a)},this.response=function(a){return a=c.onResponse(a),a||b.when(a)},this.responseError=function(d){var e=c.recover(d);if(e){var f=a.get("$http");return f(e)}return b.reject(d)}}]);<commit_msg>dist min package updated after changing on reroute command<commit_after>/*! Angular API Mock v0.1.7
 * Licensed with MIT
 * Made with ♥ from Seriema + Redhorn */
angular.module("apiMock",[]).config(["$httpProvider",function(a){a.interceptors.push("httpInterceptor")}]).provider("apiMock",function(){function a(a){var b,c=/apimock/i;return angular.forEach(a,function(a,d){c.test(d)&&(b=a)}),b}function b(b){return a(b)}function c(a){var c=b(a);return void 0===c&&(c=e()),c}function d(a){switch(typeof a){case"number":if(0!==a&&!isNaN(a))return{type:"respond",value:a};break;case"string":switch(a.toLowerCase()){case"auto":return{type:"recover"};case"true":return{type:"reroute"}}break;case"boolean":if(a===!0)return{type:"reroute"}}return{type:"ignore"}}function e(){return a(l.search())}function f(a){var b={status:a,headers:{"Content-Type":"text/html; charset=utf-8",Server:"Angular ApiMock"}};return m.info("apiMock: mocking HTTP status to "+a),n.reject(b)}function g(a){return 0===a.indexOf(o.apiPath)}function h(a){g(a.url)&&p.push(a)}function i(a){var b=!1;return angular.forEach(p,function(c,d){c.method===a.method&&c.url===a.url&&(b=!0,p.splice(d,1))}),b}function j(a){if(!g(a.url))return a;var b=a.url,c=a.url.substring(o.apiPath.length);c=o.mockDataPath+c;var d=/[a-zA-z0-9/.\-]*/;return c=d.exec(c)[0],"/"===c[c.length-1]&&(c=c.slice(0,-1)),c+="."+a.method.toLowerCase()+".json",a.method="GET",a.url=c,m.info("apiMock: rerouting "+b+" to "+c),a}function k(a,b,c){l=a,m=b,n=c}var l,m,n,o={mockDataPath:"/mock_data",apiPath:"/api",disable:!1},p=[],q=k.prototype;q._countFallbacks=function(){return p.length},q.onRequest=function(a){if(o.disable)return a;var b=c(a),e=d(b);switch(e.type){case"reroute":return j(a);case"recover":return h(a),a;case"respond":return f(e.value);case"ignore":return a;default:return a}},q.onResponse=function(a){return o.disable?a:(i(a),a)},q.recover=function(a){return o.disable?!1:void 0===a.config?!1:i(a.config)?(m.info("apiMock: recovering from failure at "+a.config.url),j(a.config)):!1},this.config=function(a){angular.extend(o,a)},this.$get=["$location","$log","$q",function(a,b,c){return new k(a,b,c)}]}).service("httpInterceptor",["$injector","$q","apiMock",function(a,b,c){this.request=function(a){return a=c.onRequest(a),a||b.when(a)},this.response=function(a){return a=c.onResponse(a),a||b.when(a)},this.responseError=function(d){var e=c.recover(d);if(e){var f=a.get("$http");return f(e)}return b.reject(d)}}]);
{'fraction_non_alphanumeric': 0.27356937011115684, 'fraction_numerical': 0.009057225195553726, 'mean_word_length': 12.497222222222222, 'pattern_counts': {'":': 20, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5600648', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1963, 'n_words': 165}