angular-rails-engine 1.2.0.2 → 1.2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
1
  /*
2
- AngularJS v1.2.0
3
- (c) 2010-2012 Google, Inc. http://angularjs.org
2
+ AngularJS v1.2.3
3
+ (c) 2010-2014 Google, Inc. http://angularjs.org
4
4
  License: MIT
5
5
  */
6
- (function(k){'use strict';function d(c,b,e){return c[b]||(c[b]=e())}var l=minErr("$injector");return d(d(k,"angular",Object),"module",function(){var c={};return function(b,e,f){assertNotHasOwnProperty(b,"module");e&&c.hasOwnProperty(b)&&(c[b]=null);return d(c,b,function(){function a(a,b,d){return function(){c[d||"push"]([a,b,arguments]);return g}}if(!e)throw l("nomod",b);var c=[],d=[],h=a("$injector","invoke"),g={_invokeQueue:c,_runBlocks:d,requires:e,name:b,provider:a("$provide","provider"),factory:a("$provide",
7
- "factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:h,run:function(a){d.push(a);return this}};f&&h(f);return g})}})})(window);
6
+ (function(){'use strict';function d(a){return function(){var c=arguments[0],b,c="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.2.3/"+(a?a+"/":"")+c;for(b=1;b<arguments.length;b++)c=c+(1==b?"?":"&")+"p"+(b-1)+"="+encodeURIComponent("function"==typeof arguments[b]?arguments[b].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[b]?"undefined":"string"!=typeof arguments[b]?JSON.stringify(arguments[b]):arguments[b]);return Error(c)}}(function(a){var c=d("$injector"),b=d("ng");a=a.angular||
7
+ (a.angular={});a.$$minErr=a.$$minErr||d;return a.module||(a.module=function(){var a={};return function(e,d,f){if("hasOwnProperty"===e)throw b("badname","module");d&&a.hasOwnProperty(e)&&(a[e]=null);return a[e]||(a[e]=function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return g}}if(!d)throw c("nomod",e);var b=[],h=[],k=a("$injector","invoke"),g={_invokeQueue:b,_runBlocks:h,requires:d,name:e,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide",
8
+ "service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){h.push(a);return this}};f&&k(f);return g}())}}())})(window)})(window);
8
9
  //# sourceMappingURL=angular-loader.min.js.map
@@ -1,12 +1,11 @@
1
- 'use strict';
2
-
3
1
  /**
4
- * @license AngularJS v1.2.0
5
- * (c) 2010-2012 Google, Inc. http://angularjs.org
2
+ * @license AngularJS v1.2.3
3
+ * (c) 2010-2014 Google, Inc. http://angularjs.org
6
4
  * License: MIT
7
- *
8
- * TODO(vojta): wrap whole file into closure during build
9
5
  */
6
+ (function(window, angular, undefined) {
7
+
8
+ 'use strict';
10
9
 
11
10
  /**
12
11
  * @ngdoc overview
@@ -560,210 +559,208 @@ angular.mock.$IntervalProvider = function() {
560
559
  * This directive should go inside the anonymous function but a bug in JSHint means that it would
561
560
  * not be enacted early enough to prevent the warning.
562
561
  */
563
- (function() {
564
- var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
565
-
566
- function jsonStringToDate(string) {
567
- var match;
568
- if (match = string.match(R_ISO8061_STR)) {
569
- var date = new Date(0),
570
- tzHour = 0,
571
- tzMin = 0;
572
- if (match[9]) {
573
- tzHour = int(match[9] + match[10]);
574
- tzMin = int(match[9] + match[11]);
575
- }
576
- date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
577
- date.setUTCHours(int(match[4]||0) - tzHour,
578
- int(match[5]||0) - tzMin,
579
- int(match[6]||0),
580
- int(match[7]||0));
581
- return date;
562
+ var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
563
+
564
+ function jsonStringToDate(string) {
565
+ var match;
566
+ if (match = string.match(R_ISO8061_STR)) {
567
+ var date = new Date(0),
568
+ tzHour = 0,
569
+ tzMin = 0;
570
+ if (match[9]) {
571
+ tzHour = int(match[9] + match[10]);
572
+ tzMin = int(match[9] + match[11]);
582
573
  }
583
- return string;
574
+ date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
575
+ date.setUTCHours(int(match[4]||0) - tzHour,
576
+ int(match[5]||0) - tzMin,
577
+ int(match[6]||0),
578
+ int(match[7]||0));
579
+ return date;
584
580
  }
581
+ return string;
582
+ }
585
583
 
586
- function int(str) {
587
- return parseInt(str, 10);
584
+ function int(str) {
585
+ return parseInt(str, 10);
586
+ }
587
+
588
+ function padNumber(num, digits, trim) {
589
+ var neg = '';
590
+ if (num < 0) {
591
+ neg = '-';
592
+ num = -num;
588
593
  }
594
+ num = '' + num;
595
+ while(num.length < digits) num = '0' + num;
596
+ if (trim)
597
+ num = num.substr(num.length - digits);
598
+ return neg + num;
599
+ }
589
600
 
590
- function padNumber(num, digits, trim) {
591
- var neg = '';
592
- if (num < 0) {
593
- neg = '-';
594
- num = -num;
595
- }
596
- num = '' + num;
597
- while(num.length < digits) num = '0' + num;
598
- if (trim)
599
- num = num.substr(num.length - digits);
600
- return neg + num;
601
+
602
+ /**
603
+ * @ngdoc object
604
+ * @name angular.mock.TzDate
605
+ * @description
606
+ *
607
+ * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
608
+ *
609
+ * Mock of the Date type which has its timezone specified via constructor arg.
610
+ *
611
+ * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
612
+ * offset, so that we can test code that depends on local timezone settings without dependency on
613
+ * the time zone settings of the machine where the code is running.
614
+ *
615
+ * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
616
+ * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
617
+ *
618
+ * @example
619
+ * !!!! WARNING !!!!!
620
+ * This is not a complete Date object so only methods that were implemented can be called safely.
621
+ * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
622
+ *
623
+ * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
624
+ * incomplete we might be missing some non-standard methods. This can result in errors like:
625
+ * "Date.prototype.foo called on incompatible Object".
626
+ *
627
+ * <pre>
628
+ * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
629
+ * newYearInBratislava.getTimezoneOffset() => -60;
630
+ * newYearInBratislava.getFullYear() => 2010;
631
+ * newYearInBratislava.getMonth() => 0;
632
+ * newYearInBratislava.getDate() => 1;
633
+ * newYearInBratislava.getHours() => 0;
634
+ * newYearInBratislava.getMinutes() => 0;
635
+ * newYearInBratislava.getSeconds() => 0;
636
+ * </pre>
637
+ *
638
+ */
639
+ angular.mock.TzDate = function (offset, timestamp) {
640
+ var self = new Date(0);
641
+ if (angular.isString(timestamp)) {
642
+ var tsStr = timestamp;
643
+
644
+ self.origDate = jsonStringToDate(timestamp);
645
+
646
+ timestamp = self.origDate.getTime();
647
+ if (isNaN(timestamp))
648
+ throw {
649
+ name: "Illegal Argument",
650
+ message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
651
+ };
652
+ } else {
653
+ self.origDate = new Date(timestamp);
601
654
  }
602
655
 
656
+ var localOffset = new Date(timestamp).getTimezoneOffset();
657
+ self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
658
+ self.date = new Date(timestamp + self.offsetDiff);
603
659
 
604
- /**
605
- * @ngdoc object
606
- * @name angular.mock.TzDate
607
- * @description
608
- *
609
- * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
610
- *
611
- * Mock of the Date type which has its timezone specified via constructor arg.
612
- *
613
- * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
614
- * offset, so that we can test code that depends on local timezone settings without dependency on
615
- * the time zone settings of the machine where the code is running.
616
- *
617
- * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
618
- * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
619
- *
620
- * @example
621
- * !!!! WARNING !!!!!
622
- * This is not a complete Date object so only methods that were implemented can be called safely.
623
- * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
624
- *
625
- * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
626
- * incomplete we might be missing some non-standard methods. This can result in errors like:
627
- * "Date.prototype.foo called on incompatible Object".
628
- *
629
- * <pre>
630
- * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
631
- * newYearInBratislava.getTimezoneOffset() => -60;
632
- * newYearInBratislava.getFullYear() => 2010;
633
- * newYearInBratislava.getMonth() => 0;
634
- * newYearInBratislava.getDate() => 1;
635
- * newYearInBratislava.getHours() => 0;
636
- * newYearInBratislava.getMinutes() => 0;
637
- * newYearInBratislava.getSeconds() => 0;
638
- * </pre>
639
- *
640
- */
641
- angular.mock.TzDate = function (offset, timestamp) {
642
- var self = new Date(0);
643
- if (angular.isString(timestamp)) {
644
- var tsStr = timestamp;
645
-
646
- self.origDate = jsonStringToDate(timestamp);
647
-
648
- timestamp = self.origDate.getTime();
649
- if (isNaN(timestamp))
650
- throw {
651
- name: "Illegal Argument",
652
- message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
653
- };
654
- } else {
655
- self.origDate = new Date(timestamp);
656
- }
660
+ self.getTime = function() {
661
+ return self.date.getTime() - self.offsetDiff;
662
+ };
657
663
 
658
- var localOffset = new Date(timestamp).getTimezoneOffset();
659
- self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
660
- self.date = new Date(timestamp + self.offsetDiff);
664
+ self.toLocaleDateString = function() {
665
+ return self.date.toLocaleDateString();
666
+ };
661
667
 
662
- self.getTime = function() {
663
- return self.date.getTime() - self.offsetDiff;
664
- };
668
+ self.getFullYear = function() {
669
+ return self.date.getFullYear();
670
+ };
665
671
 
666
- self.toLocaleDateString = function() {
667
- return self.date.toLocaleDateString();
668
- };
672
+ self.getMonth = function() {
673
+ return self.date.getMonth();
674
+ };
669
675
 
670
- self.getFullYear = function() {
671
- return self.date.getFullYear();
672
- };
676
+ self.getDate = function() {
677
+ return self.date.getDate();
678
+ };
673
679
 
674
- self.getMonth = function() {
675
- return self.date.getMonth();
676
- };
680
+ self.getHours = function() {
681
+ return self.date.getHours();
682
+ };
677
683
 
678
- self.getDate = function() {
679
- return self.date.getDate();
680
- };
684
+ self.getMinutes = function() {
685
+ return self.date.getMinutes();
686
+ };
681
687
 
682
- self.getHours = function() {
683
- return self.date.getHours();
684
- };
688
+ self.getSeconds = function() {
689
+ return self.date.getSeconds();
690
+ };
685
691
 
686
- self.getMinutes = function() {
687
- return self.date.getMinutes();
688
- };
692
+ self.getMilliseconds = function() {
693
+ return self.date.getMilliseconds();
694
+ };
689
695
 
690
- self.getSeconds = function() {
691
- return self.date.getSeconds();
692
- };
696
+ self.getTimezoneOffset = function() {
697
+ return offset * 60;
698
+ };
693
699
 
694
- self.getMilliseconds = function() {
695
- return self.date.getMilliseconds();
696
- };
700
+ self.getUTCFullYear = function() {
701
+ return self.origDate.getUTCFullYear();
702
+ };
697
703
 
698
- self.getTimezoneOffset = function() {
699
- return offset * 60;
700
- };
704
+ self.getUTCMonth = function() {
705
+ return self.origDate.getUTCMonth();
706
+ };
701
707
 
702
- self.getUTCFullYear = function() {
703
- return self.origDate.getUTCFullYear();
704
- };
708
+ self.getUTCDate = function() {
709
+ return self.origDate.getUTCDate();
710
+ };
705
711
 
706
- self.getUTCMonth = function() {
707
- return self.origDate.getUTCMonth();
708
- };
712
+ self.getUTCHours = function() {
713
+ return self.origDate.getUTCHours();
714
+ };
709
715
 
710
- self.getUTCDate = function() {
711
- return self.origDate.getUTCDate();
712
- };
716
+ self.getUTCMinutes = function() {
717
+ return self.origDate.getUTCMinutes();
718
+ };
713
719
 
714
- self.getUTCHours = function() {
715
- return self.origDate.getUTCHours();
716
- };
720
+ self.getUTCSeconds = function() {
721
+ return self.origDate.getUTCSeconds();
722
+ };
717
723
 
718
- self.getUTCMinutes = function() {
719
- return self.origDate.getUTCMinutes();
720
- };
724
+ self.getUTCMilliseconds = function() {
725
+ return self.origDate.getUTCMilliseconds();
726
+ };
721
727
 
722
- self.getUTCSeconds = function() {
723
- return self.origDate.getUTCSeconds();
724
- };
728
+ self.getDay = function() {
729
+ return self.date.getDay();
730
+ };
725
731
 
726
- self.getUTCMilliseconds = function() {
727
- return self.origDate.getUTCMilliseconds();
732
+ // provide this method only on browsers that already have it
733
+ if (self.toISOString) {
734
+ self.toISOString = function() {
735
+ return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
736
+ padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
737
+ padNumber(self.origDate.getUTCDate(), 2) + 'T' +
738
+ padNumber(self.origDate.getUTCHours(), 2) + ':' +
739
+ padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
740
+ padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
741
+ padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
728
742
  };
743
+ }
729
744
 
730
- self.getDay = function() {
731
- return self.date.getDay();
745
+ //hide all methods not implemented in this mock that the Date prototype exposes
746
+ var unimplementedMethods = ['getUTCDay',
747
+ 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
748
+ 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
749
+ 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
750
+ 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
751
+ 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
752
+
753
+ angular.forEach(unimplementedMethods, function(methodName) {
754
+ self[methodName] = function() {
755
+ throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
732
756
  };
757
+ });
733
758
 
734
- // provide this method only on browsers that already have it
735
- if (self.toISOString) {
736
- self.toISOString = function() {
737
- return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
738
- padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
739
- padNumber(self.origDate.getUTCDate(), 2) + 'T' +
740
- padNumber(self.origDate.getUTCHours(), 2) + ':' +
741
- padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
742
- padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
743
- padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
744
- };
745
- }
746
-
747
- //hide all methods not implemented in this mock that the Date prototype exposes
748
- var unimplementedMethods = ['getUTCDay',
749
- 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
750
- 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
751
- 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
752
- 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
753
- 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
754
-
755
- angular.forEach(unimplementedMethods, function(methodName) {
756
- self[methodName] = function() {
757
- throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
758
- };
759
- });
760
-
761
- return self;
762
- };
759
+ return self;
760
+ };
763
761
 
764
- //make "tzDateInstance instanceof Date" return true
765
- angular.mock.TzDate.prototype = Date.prototype;
766
- })();
762
+ //make "tzDateInstance instanceof Date" return true
763
+ angular.mock.TzDate.prototype = Date.prototype;
767
764
  /* jshint +W101 */
768
765
 
769
766
  angular.mock.animate = angular.module('mock.animate', ['ng'])
@@ -1572,7 +1569,7 @@ function MockHttpExpectation(method, url, data, headers) {
1572
1569
  if (angular.isUndefined(data)) return true;
1573
1570
  if (data && angular.isFunction(data.test)) return data.test(d);
1574
1571
  if (data && angular.isFunction(data)) return data(d);
1575
- if (data && !angular.isString(data)) return angular.toJson(data) == d;
1572
+ if (data && !angular.isString(data)) return angular.equals(data, angular.fromJson(d));
1576
1573
  return data == d;
1577
1574
  };
1578
1575
 
@@ -1657,21 +1654,6 @@ angular.mock.$TimeoutDecorator = function($delegate, $browser) {
1657
1654
  $browser.defer.flush(delay);
1658
1655
  };
1659
1656
 
1660
- /**
1661
- * @ngdoc method
1662
- * @name ngMock.$timeout#flushNext
1663
- * @methodOf ngMock.$timeout
1664
- * @description
1665
- *
1666
- * Flushes the next timeout in the queue and compares it to the provided delay
1667
- *
1668
- * @param {number=} expectedDelay the delay value that will be asserted against the delay of the
1669
- * next timeout function
1670
- */
1671
- $delegate.flushNext = function(expectedDelay) {
1672
- $browser.defer.flushNext(expectedDelay);
1673
- };
1674
-
1675
1657
  /**
1676
1658
  * @ngdoc method
1677
1659
  * @name ngMock.$timeout#verifyNoPendingTasks
@@ -1934,9 +1916,13 @@ angular.mock.clearDataCache = function() {
1934
1916
 
1935
1917
 
1936
1918
 
1937
- (window.jasmine || window.mocha) && (function(window) {
1919
+ if(window.jasmine || window.mocha) {
1920
+
1921
+ var currentSpec = null,
1922
+ isSpecRunning = function() {
1923
+ return currentSpec && (window.mocha || currentSpec.queue.running);
1924
+ };
1938
1925
 
1939
- var currentSpec = null;
1940
1926
 
1941
1927
  beforeEach(function() {
1942
1928
  currentSpec = this;
@@ -1969,10 +1955,6 @@ angular.mock.clearDataCache = function() {
1969
1955
  angular.callbacks.counter = 0;
1970
1956
  });
1971
1957
 
1972
- function isSpecRunning() {
1973
- return currentSpec && (window.mocha || currentSpec.queue.running);
1974
- }
1975
-
1976
1958
  /**
1977
1959
  * @ngdoc function
1978
1960
  * @name angular.mock.module
@@ -2127,4 +2109,7 @@ angular.mock.clearDataCache = function() {
2127
2109
  }
2128
2110
  }
2129
2111
  };
2130
- })(window);
2112
+ }
2113
+
2114
+
2115
+ })(window, window.angular);