api_client_bulk_loader 0.1.9 → 0.1.10

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: 5e1a6264b5c56b4bb3fc73819585debf8184a6b6
4
- data.tar.gz: 10e57fc2cbb10632df38a7d862d87fbc347f4767
3
+ metadata.gz: 79cd3536b6e86590d71001608bc335a6dbe84eda
4
+ data.tar.gz: eb1ed8fd002f4d76c72f0b6b4837595ed65cd472
5
5
  SHA512:
6
- metadata.gz: 37904974d237a5a29cfd5424e32656f1231d4c5d1f05e6d6269e70d5d88db75bd1d4cd910c2b50f935d04c9d97ce36bbc71f476cf03d160b7d5bed0b2375360d
7
- data.tar.gz: 668964bdc7e265c9b4073ba3a4a37ba59976ba922111a79b1447dd7c796db6d04ec4767377af01d11783b33cffe85baed21140d4b469cd9258f9903d46bd364f
6
+ metadata.gz: 2ada0ec42894766e71866a9421bc344c44efe48c46f7cf93abbd5e24b57e38ac306055ac6ae9af33ccf2c4eca836056e454e4511140df9c623aaf475b72132d8
7
+ data.tar.gz: 8566b7f227854e3ae0bc1d94c124b3284f6d019a0b07e688621a39f1ec489e7b809cec377dac9516ab4a3306898bd1b0c6bbfba5857ea88540924143f19db4fc
@@ -11,20 +11,22 @@ module ApiClientBulkLoader
11
11
  @values_from = values_from
12
12
  @has_one = is_has_one
13
13
  @limit = limit
14
+ end
14
15
 
16
+ def bulk_loader
15
17
  RequestStore.store[:bulk_loader] ||= ApiClientBulkLoader::Client::Loader.new
16
- @bulk_loader = RequestStore.store[:bulk_loader]
18
+ return RequestStore.store[:bulk_loader]
17
19
  end
18
20
 
19
21
  #Fetch.
20
22
  def fetch(values)
21
- results = @bulk_loader.fetch(@resource_model, values, @attribute)
23
+ results = bulk_loader.fetch(@resource_model, values, @attribute)
22
24
  return @has_one ? results.first : results
23
25
  end
24
26
 
25
27
  #Push.
26
28
  def push(values)
27
- @bulk_loader.push(@resource_model, values, @attribute)
29
+ bulk_loader.push(@resource_model, values, @attribute)
28
30
  end
29
31
  end
30
32
  end
@@ -12,19 +12,22 @@ module ApiClientBulkLoader
12
12
  @type_from = type_from
13
13
  @has_one = is_has_one
14
14
  @limit = limit
15
+ end
16
+
17
+ def bulk_loader
15
18
  RequestStore.store[:bulk_loader] ||= ApiClientBulkLoader::Client::Loader.new
16
- @bulk_loader = RequestStore.store[:bulk_loader]
19
+ return RequestStore.store[:bulk_loader]
17
20
  end
18
21
 
19
22
  #Fetch.
20
23
  def fetch(values, resource_type)
21
- results = @bulk_loader.fetch(@resource_translation[resource_type], values, @attribute)
24
+ results = bulk_loader.fetch(@resource_translation[resource_type], values, @attribute)
22
25
  return @has_one ? results.first : results
23
26
  end
24
27
 
25
28
  #Push.
26
29
  def push(values, resource_type)
27
- @bulk_loader.push(@resource_translation[resource_type], values, @attribute)
30
+ bulk_loader.push(@resource_translation[resource_type], values, @attribute)
28
31
  end
29
32
  end
30
33
  end
@@ -1,3 +1,3 @@
1
1
  module ApiClientBulkLoader
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_client_bulk_loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - alex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-14 00:00:00.000000000 Z
11
+ date: 2015-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport