sinon-rails 1.7.1.1 → 1.7.3

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: 11a0bac72b389c4bdc03ae66d0eaa3623091a4d6
4
- data.tar.gz: 9294b7e031987f093d57a3bfac7510a016401369
3
+ metadata.gz: d9812c464137a0e33419966fe1ff20a7a38cc6e1
4
+ data.tar.gz: 1a674485c7539e55ce93b7f56ced5f26d4f09887
5
5
  SHA512:
6
- metadata.gz: 62e074e8febff58dcfd878352717214df9110c7548ef5f4ecbe8eb61a0f04b90a348983a4d5c31f73ae00f1be99560e7333561bea1f33855f098c3231acaabfa
7
- data.tar.gz: dbe097e0498ae20cc5e2e4b2c626dc0702bf7435f1775aebc9cf0e77bce8ec5529b82c6e5802536743898beeeb69a7ea817bb34f6b05cc8983505a21a568ae30
6
+ metadata.gz: 70ac91e60d69d314b60962b2ee47257adb292ba8a3ca2d1f70cc13b113e423ba0db3779248c37cbd2ee02975b92aa40ad7ed275e77cddc00b8e4ad94958d2657
7
+ data.tar.gz: 3f026525158af9853e8130dabcc0ce10b3ac8d65cbc03eb8824e263b71e0fde5a1dfc63a18569fe608a48d43daf3f2f53ec3147879650d4c09de6596bd378ac0
@@ -1,5 +1,5 @@
1
1
  module Sinon
2
2
  module Rails
3
- VERSION = "1.7.1.1"
3
+ VERSION = "1.7.3"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Sinon.JS 1.7.1, 2013/05/07
2
+ * Sinon.JS 1.7.3, 2013/06/20
3
3
  *
4
4
  * @author Christian Johansen (christian@cjohansen.no)
5
5
  * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
@@ -619,6 +619,10 @@ var sinon = (function (buster) {
619
619
  return true;
620
620
  }
621
621
 
622
+ if (aString == "[object Date]") {
623
+ return a.valueOf() === b.valueOf();
624
+ }
625
+
622
626
  var prop, aLength = 0, bLength = 0;
623
627
 
624
628
  for (prop in a) {
@@ -777,7 +781,6 @@ var sinon = (function (buster) {
777
781
  } catch (e) {}
778
782
  module.exports = sinon;
779
783
  module.exports.spy = require("./sinon/spy");
780
- module.exports.spyCall = require("./sinon/call");
781
784
  module.exports.stub = require("./sinon/stub");
782
785
  module.exports.mock = require("./sinon/mock");
783
786
  module.exports.collection = require("./sinon/collection");
@@ -1066,16 +1069,13 @@ var sinon = (function (buster) {
1066
1069
  * Copyright (c) 2013 Maximilian Antoni
1067
1070
  */
1068
1071
 
1069
- (function (sinon) {
1070
- var commonJSModule = typeof module == "object" && typeof require == "function";
1071
- if (!sinon && commonJSModule) {
1072
- sinon = require("../sinon");
1073
- }
1072
+ var commonJSModule = typeof module == "object" && typeof require == "function";
1074
1073
 
1075
- if (!sinon) {
1076
- return;
1077
- }
1074
+ if (!this.sinon && commonJSModule) {
1075
+ var sinon = require("../sinon");
1076
+ }
1078
1077
 
1078
+ (function (sinon) {
1079
1079
  function throwYieldError(proxy, text, args) {
1080
1080
  var msg = sinon.functionName(proxy) + text;
1081
1081
  if (args.length) {
@@ -1244,17 +1244,11 @@ var sinon = (function (buster) {
1244
1244
  };
1245
1245
  createSpyCall.toString = callProto.toString; // used by mocks
1246
1246
 
1247
- if (commonJSModule) {
1248
- module.exports = createSpyCall;
1249
- } else {
1250
- sinon.spyCall = createSpyCall;
1251
- }
1247
+ sinon.spyCall = createSpyCall;
1252
1248
  }(typeof sinon == "object" && sinon || null));
1253
1249
 
1254
-
1255
1250
  /**
1256
1251
  * @depend ../sinon.js
1257
- * @depend call.js
1258
1252
  */
1259
1253
  /*jslint eqeqeq: false, onevar: false, plusplus: false*/
1260
1254
  /*global module, require, sinon*/
@@ -1273,14 +1267,6 @@ var sinon = (function (buster) {
1273
1267
  var slice = Array.prototype.slice;
1274
1268
  var callId = 0;
1275
1269
 
1276
- if (!sinon && commonJSModule) {
1277
- sinon = require("../sinon");
1278
- }
1279
-
1280
- if (!sinon) {
1281
- return;
1282
- }
1283
-
1284
1270
  function spy(object, property) {
1285
1271
  if (!property && typeof object == "function") {
1286
1272
  return spy.create(object);
@@ -3078,8 +3064,9 @@ sinon.xhr = { XMLHttpRequest: this.XMLHttpRequest };
3078
3064
  this.statusText = "";
3079
3065
 
3080
3066
  var xhr = this;
3067
+ var events = ["loadstart", "load", "abort", "loadend"];
3081
3068
 
3082
- ["loadstart", "load", "abort", "loadend"].forEach(function (eventName) {
3069
+ function addEventListener(eventName) {
3083
3070
  xhr.addEventListener(eventName, function (event) {
3084
3071
  var listener = xhr["on" + eventName];
3085
3072
 
@@ -3087,7 +3074,11 @@ sinon.xhr = { XMLHttpRequest: this.XMLHttpRequest };
3087
3074
  listener(event);
3088
3075
  }
3089
3076
  });
3090
- });
3077
+ }
3078
+
3079
+ for (var i = events.length - 1; i >= 0; i--) {
3080
+ addEventListener(events[i]);
3081
+ }
3091
3082
 
3092
3083
  if (typeof FakeXMLHttpRequest.onCreate == "function") {
3093
3084
  FakeXMLHttpRequest.onCreate(this);
@@ -3408,7 +3399,7 @@ sinon.xhr = { XMLHttpRequest: this.XMLHttpRequest };
3408
3399
  if (typeof this.onload === "function"){
3409
3400
  this.onload();
3410
3401
  }
3411
-
3402
+
3412
3403
  }
3413
3404
  });
3414
3405
 
@@ -4296,4 +4287,4 @@ if (typeof module == "object" && typeof require == "function") {
4296
4287
  }
4297
4288
  }(typeof sinon == "object" && sinon || null, typeof window != "undefined" ? window : (typeof self != "undefined") ? self : global));
4298
4289
 
4299
- return sinon;}.call(typeof window != 'undefined' && window || {}));
4290
+ return sinon;}.call(typeof window != 'undefined' && window || {}));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinon-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1.1
4
+ version: 1.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Jeffery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-19 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.0.2
63
+ rubygems_version: 2.0.0
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: sinon.js via asset pipeline