twitter_with_auto_pagination 0.9.5 → 0.9.6

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
- SHA1:
3
- metadata.gz: adeef994e42b9c1f9918c03e3bbb9fc01bc9589b
4
- data.tar.gz: 8632de6d1cb4862d10993a393e29a929ff4512ca
2
+ SHA256:
3
+ metadata.gz: e10cccf828fe2d848ab597c2e3ad64122125dc447bacc62c3be5d461e3414b0b
4
+ data.tar.gz: cd7cd12eb50bbf7d904b8244bc2f4605f9c05caeeb794adacdc11eaf6ba83ac5
5
5
  SHA512:
6
- metadata.gz: e13248d55c2f853622545a24e49b8803f08d21cb8fb0dee51e82d84ba8c775519fd1e32b3f9b309b6ce453eee70bfa0d7dfdd7ba338e8cb7759be5b028aab11a
7
- data.tar.gz: a894177e7ae82b9c4f808f5643a931553b0be253dcc33848f28ba4a906deece0aa388e4c741e04515ce226fb7bf1078578ea5e8a81f78918b4f499936a99f0ff
6
+ metadata.gz: 7ec140983659d1b610080afaa5a584f6a6f9753fd9edf7f0885ba46210b7885bef927e3ac8ceb0137c30bf4a46dde5ca50b21076ce687609e1cb5fb82d229e89
7
+ data.tar.gz: fc890d9d6332aaa9bf65b2c8d266536e43a5c2805f1576bc363797806fb5d0be69cdfac007fa415f18244aa3ab11172a0fbec157ae1e11c93d7848dea30cc3be
@@ -11,8 +11,10 @@ module TwitterWithAutoPagination
11
11
 
12
12
  def_delegators :@client, :clear, :cleanup
13
13
 
14
- def initialize
15
- path = File.join('tmp', 'twitter_cache')
14
+ def initialize(*args)
15
+ options = args.extract_options!
16
+
17
+ path = options['cache_dir'] || options[:cache_dir] || File.join('tmp', 'twitter_cache')
16
18
  Dir.mkdir(path) unless File.exists?(path)
17
19
  @client = ActiveSupport::Cache::FileStore.new(path, expires_in: 1.hour, race_condition_ttl: 5.minutes)
18
20
  end
@@ -24,7 +24,7 @@ module TwitterWithAutoPagination
24
24
  def initialize(*args)
25
25
  options = args.extract_options!
26
26
 
27
- @cache = TwitterWithAutoPagination::Cache.new
27
+ @cache = TwitterWithAutoPagination::Cache.new(options)
28
28
  Logging.logger = logger = TwitterWithAutoPagination::Logger.new(options)
29
29
 
30
30
  unless subscriber_attached?
@@ -2,8 +2,8 @@ lib = File.expand_path('../lib', __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
- spec.add_dependency 'twitter', '~> 6.0'
6
- spec.add_dependency 'activesupport'
5
+ spec.add_dependency 'twitter', '~> 6.2.0'
6
+ spec.add_dependency 'activesupport', '< 5.0.0'
7
7
  spec.add_dependency 'parallel'
8
8
 
9
9
  spec.add_development_dependency 'bundler'
@@ -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.9.5'
24
+ spec.version = '0.9.6'
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.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinohara Teruki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: 6.2.0
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: '6.0'
26
+ version: 6.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 5.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "<"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 5.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: parallel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -132,18 +132,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.5.1
135
+ rubygems_version: 2.7.3
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Add auto paginate feature to Twitter gem.
139
139
  test_files:
140
- - spec/helper.rb
141
- - spec/twitter_with_auto_pagination/cache_spec.rb
142
140
  - spec/twitter_with_auto_pagination/client_spec.rb
143
- - spec/twitter_with_auto_pagination/parallel_spec.rb
144
141
  - spec/twitter_with_auto_pagination/rest/favorites_spec.rb
142
+ - spec/twitter_with_auto_pagination/rest/timelines_spec.rb
143
+ - spec/twitter_with_auto_pagination/rest/search_spec.rb
145
144
  - spec/twitter_with_auto_pagination/rest/friends_and_followers_spec.rb
146
145
  - spec/twitter_with_auto_pagination/rest/lists_spec.rb
147
- - spec/twitter_with_auto_pagination/rest/search_spec.rb
148
- - spec/twitter_with_auto_pagination/rest/timelines_spec.rb
149
146
  - spec/twitter_with_auto_pagination/rest/users_spec.rb
147
+ - spec/twitter_with_auto_pagination/cache_spec.rb
148
+ - spec/twitter_with_auto_pagination/parallel_spec.rb
149
+ - spec/helper.rb