api_consumer_json 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/api_consumer.rb +9 -1
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a377dc011ed9bacc81b601074c9b574f22c5413
4
- data.tar.gz: 30467a2a98a8b60a1f5a9c71694eb579283b6d7b
3
+ metadata.gz: a9ccd807bb4dc859a1f418fe4746a5099d11f2de
4
+ data.tar.gz: c3f91d7e030c201cbe1c588939318f4fdd7b5272
5
5
  SHA512:
6
- metadata.gz: 1b76a9faf5201ac45b48481edad76e3f577e0a046beea320a0d0f1f569a20c6aa90b2e285eb326190ebb509dd104fe2c8b8991fa5325a739594e58eb9aefc172
7
- data.tar.gz: 140869d92a2eac0aae9e1ae0d467f767bc8eb117ef5e9c10fc2e72db6b538595f04668542076ee15184d3bcc5e42e3601b855e598803bcedcacf23cc725a049c
6
+ metadata.gz: 432a2664f7f09ed45f0d6918d25a1f8e60cf79b9a5778e4bae0e5b5d689571f8f155324814bf5511820a5c5b5feb3e4b1c1642aa1de4a6b4b1dc477101e578e2
7
+ data.tar.gz: 218b66f80fdac7a4313b94ad8dc363651753b3769528ee714177d391b0a46a4de27d8b037c1b13dd375881844deae55e0167c0c4a8ac54b57ef9619f91846afb
@@ -58,6 +58,14 @@ class APIConsumer
58
58
  settings[:memcache_hosts]
59
59
  end
60
60
 
61
+ def memcache_settings
62
+ mem_settings = (settings[:memcache_settings] || {})
63
+ mem_settings.keys.each do |key|
64
+ mem_settings[(key.to_sym rescue key) || key] = mem_settings.delete(key)
65
+ end
66
+ mem_settings
67
+ end
68
+
61
69
  def set(key, val)
62
70
  settings[key] = val
63
71
  end
@@ -154,7 +162,7 @@ class APIConsumer
154
162
  end
155
163
 
156
164
  def cache
157
- @cache ||= UberCache.new(settings[:cache_prefix], settings[:memcache_hosts])
165
+ @cache ||= UberCache.new(settings[:cache_prefix], settings[:memcache_hosts], memcache_settings)
158
166
  end
159
167
 
160
168
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_consumer_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Reister
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-06 00:00:00.000000000 Z
11
+ date: 2017-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uber_cache
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: 0.0.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.0'
26
+ version: 0.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.6.10
83
+ rubygems_version: 2.6.11
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Consume all the APIs