slack_twitter_egosa 1.0.2 → 1.0.3

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: 42e5bc0079a33413f3e58326eee6452d9de8345342519417961c0f11776887c6
4
- data.tar.gz: 99973e86266e52c20187009bd12384e4bb2298018707ea8fe07e46c1beac9383
3
+ metadata.gz: a1d6bc6e15e4e5d0d0c7f58eb941f0d811f69c2025382ca91e41db5091b80ab5
4
+ data.tar.gz: 4c8ee7c3ada2ce6882448b8488dd71055ee6902f488b244babf6b063529ac456
5
5
  SHA512:
6
- metadata.gz: 6aa30a4255bca9f190e247cdb68ea71b48d75c664183ac808e2b417f331261e0673d1fc9beba2614315aef7da9360dff1d44ba5815702eabc94ce631e6663ae5
7
- data.tar.gz: 0762ddb7777ecfca66748b34636fae2f8f21ac3091be9b674c2ba632a40556876a1eeee0a19ef8b0ea7047395abec6513950956c23b295f91f7f4d64e55eaff2
6
+ metadata.gz: 30b2a68998e935b64d530b5c6f6ef845aaa21b32660773fb8c35ddd822f6c54e1de872614459e9979f41fec639fa379e22d394a751a638836c5e1903f8481b43
7
+ data.tar.gz: f8f416bf8a1e6ffa4f827cdc8e2ed628682f04cdcb2f4d2f06aa5147ffef3fda060abcd48123974aa7cafadccb30df085b8baee3dfe746e0f5b2cf497835aa43
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'slack_twitter_egosa/version'
2
4
  require 'slack_twitter_egosa/slack_poster'
3
5
  require 'slack_twitter_egosa/word_manager'
@@ -66,11 +68,6 @@ module SlackTwitterEgosa
66
68
  end
67
69
 
68
70
  def match_on_home_timeline?(status)
69
- if status.retweet?
70
- status = status.retweeted_status
71
- return false if status.user.following?
72
- end
73
-
74
71
  mute_users.unmatch?(status.user.screen_name) && home_timeline_words.match?(CGI.unescapeHTML(status.attrs[:full_text]))
75
72
  end
76
73
 
@@ -94,6 +91,11 @@ module SlackTwitterEgosa
94
91
  next unless before_home_timeline_since_id
95
92
 
96
93
  statuses.reverse_each do |status|
94
+ if status.retweet?
95
+ status = status.retweeted_status
96
+ next if status.user.following?
97
+ end
98
+
97
99
  poster.post_status(status) if match_on_home_timeline?(status)
98
100
  end
99
101
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'slack/poster'
2
4
 
3
5
  class SlackPoster
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class UserFilter
2
4
  attr_reader :mute_users
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SlackTwitterEgosa
2
- VERSION = '1.0.2'.freeze
4
+ VERSION = '1.0.3'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class WordManager
2
4
  attr_reader :target, :exclude
3
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_twitter_egosa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - abcang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-26 00:00:00.000000000 Z
11
+ date: 2018-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv