twitter_with_auto_pagination 0.14.0 → 0.15.0

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
  SHA256:
3
- metadata.gz: 69da079c4add77431e42fe20bc51b636acbf06bf2ca309043f5a7fcba36a15b7
4
- data.tar.gz: 76664f7078549527d17086d4f13811aa494184521a9e755f0e4a5f07081aa4b7
3
+ metadata.gz: 70969b66bf420f0f456b60bf2dae86b57cf77174cacfa6907500fabdd05fa10b
4
+ data.tar.gz: c098f38ba2640c493157ac7d4c0376647b3bbe41f1d2348c78c6dd4667607080
5
5
  SHA512:
6
- metadata.gz: 4d503d8c44b124959a829a1a223d2d3a2ac450c70e1ca97b352f0d5d1c1fec02092f4932a3e3674fc829c4a60063bc0fdaa99851b1b28b1895e70dece1afd663
7
- data.tar.gz: 52d22fd58cceb35ac6f93c6ec8ef39b98c24230701f681c0721d76875edd71df7939510995152e2835cc7e0bf06d5905494ec669148709cc328062bc3c4e7982
6
+ metadata.gz: 012c90d89169a059f4ea3eb026b38f8cbfb51d31d2baf61395d688ed2fea17ca72adf1e82a189b35d40d19d0a21bcef33fc2c8eb01fff9c733a3fc67a1d57949
7
+ data.tar.gz: 36fc45fc9ceb42380a787df093def564c928dcd179338180ff77b1c3f31527a2be6c338a477a9284a5d733b57ef8244f36116d48c713cd747f36003778001f33
@@ -14,10 +14,14 @@ module TwitterWithAutoPagination
14
14
  def initialize(*args)
15
15
  options = args.extract_options!
16
16
 
17
- path = options['cache_dir'] || options[:cache_dir] || File.join('tmp', 'twitter_cache')
18
- ttl = options['cache_ttl'] || options[:cache_ttl] || 1.hour
19
- Dir.mkdir(path) unless File.exists?(path)
20
- @client = ActiveSupport::Cache::FileStore.new(path, expires_in: ttl, race_condition_ttl: 5.minutes)
17
+ if options['cache_store']
18
+ @client = options['cache_store']
19
+ else
20
+ path = options['cache_dir'] || options[:cache_dir] || File.join('tmp', 'twitter_cache')
21
+ ttl = options['cache_ttl'] || options[:cache_ttl] || 1.hour
22
+ Dir.mkdir(path) unless File.exists?(path)
23
+ @client = ActiveSupport::Cache::FileStore.new(path, expires_in: ttl, race_condition_ttl: 5.minutes)
24
+ end
21
25
  end
22
26
 
23
27
  def fetch(method, user, options = {}, &block)
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = '>= 2.3'
22
22
  spec.summary = spec.description
23
23
  spec.test_files = Dir.glob('spec/**/*')
24
- spec.version = '0.14.0'
24
+ spec.version = '0.15.0'
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_with_auto_pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinohara Teruki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2020-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter