twitter_with_auto_pagination 0.8.9 → 0.8.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: 1c58523412b513e538fc1b184026dbe03a3c8d66
4
- data.tar.gz: 7ec3c80b9615c90a04d01a39b1550afda3d9115d
3
+ metadata.gz: eb92903cd356cc3a2e573600f5360bdcbee36b58
4
+ data.tar.gz: 665e727c7a707d1e034423008c96497801a2fd22
5
5
  SHA512:
6
- metadata.gz: 6258c081d6c2745cbc5e917e9f4e39886eca6fb1b8aa2aad9e2f91e6c2a7b77555092a15eba50fc8279223251614e62b3ec4e04c85dc8ae610c29584ee89f837
7
- data.tar.gz: fa959db4a3e3eec7e9a43501185d42a1e7f39807ffc7cd9b2177928c92909db660aa00029bf4203f32e1cfd4b708630fb6e509fdf059a5f4ca9317e78f731e5e
6
+ metadata.gz: c897c8db06c84858332329680f9a526bf6e6483191894d511920923ebd2192ac3961575c22fa2f067bb7d7a7389403d64a4e561e500ee3ffb2fc7a94836f7e8a
7
+ data.tar.gz: 8243470f15fe20adcb12347e2e1b1edd52230f00d3ec763a076840a358f7d8a699add0440b06aab4bb63b5a63331d888f926c2f17ad9d9f46a619eb79846421a
@@ -116,20 +116,13 @@ module TwitterWithAutoPagination
116
116
  end
117
117
  end
118
118
 
119
- def usage_stats(user, options = {})
120
- n_days_ago = options.has_key?(:days) ? options[:days].days.ago : 100.years.ago
121
- tweets = options.has_key?(:tweets) ? options.delete(:tweets) : user_timeline(user)
122
- day_names = options.has_key?(:day_names) ? options.delete(:day_names) : %w(Sun Mon Tue Wed Thu Fri Sat)
123
- times =
124
- # TODO Use user specific time zone
125
- tweets.map { |t| ActiveSupport::TimeZone['Tokyo'].parse(t.created_at.to_s) }.
126
- select { |t| t > n_days_ago }
119
+ def usage_stats(tweet_times, day_names: %w(Sun Mon Tue Wed Thu Fri Sat))
127
120
  [
128
- usage_stats_wday_series_data(times, day_names: day_names),
129
- usage_stats_wday_drilldown_series(times, day_names: day_names),
130
- usage_stats_hour_series_data(times),
131
- usage_stats_hour_drilldown_series(times, day_names: day_names),
132
- twitter_addiction_series(times, day_names: day_names)
121
+ usage_stats_wday_series_data(tweet_times, day_names: day_names),
122
+ usage_stats_wday_drilldown_series(tweet_times, day_names: day_names),
123
+ usage_stats_hour_series_data(tweet_times),
124
+ usage_stats_hour_drilldown_series(tweet_times, day_names: day_names),
125
+ twitter_addiction_series(tweet_times, day_names: day_names)
133
126
  ]
134
127
  end
135
128
  end
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = '>= 2.3'
23
23
  spec.summary = spec.description
24
24
  spec.test_files = Dir.glob('spec/**/*')
25
- spec.version = '0.8.9'
25
+ spec.version = '0.8.10'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_with_auto_pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.9
4
+ version: 0.8.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinohara Teruki