zooniverse_social 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zooniverse_social/tweets.rb +6 -1
- data/lib/zooniverse_social/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13a2b48e21b016642a4fc5ee321082084e424f93
|
4
|
+
data.tar.gz: 90908c8d750ae473e6951f088a244e7b44778fe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6af3d0f32ac2faf03c188bb314b2ebf0fbd4e71d04f96ca2446765aad13d17e9bf3c25d1530e15504699d11b0190848697c17dcd6210451cbeaeb2dbc009ad83
|
7
|
+
data.tar.gz: f55785f82c04bf4a199a57772f99bd502e181e92332b4793e5a3d4ab9ba5fed4678a692b72ff475d53a3e2aeaffaf149e70b4fc9549efcae58049725d8934df3
|
@@ -14,7 +14,12 @@ module ZooniverseSocial
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def update
|
17
|
-
@data = @twitter.search('from:the_zooniverse', result_type: 'recent').take(3).collect
|
17
|
+
@data = @twitter.search('from:the_zooniverse', result_type: 'recent').take(3).collect do |tweet|
|
18
|
+
tweet.to_h.tap do |hash|
|
19
|
+
appended = hash.dig :entities, :urls, 0, :url
|
20
|
+
hash[:text].sub!(/\s?#{ appended }/, '') if appended
|
21
|
+
end
|
22
|
+
end
|
18
23
|
end
|
19
24
|
end
|
20
25
|
end
|