async-rails 1.5.1 → 1.5.2

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: 611ea70e3c32694c377a1f90f13b9715bab53a96
4
- data.tar.gz: ecb3f512b8f84f69796f800805748f2859dbaff5
3
+ metadata.gz: a44d546dc146dd72624227ccd7898b43410edde5
4
+ data.tar.gz: 0d68294c98d8273843dfd1bc0b7f473ed06575c2
5
5
  SHA512:
6
- metadata.gz: b94278afeadb2472c24051d6d857cb7e2b89fe24d12fd5cb752ac2eb5e59d9b2761a09811a201524298a4553afcb9f6dfe67cfb301246997a519fb7b39d031ea
7
- data.tar.gz: 8b007d129bdfa121d90c9b95b362c47610760ed87ecc9e60bb1b6a33d9949a88d207ab6f2a1f6c7c541ffe1e3c6baebe8d578a398619f8a5eadc34247bcc4a99
6
+ metadata.gz: 6762e7b8510b0bff7bdbecfa501daa3fd0a40e34706ed25a00104a25c04e753750d8c5961fc2ca4c18f91a1a50a4303fbb2eca93ae44619ef0df7c1e09b7f5c3
7
+ data.tar.gz: 2d76943a0ef4880a0bb0faf5d6b50cf74ecb9922ecc1f81f78ad00033ea724693c744217a1f3b7eaca7c053b9c2554bb3b75a2495ad97fa39ea14b0d2c8ad56b
@@ -1,5 +1,5 @@
1
1
  module Async
2
2
  module Rails
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
4
4
  end
5
5
  end
@@ -580,7 +580,7 @@
580
580
  var dep;
581
581
  while (len--) {
582
582
  if (!(dep = tasks[requires[len]])) {
583
- throw new Error('Has inexistant dependency');
583
+ throw new Error('Has nonexistent dependency in ' + requires.join(', '));
584
584
  }
585
585
  if (_isArray(dep) && _indexOf(dep, k) >= 0) {
586
586
  throw new Error('Has cyclic dependencies');
@@ -1085,16 +1085,17 @@
1085
1085
  async.memoize = function (fn, hasher) {
1086
1086
  var memo = {};
1087
1087
  var queues = {};
1088
+ var has = Object.prototype.hasOwnProperty;
1088
1089
  hasher = hasher || identity;
1089
1090
  var memoized = _restParam(function memoized(args) {
1090
1091
  var callback = args.pop();
1091
1092
  var key = hasher.apply(null, args);
1092
- if (key in memo) {
1093
+ if (has.call(memo, key)) {
1093
1094
  async.setImmediate(function () {
1094
1095
  callback.apply(null, memo[key]);
1095
1096
  });
1096
1097
  }
1097
- else if (key in queues) {
1098
+ else if (has.call(queues, key)) {
1098
1099
  queues[key].push(callback);
1099
1100
  }
1100
1101
  else {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Chen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-04 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties