konacha 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbe0a4e896727c4c1dd72c2cab1b4464dc909287
4
- data.tar.gz: ad9ba543b576bc84a1f9eb8ff6e49b85b221d272
3
+ metadata.gz: 887836e5ce02888e4d4a7911d02b9e0277d09ea3
4
+ data.tar.gz: 5eea46974f0a22a51df78e1d7cec72794ef206ca
5
5
  SHA512:
6
- metadata.gz: 1dcd3113d30d08e8d4e4a112a04ab024a0f4be9947d0e693594673c2faa83922781e275b326f244a730a621446fb3f94c0ab660c6fb47276419c98b2e1fbf9df
7
- data.tar.gz: 39187e3cb36ae4344906270d5f57b15bcd2d13fd490e5239884899485dad92626f00354bbe6c4acc055b04b99768fb3ab069382d803fd33dbf644629c51666b7
6
+ metadata.gz: 93a7456e4e214681eec1b15992a3a1e0d42cf7a24c1a22bd8acda4e945e9a1fdc333e711a239d27743b0cb0fe6e274f2fe2369524e88450068cb7587c7ea2f00
7
+ data.tar.gz: 3c4a714d6ee52b7844f60489960ce25e56ceb66ed20f97c1cab40a582526147a662151736820801a8c1ac667252cce614723c76db8b86d36e1b0cc63267b7a6c
data/History.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ # 3.5.1
4
+
5
+ * Update chai (1.9.2)
6
+
3
7
  # 3.5.0
4
8
 
5
9
  * Supports Sprockets 3.x (#202, #203, #204)
@@ -17,7 +17,7 @@ the asset pipeline and engines.}
17
17
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  gem.name = "konacha"
19
19
  gem.require_paths = ["lib"]
20
- gem.version = "3.5.0"
20
+ gem.version = "3.5.1"
21
21
  gem.license = "MIT"
22
22
 
23
23
  gem.add_dependency "railties", ">= 3.1", "< 5"
@@ -1,206 +1,144 @@
1
+
1
2
  ;(function(){
2
3
 
3
4
  /**
4
- * Require the given path.
5
+ * Require the module at `name`.
5
6
  *
6
- * @param {String} path
7
+ * @param {String} name
7
8
  * @return {Object} exports
8
9
  * @api public
9
10
  */
10
11
 
11
- function require(path, parent, orig) {
12
- var resolved = require.resolve(path);
13
-
14
- // lookup failed
15
- if (null == resolved) {
16
- orig = orig || path;
17
- parent = parent || 'root';
18
- var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
19
- err.path = orig;
20
- err.parent = parent;
21
- err.require = true;
22
- throw err;
23
- }
12
+ function require(name) {
13
+ var module = require.modules[name];
14
+ if (!module) throw new Error('failed to require "' + name + '"');
24
15
 
25
- var module = require.modules[resolved];
26
-
27
- // perform real require()
28
- // by invoking the module's
29
- // registered function
30
- if (!module._resolving && !module.exports) {
31
- var mod = {};
32
- mod.exports = {};
33
- mod.client = mod.component = true;
34
- module._resolving = true;
35
- module.call(this, mod.exports, require.relative(resolved), mod);
36
- delete module._resolving;
37
- module.exports = mod.exports;
16
+ if (!('exports' in module) && typeof module.definition === 'function') {
17
+ module.client = module.component = true;
18
+ module.definition.call(this, module.exports = {}, module);
19
+ delete module.definition;
38
20
  }
39
21
 
40
22
  return module.exports;
41
23
  }
42
24
 
43
25
  /**
44
- * Registered modules.
26
+ * Meta info, accessible in the global scope unless you use AMD option.
45
27
  */
46
28
 
47
- require.modules = {};
29
+ require.loader = 'component';
48
30
 
49
31
  /**
50
- * Registered aliases.
32
+ * Internal helper object, contains a sorting function for semantiv versioning
51
33
  */
52
-
53
- require.aliases = {};
54
-
55
- /**
56
- * Resolve `path`.
57
- *
58
- * Lookup:
59
- *
60
- * - PATH/index.js
61
- * - PATH.js
62
- * - PATH
63
- *
64
- * @param {String} path
65
- * @return {String} path or null
66
- * @api private
67
- */
68
-
69
- require.resolve = function(path) {
70
- if (path.charAt(0) === '/') path = path.slice(1);
71
-
72
- var paths = [
73
- path,
74
- path + '.js',
75
- path + '.json',
76
- path + '/index.js',
77
- path + '/index.json'
78
- ];
79
-
80
- for (var i = 0; i < paths.length; i++) {
81
- var path = paths[i];
82
- if (require.modules.hasOwnProperty(path)) return path;
83
- if (require.aliases.hasOwnProperty(path)) return require.aliases[path];
34
+ require.helper = {};
35
+ require.helper.semVerSort = function(a, b) {
36
+ var aArray = a.version.split('.');
37
+ var bArray = b.version.split('.');
38
+ for (var i=0; i<aArray.length; ++i) {
39
+ var aInt = parseInt(aArray[i], 10);
40
+ var bInt = parseInt(bArray[i], 10);
41
+ if (aInt === bInt) {
42
+ var aLex = aArray[i].substr((""+aInt).length);
43
+ var bLex = bArray[i].substr((""+bInt).length);
44
+ if (aLex === '' && bLex !== '') return 1;
45
+ if (aLex !== '' && bLex === '') return -1;
46
+ if (aLex !== '' && bLex !== '') return aLex > bLex ? 1 : -1;
47
+ continue;
48
+ } else if (aInt > bInt) {
49
+ return 1;
50
+ } else {
51
+ return -1;
52
+ }
84
53
  }
85
- };
54
+ return 0;
55
+ }
86
56
 
87
57
  /**
88
- * Normalize `path` relative to the current path.
89
- *
90
- * @param {String} curr
91
- * @param {String} path
92
- * @return {String}
93
- * @api private
94
- */
95
-
96
- require.normalize = function(curr, path) {
97
- var segs = [];
98
-
99
- if ('.' != path.charAt(0)) return path;
100
-
101
- curr = curr.split('/');
102
- path = path.split('/');
58
+ * Find and require a module which name starts with the provided name.
59
+ * If multiple modules exists, the highest semver is used.
60
+ * This function can only be used for remote dependencies.
103
61
 
104
- for (var i = 0; i < path.length; ++i) {
105
- if ('..' == path[i]) {
106
- curr.pop();
107
- } else if ('.' != path[i] && '' != path[i]) {
108
- segs.push(path[i]);
62
+ * @param {String} name - module name: `user~repo`
63
+ * @param {Boolean} returnPath - returns the canonical require path if true,
64
+ * otherwise it returns the epxorted module
65
+ */
66
+ require.latest = function (name, returnPath) {
67
+ function showError(name) {
68
+ throw new Error('failed to find latest module of "' + name + '"');
69
+ }
70
+ // only remotes with semvers, ignore local files conataining a '/'
71
+ var versionRegexp = /(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;
72
+ var remoteRegexp = /(.*)~(.*)/;
73
+ if (!remoteRegexp.test(name)) showError(name);
74
+ var moduleNames = Object.keys(require.modules);
75
+ var semVerCandidates = [];
76
+ var otherCandidates = []; // for instance: name of the git branch
77
+ for (var i=0; i<moduleNames.length; i++) {
78
+ var moduleName = moduleNames[i];
79
+ if (new RegExp(name + '@').test(moduleName)) {
80
+ var version = moduleName.substr(name.length+1);
81
+ var semVerMatch = versionRegexp.exec(moduleName);
82
+ if (semVerMatch != null) {
83
+ semVerCandidates.push({version: version, name: moduleName});
84
+ } else {
85
+ otherCandidates.push({version: version, name: moduleName});
86
+ }
109
87
  }
110
88
  }
111
-
112
- return curr.concat(segs).join('/');
113
- };
89
+ if (semVerCandidates.concat(otherCandidates).length === 0) {
90
+ showError(name);
91
+ }
92
+ if (semVerCandidates.length > 0) {
93
+ var module = semVerCandidates.sort(require.helper.semVerSort).pop().name;
94
+ if (returnPath === true) {
95
+ return module;
96
+ }
97
+ return require(module);
98
+ }
99
+ // if the build contains more than one branch of the same module
100
+ // you should not use this funciton
101
+ var module = otherCandidates.sort(function(a, b) {return a.name > b.name})[0].name;
102
+ if (returnPath === true) {
103
+ return module;
104
+ }
105
+ return require(module);
106
+ }
114
107
 
115
108
  /**
116
- * Register module at `path` with callback `definition`.
117
- *
118
- * @param {String} path
119
- * @param {Function} definition
120
- * @api private
109
+ * Registered modules.
121
110
  */
122
111
 
123
- require.register = function(path, definition) {
124
- require.modules[path] = definition;
125
- };
112
+ require.modules = {};
126
113
 
127
114
  /**
128
- * Alias a module definition.
115
+ * Register module at `name` with callback `definition`.
129
116
  *
130
- * @param {String} from
131
- * @param {String} to
117
+ * @param {String} name
118
+ * @param {Function} definition
132
119
  * @api private
133
120
  */
134
121
 
135
- require.alias = function(from, to) {
136
- if (!require.modules.hasOwnProperty(from)) {
137
- throw new Error('Failed to alias "' + from + '", it does not exist');
138
- }
139
- require.aliases[to] = from;
122
+ require.register = function (name, definition) {
123
+ require.modules[name] = {
124
+ definition: definition
125
+ };
140
126
  };
141
127
 
142
128
  /**
143
- * Return a require function relative to the `parent` path.
129
+ * Define a module's exports immediately with `exports`.
144
130
  *
145
- * @param {String} parent
146
- * @return {Function}
131
+ * @param {String} name
132
+ * @param {Generic} exports
147
133
  * @api private
148
134
  */
149
135
 
150
- require.relative = function(parent) {
151
- var p = require.normalize(parent, '..');
152
-
153
- /**
154
- * lastIndexOf helper.
155
- */
156
-
157
- function lastIndexOf(arr, obj) {
158
- var i = arr.length;
159
- while (i--) {
160
- if (arr[i] === obj) return i;
161
- }
162
- return -1;
163
- }
164
-
165
- /**
166
- * The relative require() itself.
167
- */
168
-
169
- function localRequire(path) {
170
- var resolved = localRequire.resolve(path);
171
- return require(resolved, parent, path);
172
- }
173
-
174
- /**
175
- * Resolve relative to the parent.
176
- */
177
-
178
- localRequire.resolve = function(path) {
179
- var c = path.charAt(0);
180
- if ('/' == c) return path.slice(1);
181
- if ('.' == c) return require.normalize(p, path);
182
-
183
- // resolve deps by returning
184
- // the dep in the nearest "deps"
185
- // directory
186
- var segs = parent.split('/');
187
- var i = lastIndexOf(segs, 'deps') + 1;
188
- if (!i) i = 0;
189
- path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
190
- return path;
136
+ require.define = function (name, exports) {
137
+ require.modules[name] = {
138
+ exports: exports
191
139
  };
192
-
193
- /**
194
- * Check if module is defined at `path`.
195
- */
196
-
197
- localRequire.exists = function(path) {
198
- return require.modules.hasOwnProperty(localRequire.resolve(path));
199
- };
200
-
201
- return localRequire;
202
140
  };
203
- require.register("chaijs-assertion-error/index.js", function(exports, require, module){
141
+ require.register("chaijs~assertion-error@1.0.0", function (exports, module) {
204
142
  /*!
205
143
  * assertion-error
206
144
  * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
@@ -313,7 +251,8 @@ AssertionError.prototype.toJSON = function (stack) {
313
251
  };
314
252
 
315
253
  });
316
- require.register("chaijs-type-detect/lib/type.js", function(exports, require, module){
254
+
255
+ require.register("chaijs~type-detect@0.1.1", function (exports, module) {
317
256
  /*!
318
257
  * type-detect
319
258
  * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
@@ -458,7 +397,8 @@ Library.prototype.test = function (obj, type) {
458
397
  };
459
398
 
460
399
  });
461
- require.register("chaijs-deep-eql/lib/eql.js", function(exports, require, module){
400
+
401
+ require.register("chaijs~deep-eql@0.1.3", function (exports, module) {
462
402
  /*!
463
403
  * deep-eql
464
404
  * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
@@ -469,7 +409,7 @@ require.register("chaijs-deep-eql/lib/eql.js", function(exports, require, module
469
409
  * Module dependencies
470
410
  */
471
411
 
472
- var type = require('type-detect');
412
+ var type = require('chaijs~type-detect@0.1.1');
473
413
 
474
414
  /*!
475
415
  * Buffer.isBuffer browser shim
@@ -718,11 +658,13 @@ function objectEqual(a, b, m) {
718
658
  }
719
659
 
720
660
  });
721
- require.register("chai/index.js", function(exports, require, module){
722
- module.exports = require('./lib/chai');
661
+
662
+ require.register("chai", function (exports, module) {
663
+ module.exports = require('chai/lib/chai.js');
723
664
 
724
665
  });
725
- require.register("chai/lib/chai.js", function(exports, require, module){
666
+
667
+ require.register("chai/lib/chai.js", function (exports, module) {
726
668
  /*!
727
669
  * chai
728
670
  * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
@@ -736,19 +678,19 @@ var used = []
736
678
  * Chai version
737
679
  */
738
680
 
739
- exports.version = '1.9.1';
681
+ exports.version = '1.9.2';
740
682
 
741
683
  /*!
742
684
  * Assertion Error
743
685
  */
744
686
 
745
- exports.AssertionError = require('assertion-error');
687
+ exports.AssertionError = require('chaijs~assertion-error@1.0.0');
746
688
 
747
689
  /*!
748
690
  * Utils for plugins (not exported)
749
691
  */
750
692
 
751
- var util = require('./chai/utils');
693
+ var util = require('chai/lib/chai/utils/index.js');
752
694
 
753
695
  /**
754
696
  * # .use(function)
@@ -773,46 +715,47 @@ exports.use = function (fn) {
773
715
  * Configuration
774
716
  */
775
717
 
776
- var config = require('./chai/config');
718
+ var config = require('chai/lib/chai/config.js');
777
719
  exports.config = config;
778
720
 
779
721
  /*!
780
722
  * Primary `Assertion` prototype
781
723
  */
782
724
 
783
- var assertion = require('./chai/assertion');
725
+ var assertion = require('chai/lib/chai/assertion.js');
784
726
  exports.use(assertion);
785
727
 
786
728
  /*!
787
729
  * Core Assertions
788
730
  */
789
731
 
790
- var core = require('./chai/core/assertions');
732
+ var core = require('chai/lib/chai/core/assertions.js');
791
733
  exports.use(core);
792
734
 
793
735
  /*!
794
736
  * Expect interface
795
737
  */
796
738
 
797
- var expect = require('./chai/interface/expect');
739
+ var expect = require('chai/lib/chai/interface/expect.js');
798
740
  exports.use(expect);
799
741
 
800
742
  /*!
801
743
  * Should interface
802
744
  */
803
745
 
804
- var should = require('./chai/interface/should');
746
+ var should = require('chai/lib/chai/interface/should.js');
805
747
  exports.use(should);
806
748
 
807
749
  /*!
808
750
  * Assert interface
809
751
  */
810
752
 
811
- var assert = require('./chai/interface/assert');
753
+ var assert = require('chai/lib/chai/interface/assert.js');
812
754
  exports.use(assert);
813
755
 
814
756
  });
815
- require.register("chai/lib/chai/assertion.js", function(exports, require, module){
757
+
758
+ require.register("chai/lib/chai/assertion.js", function (exports, module) {
816
759
  /*!
817
760
  * chai
818
761
  * http://chaijs.com
@@ -820,7 +763,7 @@ require.register("chai/lib/chai/assertion.js", function(exports, require, module
820
763
  * MIT Licensed
821
764
  */
822
765
 
823
- var config = require('./config');
766
+ var config = require('chai/lib/chai/config.js');
824
767
 
825
768
  module.exports = function (_chai, util) {
826
769
  /*!
@@ -903,8 +846,8 @@ module.exports = function (_chai, util) {
903
846
  *
904
847
  * @name assert
905
848
  * @param {Philosophical} expression to be tested
906
- * @param {String} message to display if fails
907
- * @param {String} negatedMessage to display if negated expression fails
849
+ * @param {String or Function} message or function that returns message to display if fails
850
+ * @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails
908
851
  * @param {Mixed} expected value (remember to check for negation)
909
852
  * @param {Mixed} actual (optional) will default to `this.obj`
910
853
  * @api private
@@ -945,7 +888,8 @@ module.exports = function (_chai, util) {
945
888
  };
946
889
 
947
890
  });
948
- require.register("chai/lib/chai/config.js", function(exports, require, module){
891
+
892
+ require.register("chai/lib/chai/config.js", function (exports, module) {
949
893
  module.exports = {
950
894
 
951
895
  /**
@@ -998,7 +942,8 @@ module.exports = {
998
942
  };
999
943
 
1000
944
  });
1001
- require.register("chai/lib/chai/core/assertions.js", function(exports, require, module){
945
+
946
+ require.register("chai/lib/chai/core/assertions.js", function (exports, module) {
1002
947
  /*!
1003
948
  * chai
1004
949
  * http://chaijs.com
@@ -1872,7 +1817,7 @@ module.exports = function (chai, _) {
1872
1817
  }
1873
1818
 
1874
1819
  Assertion.addChainableMethod('length', assertLength, assertLengthChain);
1875
- Assertion.addMethod('lengthOf', assertLength, assertLengthChain);
1820
+ Assertion.addMethod('lengthOf', assertLength);
1876
1821
 
1877
1822
  /**
1878
1823
  * ### .match(regexp)
@@ -1951,6 +1896,7 @@ module.exports = function (chai, _) {
1951
1896
  if (!keys.length) throw new Error('keys required');
1952
1897
 
1953
1898
  var actual = Object.keys(obj)
1899
+ , expected = keys
1954
1900
  , len = keys.length;
1955
1901
 
1956
1902
  // Inclusion
@@ -1985,6 +1931,9 @@ module.exports = function (chai, _) {
1985
1931
  ok
1986
1932
  , 'expected #{this} to ' + str
1987
1933
  , 'expected #{this} to not ' + str
1934
+ , expected.sort()
1935
+ , actual.sort()
1936
+ , true
1988
1937
  );
1989
1938
  }
1990
1939
 
@@ -2220,12 +2169,13 @@ module.exports = function (chai, _) {
2220
2169
  Assertion.addMethod('satisfy', function (matcher, msg) {
2221
2170
  if (msg) flag(this, 'message', msg);
2222
2171
  var obj = flag(this, 'object');
2172
+ var result = matcher(obj);
2223
2173
  this.assert(
2224
- matcher(obj)
2174
+ result
2225
2175
  , 'expected #{this} to satisfy ' + _.objDisplay(matcher)
2226
2176
  , 'expected #{this} to not satisfy' + _.objDisplay(matcher)
2227
2177
  , this.negate ? false : true
2228
- , matcher(obj)
2178
+ , result
2229
2179
  );
2230
2180
  });
2231
2181
 
@@ -2246,6 +2196,12 @@ module.exports = function (chai, _) {
2246
2196
  Assertion.addMethod('closeTo', function (expected, delta, msg) {
2247
2197
  if (msg) flag(this, 'message', msg);
2248
2198
  var obj = flag(this, 'object');
2199
+
2200
+ new Assertion(obj, msg).is.a('number');
2201
+ if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {
2202
+ throw new Error('the arguments to closeTo must be numbers');
2203
+ }
2204
+
2249
2205
  this.assert(
2250
2206
  Math.abs(obj - expected) <= delta
2251
2207
  , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
@@ -2315,7 +2271,8 @@ module.exports = function (chai, _) {
2315
2271
  };
2316
2272
 
2317
2273
  });
2318
- require.register("chai/lib/chai/interface/assert.js", function(exports, require, module){
2274
+
2275
+ require.register("chai/lib/chai/interface/assert.js", function (exports, module) {
2319
2276
  /*!
2320
2277
  * chai
2321
2278
  * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3324,8 +3281,8 @@ module.exports = function (chai, util) {
3324
3281
  * assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');
3325
3282
  *
3326
3283
  * @name sameMembers
3327
- * @param {Array} superset
3328
- * @param {Array} subset
3284
+ * @param {Array} set1
3285
+ * @param {Array} set2
3329
3286
  * @param {String} message
3330
3287
  * @api public
3331
3288
  */
@@ -3374,7 +3331,8 @@ module.exports = function (chai, util) {
3374
3331
  };
3375
3332
 
3376
3333
  });
3377
- require.register("chai/lib/chai/interface/expect.js", function(exports, require, module){
3334
+
3335
+ require.register("chai/lib/chai/interface/expect.js", function (exports, module) {
3378
3336
  /*!
3379
3337
  * chai
3380
3338
  * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3389,7 +3347,8 @@ module.exports = function (chai, util) {
3389
3347
 
3390
3348
 
3391
3349
  });
3392
- require.register("chai/lib/chai/interface/should.js", function(exports, require, module){
3350
+
3351
+ require.register("chai/lib/chai/interface/should.js", function (exports, module) {
3393
3352
  /*!
3394
3353
  * chai
3395
3354
  * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3470,7 +3429,8 @@ module.exports = function (chai, util) {
3470
3429
  };
3471
3430
 
3472
3431
  });
3473
- require.register("chai/lib/chai/utils/addChainableMethod.js", function(exports, require, module){
3432
+
3433
+ require.register("chai/lib/chai/utils/addChainableMethod.js", function (exports, module) {
3474
3434
  /*!
3475
3435
  * Chai - addChainingMethod utility
3476
3436
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3481,9 +3441,9 @@ require.register("chai/lib/chai/utils/addChainableMethod.js", function(exports,
3481
3441
  * Module dependencies
3482
3442
  */
3483
3443
 
3484
- var transferFlags = require('./transferFlags');
3485
- var flag = require('./flag');
3486
- var config = require('../config');
3444
+ var transferFlags = require('chai/lib/chai/utils/transferFlags.js');
3445
+ var flag = require('chai/lib/chai/utils/flag.js');
3446
+ var config = require('chai/lib/chai/config.js');
3487
3447
 
3488
3448
  /*!
3489
3449
  * Module variables
@@ -3584,14 +3544,15 @@ module.exports = function (ctx, name, method, chainingBehavior) {
3584
3544
  };
3585
3545
 
3586
3546
  });
3587
- require.register("chai/lib/chai/utils/addMethod.js", function(exports, require, module){
3547
+
3548
+ require.register("chai/lib/chai/utils/addMethod.js", function (exports, module) {
3588
3549
  /*!
3589
3550
  * Chai - addMethod utility
3590
3551
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3591
3552
  * MIT Licensed
3592
3553
  */
3593
3554
 
3594
- var config = require('../config');
3555
+ var config = require('chai/lib/chai/config.js');
3595
3556
 
3596
3557
  /**
3597
3558
  * ### .addMethod (ctx, name, method)
@@ -3617,7 +3578,7 @@ var config = require('../config');
3617
3578
  * @name addMethod
3618
3579
  * @api public
3619
3580
  */
3620
- var flag = require('./flag');
3581
+ var flag = require('chai/lib/chai/utils/flag.js');
3621
3582
 
3622
3583
  module.exports = function (ctx, name, method) {
3623
3584
  ctx[name] = function () {
@@ -3630,7 +3591,8 @@ module.exports = function (ctx, name, method) {
3630
3591
  };
3631
3592
 
3632
3593
  });
3633
- require.register("chai/lib/chai/utils/addProperty.js", function(exports, require, module){
3594
+
3595
+ require.register("chai/lib/chai/utils/addProperty.js", function (exports, module) {
3634
3596
  /*!
3635
3597
  * Chai - addProperty utility
3636
3598
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3673,7 +3635,8 @@ module.exports = function (ctx, name, getter) {
3673
3635
  };
3674
3636
 
3675
3637
  });
3676
- require.register("chai/lib/chai/utils/flag.js", function(exports, require, module){
3638
+
3639
+ require.register("chai/lib/chai/utils/flag.js", function (exports, module) {
3677
3640
  /*!
3678
3641
  * Chai - flag utility
3679
3642
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3708,7 +3671,8 @@ module.exports = function (obj, key, value) {
3708
3671
  };
3709
3672
 
3710
3673
  });
3711
- require.register("chai/lib/chai/utils/getActual.js", function(exports, require, module){
3674
+
3675
+ require.register("chai/lib/chai/utils/getActual.js", function (exports, module) {
3712
3676
  /*!
3713
3677
  * Chai - getActual utility
3714
3678
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3729,7 +3693,8 @@ module.exports = function (obj, args) {
3729
3693
  };
3730
3694
 
3731
3695
  });
3732
- require.register("chai/lib/chai/utils/getEnumerableProperties.js", function(exports, require, module){
3696
+
3697
+ require.register("chai/lib/chai/utils/getEnumerableProperties.js", function (exports, module) {
3733
3698
  /*!
3734
3699
  * Chai - getEnumerableProperties utility
3735
3700
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3757,7 +3722,8 @@ module.exports = function getEnumerableProperties(object) {
3757
3722
  };
3758
3723
 
3759
3724
  });
3760
- require.register("chai/lib/chai/utils/getMessage.js", function(exports, require, module){
3725
+
3726
+ require.register("chai/lib/chai/utils/getMessage.js", function (exports, module) {
3761
3727
  /*!
3762
3728
  * Chai - message composition utility
3763
3729
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3768,10 +3734,10 @@ require.register("chai/lib/chai/utils/getMessage.js", function(exports, require,
3768
3734
  * Module dependancies
3769
3735
  */
3770
3736
 
3771
- var flag = require('./flag')
3772
- , getActual = require('./getActual')
3773
- , inspect = require('./inspect')
3774
- , objDisplay = require('./objDisplay');
3737
+ var flag = require('chai/lib/chai/utils/flag.js')
3738
+ , getActual = require('chai/lib/chai/utils/getActual.js')
3739
+ , inspect = require('chai/lib/chai/utils/inspect.js')
3740
+ , objDisplay = require('chai/lib/chai/utils/objDisplay.js');
3775
3741
 
3776
3742
  /**
3777
3743
  * ### .getMessage(object, message, negateMessage)
@@ -3799,6 +3765,7 @@ module.exports = function (obj, args) {
3799
3765
  , msg = negate ? args[2] : args[1]
3800
3766
  , flagMsg = flag(obj, 'message');
3801
3767
 
3768
+ if(typeof msg === "function") msg = msg();
3802
3769
  msg = msg || '';
3803
3770
  msg = msg
3804
3771
  .replace(/#{this}/g, objDisplay(val))
@@ -3809,7 +3776,8 @@ module.exports = function (obj, args) {
3809
3776
  };
3810
3777
 
3811
3778
  });
3812
- require.register("chai/lib/chai/utils/getName.js", function(exports, require, module){
3779
+
3780
+ require.register("chai/lib/chai/utils/getName.js", function (exports, module) {
3813
3781
  /*!
3814
3782
  * Chai - getName utility
3815
3783
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3832,7 +3800,8 @@ module.exports = function (func) {
3832
3800
  };
3833
3801
 
3834
3802
  });
3835
- require.register("chai/lib/chai/utils/getPathValue.js", function(exports, require, module){
3803
+
3804
+ require.register("chai/lib/chai/utils/getPathValue.js", function (exports, module) {
3836
3805
  /*!
3837
3806
  * Chai - getPathValue utility
3838
3807
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3937,7 +3906,8 @@ function _getPathValue (parsed, obj) {
3937
3906
  };
3938
3907
 
3939
3908
  });
3940
- require.register("chai/lib/chai/utils/getProperties.js", function(exports, require, module){
3909
+
3910
+ require.register("chai/lib/chai/utils/getProperties.js", function (exports, module) {
3941
3911
  /*!
3942
3912
  * Chai - getProperties utility
3943
3913
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -3975,7 +3945,8 @@ module.exports = function getProperties(object) {
3975
3945
  };
3976
3946
 
3977
3947
  });
3978
- require.register("chai/lib/chai/utils/index.js", function(exports, require, module){
3948
+
3949
+ require.register("chai/lib/chai/utils/index.js", function (exports, module) {
3979
3950
  /*!
3980
3951
  * chai
3981
3952
  * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
@@ -3992,113 +3963,114 @@ var exports = module.exports = {};
3992
3963
  * test utility
3993
3964
  */
3994
3965
 
3995
- exports.test = require('./test');
3966
+ exports.test = require('chai/lib/chai/utils/test.js');
3996
3967
 
3997
3968
  /*!
3998
3969
  * type utility
3999
3970
  */
4000
3971
 
4001
- exports.type = require('./type');
3972
+ exports.type = require('chai/lib/chai/utils/type.js');
4002
3973
 
4003
3974
  /*!
4004
3975
  * message utility
4005
3976
  */
4006
3977
 
4007
- exports.getMessage = require('./getMessage');
3978
+ exports.getMessage = require('chai/lib/chai/utils/getMessage.js');
4008
3979
 
4009
3980
  /*!
4010
3981
  * actual utility
4011
3982
  */
4012
3983
 
4013
- exports.getActual = require('./getActual');
3984
+ exports.getActual = require('chai/lib/chai/utils/getActual.js');
4014
3985
 
4015
3986
  /*!
4016
3987
  * Inspect util
4017
3988
  */
4018
3989
 
4019
- exports.inspect = require('./inspect');
3990
+ exports.inspect = require('chai/lib/chai/utils/inspect.js');
4020
3991
 
4021
3992
  /*!
4022
3993
  * Object Display util
4023
3994
  */
4024
3995
 
4025
- exports.objDisplay = require('./objDisplay');
3996
+ exports.objDisplay = require('chai/lib/chai/utils/objDisplay.js');
4026
3997
 
4027
3998
  /*!
4028
3999
  * Flag utility
4029
4000
  */
4030
4001
 
4031
- exports.flag = require('./flag');
4002
+ exports.flag = require('chai/lib/chai/utils/flag.js');
4032
4003
 
4033
4004
  /*!
4034
4005
  * Flag transferring utility
4035
4006
  */
4036
4007
 
4037
- exports.transferFlags = require('./transferFlags');
4008
+ exports.transferFlags = require('chai/lib/chai/utils/transferFlags.js');
4038
4009
 
4039
4010
  /*!
4040
4011
  * Deep equal utility
4041
4012
  */
4042
4013
 
4043
- exports.eql = require('deep-eql');
4014
+ exports.eql = require('chaijs~deep-eql@0.1.3');
4044
4015
 
4045
4016
  /*!
4046
4017
  * Deep path value
4047
4018
  */
4048
4019
 
4049
- exports.getPathValue = require('./getPathValue');
4020
+ exports.getPathValue = require('chai/lib/chai/utils/getPathValue.js');
4050
4021
 
4051
4022
  /*!
4052
4023
  * Function name
4053
4024
  */
4054
4025
 
4055
- exports.getName = require('./getName');
4026
+ exports.getName = require('chai/lib/chai/utils/getName.js');
4056
4027
 
4057
4028
  /*!
4058
4029
  * add Property
4059
4030
  */
4060
4031
 
4061
- exports.addProperty = require('./addProperty');
4032
+ exports.addProperty = require('chai/lib/chai/utils/addProperty.js');
4062
4033
 
4063
4034
  /*!
4064
4035
  * add Method
4065
4036
  */
4066
4037
 
4067
- exports.addMethod = require('./addMethod');
4038
+ exports.addMethod = require('chai/lib/chai/utils/addMethod.js');
4068
4039
 
4069
4040
  /*!
4070
4041
  * overwrite Property
4071
4042
  */
4072
4043
 
4073
- exports.overwriteProperty = require('./overwriteProperty');
4044
+ exports.overwriteProperty = require('chai/lib/chai/utils/overwriteProperty.js');
4074
4045
 
4075
4046
  /*!
4076
4047
  * overwrite Method
4077
4048
  */
4078
4049
 
4079
- exports.overwriteMethod = require('./overwriteMethod');
4050
+ exports.overwriteMethod = require('chai/lib/chai/utils/overwriteMethod.js');
4080
4051
 
4081
4052
  /*!
4082
4053
  * Add a chainable method
4083
4054
  */
4084
4055
 
4085
- exports.addChainableMethod = require('./addChainableMethod');
4056
+ exports.addChainableMethod = require('chai/lib/chai/utils/addChainableMethod.js');
4086
4057
 
4087
4058
  /*!
4088
4059
  * Overwrite chainable method
4089
4060
  */
4090
4061
 
4091
- exports.overwriteChainableMethod = require('./overwriteChainableMethod');
4062
+ exports.overwriteChainableMethod = require('chai/lib/chai/utils/overwriteChainableMethod.js');
4092
4063
 
4093
4064
 
4094
4065
  });
4095
- require.register("chai/lib/chai/utils/inspect.js", function(exports, require, module){
4066
+
4067
+ require.register("chai/lib/chai/utils/inspect.js", function (exports, module) {
4096
4068
  // This is (almost) directly from Node.js utils
4097
4069
  // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
4098
4070
 
4099
- var getName = require('./getName');
4100
- var getProperties = require('./getProperties');
4101
- var getEnumerableProperties = require('./getEnumerableProperties');
4071
+ var getName = require('chai/lib/chai/utils/getName.js');
4072
+ var getProperties = require('chai/lib/chai/utils/getProperties.js');
4073
+ var getEnumerableProperties = require('chai/lib/chai/utils/getEnumerableProperties.js');
4102
4074
 
4103
4075
  module.exports = inspect;
4104
4076
 
@@ -4122,24 +4094,6 @@ function inspect(obj, showHidden, depth, colors) {
4122
4094
  return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));
4123
4095
  }
4124
4096
 
4125
- // https://gist.github.com/1044128/
4126
- var getOuterHTML = function(element) {
4127
- if ('outerHTML' in element) return element.outerHTML;
4128
- var ns = "http://www.w3.org/1999/xhtml";
4129
- var container = document.createElementNS(ns, '_');
4130
- var elemProto = (window.HTMLElement || window.Element).prototype;
4131
- var xmlSerializer = new XMLSerializer();
4132
- var html;
4133
- if (document.xmlVersion) {
4134
- return xmlSerializer.serializeToString(element);
4135
- } else {
4136
- container.appendChild(element.cloneNode(false));
4137
- html = container.innerHTML.replace('><', '>' + element.innerHTML + '<');
4138
- container.innerHTML = '';
4139
- return html;
4140
- }
4141
- };
4142
-
4143
4097
  // Returns true if object is a DOM element.
4144
4098
  var isDOMElement = function (object) {
4145
4099
  if (typeof HTMLElement === 'object') {
@@ -4173,9 +4127,37 @@ function formatValue(ctx, value, recurseTimes) {
4173
4127
  return primitive;
4174
4128
  }
4175
4129
 
4176
- // If it's DOM elem, get outer HTML.
4130
+ // If this is a DOM element, try to get the outer HTML.
4177
4131
  if (isDOMElement(value)) {
4178
- return getOuterHTML(value);
4132
+ if ('outerHTML' in value) {
4133
+ return value.outerHTML;
4134
+ // This value does not have an outerHTML attribute,
4135
+ // it could still be an XML element
4136
+ } else {
4137
+ // Attempt to serialize it
4138
+ try {
4139
+ if (document.xmlVersion) {
4140
+ var xmlSerializer = new XMLSerializer();
4141
+ return xmlSerializer.serializeToString(value);
4142
+ } else {
4143
+ // Firefox 11- do not support outerHTML
4144
+ // It does, however, support innerHTML
4145
+ // Use the following to render the element
4146
+ var ns = "http://www.w3.org/1999/xhtml";
4147
+ var container = document.createElementNS(ns, '_');
4148
+
4149
+ container.appendChild(value.cloneNode(false));
4150
+ html = container.innerHTML
4151
+ .replace('><', '>' + value.innerHTML + '<');
4152
+ container.innerHTML = '';
4153
+ return html;
4154
+ }
4155
+ } catch (err) {
4156
+ // This could be a non-native DOM implementation,
4157
+ // continue with the normal flow:
4158
+ // printing the element as if it is an object.
4159
+ }
4160
+ }
4179
4161
  }
4180
4162
 
4181
4163
  // Look up the keys of the object.
@@ -4415,7 +4397,8 @@ function objectToString(o) {
4415
4397
  }
4416
4398
 
4417
4399
  });
4418
- require.register("chai/lib/chai/utils/objDisplay.js", function(exports, require, module){
4400
+
4401
+ require.register("chai/lib/chai/utils/objDisplay.js", function (exports, module) {
4419
4402
  /*!
4420
4403
  * Chai - flag utility
4421
4404
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4426,8 +4409,8 @@ require.register("chai/lib/chai/utils/objDisplay.js", function(exports, require,
4426
4409
  * Module dependancies
4427
4410
  */
4428
4411
 
4429
- var inspect = require('./inspect');
4430
- var config = require('../config');
4412
+ var inspect = require('chai/lib/chai/utils/inspect.js');
4413
+ var config = require('chai/lib/chai/config.js');
4431
4414
 
4432
4415
  /**
4433
4416
  * ### .objDisplay (object)
@@ -4467,7 +4450,8 @@ module.exports = function (obj) {
4467
4450
  };
4468
4451
 
4469
4452
  });
4470
- require.register("chai/lib/chai/utils/overwriteMethod.js", function(exports, require, module){
4453
+
4454
+ require.register("chai/lib/chai/utils/overwriteMethod.js", function (exports, module) {
4471
4455
  /*!
4472
4456
  * Chai - overwriteMethod utility
4473
4457
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4521,7 +4505,8 @@ module.exports = function (ctx, name, method) {
4521
4505
  };
4522
4506
 
4523
4507
  });
4524
- require.register("chai/lib/chai/utils/overwriteProperty.js", function(exports, require, module){
4508
+
4509
+ require.register("chai/lib/chai/utils/overwriteProperty.js", function (exports, module) {
4525
4510
  /*!
4526
4511
  * Chai - overwriteProperty utility
4527
4512
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4578,7 +4563,8 @@ module.exports = function (ctx, name, getter) {
4578
4563
  };
4579
4564
 
4580
4565
  });
4581
- require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function(exports, require, module){
4566
+
4567
+ require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function (exports, module) {
4582
4568
  /*!
4583
4569
  * Chai - overwriteChainableMethod utility
4584
4570
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4634,7 +4620,8 @@ module.exports = function (ctx, name, method, chainingBehavior) {
4634
4620
  };
4635
4621
 
4636
4622
  });
4637
- require.register("chai/lib/chai/utils/test.js", function(exports, require, module){
4623
+
4624
+ require.register("chai/lib/chai/utils/test.js", function (exports, module) {
4638
4625
  /*!
4639
4626
  * Chai - test utility
4640
4627
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4645,7 +4632,7 @@ require.register("chai/lib/chai/utils/test.js", function(exports, require, modul
4645
4632
  * Module dependancies
4646
4633
  */
4647
4634
 
4648
- var flag = require('./flag');
4635
+ var flag = require('chai/lib/chai/utils/flag.js');
4649
4636
 
4650
4637
  /**
4651
4638
  * # test(object, expression)
@@ -4663,7 +4650,8 @@ module.exports = function (obj, args) {
4663
4650
  };
4664
4651
 
4665
4652
  });
4666
- require.register("chai/lib/chai/utils/transferFlags.js", function(exports, require, module){
4653
+
4654
+ require.register("chai/lib/chai/utils/transferFlags.js", function (exports, module) {
4667
4655
  /*!
4668
4656
  * Chai - transferFlags utility
4669
4657
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4710,7 +4698,8 @@ module.exports = function (assertion, object, includeAll) {
4710
4698
  };
4711
4699
 
4712
4700
  });
4713
- require.register("chai/lib/chai/utils/type.js", function(exports, require, module){
4701
+
4702
+ require.register("chai/lib/chai/utils/type.js", function (exports, module) {
4714
4703
  /*!
4715
4704
  * Chai - type utility
4716
4705
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -4759,24 +4748,11 @@ module.exports = function (obj) {
4759
4748
 
4760
4749
  });
4761
4750
 
4762
-
4763
-
4764
-
4765
- require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/index.js");
4766
- require.alias("chaijs-assertion-error/index.js", "chai/deps/assertion-error/index.js");
4767
- require.alias("chaijs-assertion-error/index.js", "assertion-error/index.js");
4768
- require.alias("chaijs-assertion-error/index.js", "chaijs-assertion-error/index.js");
4769
- require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/lib/eql.js");
4770
- require.alias("chaijs-deep-eql/lib/eql.js", "chai/deps/deep-eql/index.js");
4771
- require.alias("chaijs-deep-eql/lib/eql.js", "deep-eql/index.js");
4772
- require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detect/lib/type.js");
4773
- require.alias("chaijs-type-detect/lib/type.js", "chaijs-deep-eql/deps/type-detect/index.js");
4774
- require.alias("chaijs-type-detect/lib/type.js", "chaijs-type-detect/index.js");
4775
- require.alias("chaijs-deep-eql/lib/eql.js", "chaijs-deep-eql/index.js");
4776
- require.alias("chai/index.js", "chai/index.js");if (typeof exports == "object") {
4751
+ if (typeof exports == "object") {
4777
4752
  module.exports = require("chai");
4778
4753
  } else if (typeof define == "function" && define.amd) {
4779
- define([], function(){ return require("chai"); });
4754
+ define("chai", [], function(){ return require("chai"); });
4780
4755
  } else {
4781
- this["chai"] = require("chai");
4782
- }})();
4756
+ (this || window)["chai"] = require("chai");
4757
+ }
4758
+ })()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konacha
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Firebaugh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -344,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
344
344
  version: '0'
345
345
  requirements: []
346
346
  rubyforge_project:
347
- rubygems_version: 2.2.2
347
+ rubygems_version: 2.4.5
348
348
  signing_key:
349
349
  specification_version: 4
350
350
  summary: Unit-test your Rails JavaScript with the mocha test framework and chai assertion