twitter_with_auto_pagination 0.6.0 → 0.6.1

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: 718b616d5623cdcfd441b040ecf996b6ba3ff645
4
- data.tar.gz: 88946bcb845dbd0cce43cb86a95206366b84db18
3
+ metadata.gz: 436a4c5d15eafb06efea5e5e4e54a683b78e968b
4
+ data.tar.gz: aaaf0b5f03e2fc0e099c08908857b841d78187e5
5
5
  SHA512:
6
- metadata.gz: 1e94cf293a193b666e3f5e886fb95622aa39c8d2e3459a8a3ccebd8f877033f43b981b0edd0301d78df61d0fe4e029273db4e74b5a22940b10d6cbd055fc7679
7
- data.tar.gz: 2eee266b6c0e62efa85e8673ec3b136190fcecee553e83d42e59db4e5b5b3cb506b1c8ff7a112f27faed4a1bd6ecb1b5158be27c664cb7992f31f1f0ab431783
6
+ metadata.gz: a7faf5a3caae51d5aaf175bd6bade11c55400c6d44e2c00d0e64eaf7ff30e4434650ab4e6ad5e904a0f0b38fe901035333d288e08f06967757f4e709c3dc2cfe
7
+ data.tar.gz: b8b1c1d3330d30b4742db0e58db7b3f2d38b2c8d1b7ffa2c3f0053413661ccee0bf263b423de58b821b568f986ca53aea98e36deb193cbb7e380c0e646e5ed3e
@@ -245,31 +245,31 @@ module TwitterWithAutoPagination
245
245
  max: options.has_key?(:max) ? options.delete(:max) : 1000
246
246
  }
247
247
 
248
- _replying, _replied, _favoriting =
248
+ _users_which_you_replied_to, _users_who_replied_to_you, _users_which_you_faved =
249
249
  if args.empty?
250
- [replying(options), replied(options), favoriting(options)]
250
+ [users_which_you_replied_to(options), users_who_replied_to_you(options), users_which_you_faved(options)]
251
251
  elsif uid_or_screen_name?(args[0])
252
- [replying(args[0], options), replied(args[0], options), favoriting(args[0], options)]
253
- elsif (m_names = %i(replying replied favoriting)).all? { |m_name| args[0].respond_to?(m_name) }
252
+ [users_which_you_replied_to(args[0], options), users_who_replied_to_you(args[0], options), users_which_you_faved(args[0], options)]
253
+ elsif (m_names = %i(users_which_you_replied_to users_who_replied_to_you users_which_you_faved)).all? { |m_name| args[0].respond_to?(m_name) }
254
254
  m_names.map { |mn| args[0].send(mn) }
255
255
  else
256
256
  raise
257
257
  end
258
258
 
259
- _users = _replying + _replied + _favoriting
259
+ _users = _users_which_you_replied_to + _users_who_replied_to_you + _users_which_you_faved
260
260
  return [] if _users.empty?
261
261
 
262
262
  scores = _count_users_with_two_sided_threshold(_users, min_max)
263
- replying_scores = _count_users_with_two_sided_threshold(_replying, min_max)
264
- replied_scores = _count_users_with_two_sided_threshold(_replied, min_max)
265
- favoriting_scores = _count_users_with_two_sided_threshold(_favoriting, min_max)
263
+ users_which_you_replied_to_scores = _count_users_with_two_sided_threshold(_users_which_you_replied_to, min_max)
264
+ users_who_replied_to_you_scores = _count_users_with_two_sided_threshold(_users_who_replied_to_you, min_max)
265
+ users_which_you_faved_scores = _count_users_with_two_sided_threshold(_users_which_you_faved, min_max)
266
266
 
267
267
  scores.keys.map { |uid| _users.find { |u| u.id.to_i == uid.to_i } }.
268
268
  map do |u|
269
269
  u[:score] = scores[u.id]
270
- u[:replying_score] = replying_scores[u.id]
271
- u[:replied_score] = replied_scores[u.id]
272
- u[:favoriting_score] = favoriting_scores[u.id]
270
+ u[:users_which_you_replied_to_score] = users_which_you_replied_to_scores[u.id]
271
+ u[:users_who_replied_to_you_score] = users_who_replied_to_you_scores[u.id]
272
+ u[:users_which_you_faved_score] = users_which_you_faved_scores[u.id]
273
273
  u
274
274
  end
275
275
  end
@@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = %w[lib]
22
22
  spec.summary = spec.description
23
23
  spec.test_files = Dir.glob('spec/**/*')
24
- spec.version = '0.6.0'
24
+ spec.version = '0.6.1'
25
25
  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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinohara Teruki