tweet_sanitizer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +1 -1
- data/lib/tweet_sanitizer/version.rb +1 -1
- data/lib/tweet_sanitizer.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1260735d1dce2e00d66d4817e292d2fee9f047b
|
4
|
+
data.tar.gz: c0b26d8442c0a2c629a80f68c437c87562a6a0ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1e79f701eb86fe751dd0f1df9de6853e2482de756acb27361798644e7dd5a07b7296e4d2d63bb654b2f17d9f5790a52852f94620b3a94108100e919b9b00ad0
|
7
|
+
data.tar.gz: 22e8583b42b7e1b1dc94f7c87b74eeb939484c4ae31199ea91ab55d96cd92f447e3ddb6875b3e06ccec489eda210724fd65f990934ef60de02218fb36902a92d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](https://github.com/sue445/tweet_sanitizer/compare/v0.1.
|
2
|
+
[full changelog](https://github.com/sue445/tweet_sanitizer/compare/v0.1.1...master)
|
3
|
+
|
4
|
+
## v0.1.1
|
5
|
+
[full changelog](https://github.com/sue445/tweet_sanitizer/compare/v0.1.0...v0.1.1)
|
6
|
+
|
7
|
+
* Use original tweet instead of RT
|
8
|
+
* https://github.com/sue445/tweet_sanitizer/pull/10
|
3
9
|
|
4
10
|
## v0.1.0
|
5
11
|
* first release
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ vi .env
|
|
76
76
|
```
|
77
77
|
|
78
78
|
```ruby
|
79
|
-
[1] pry(main)> @client.status("https://twitter.com/sue445/status/896748477262082049")
|
79
|
+
[1] pry(main)> @client.status("https://twitter.com/sue445/status/896748477262082049", tweet_mode: "extended")
|
80
80
|
=> #<Twitter::Tweet id=896748477262082049>
|
81
81
|
```
|
82
82
|
|
data/lib/tweet_sanitizer.rb
CHANGED
@@ -6,6 +6,9 @@ module TweetSanitizer
|
|
6
6
|
# @param tweet [Twitter:Tweet]
|
7
7
|
# @return [String]
|
8
8
|
def self.sanitize(tweet)
|
9
|
+
# Original RT status is exists in retweeted_status
|
10
|
+
tweet = Twitter::Tweet.new(tweet.attrs[:retweeted_status]) if tweet.attrs[:retweeted_status]
|
11
|
+
|
9
12
|
text = expand_urls_text(tweet)
|
10
13
|
text = remove_media_urls_in_tweet(tweet, text)
|
11
14
|
text = CGI.unescapeHTML(text)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweet_sanitizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter
|