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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6373a02a1ea05e0096cdffb9398f175e7f7a9f2
4
- data.tar.gz: 12bbee7bc87e4bf0c0765e54f13cf0347d107a48
3
+ metadata.gz: b1260735d1dce2e00d66d4817e292d2fee9f047b
4
+ data.tar.gz: c0b26d8442c0a2c629a80f68c437c87562a6a0ee
5
5
  SHA512:
6
- metadata.gz: 259a3972322175046a8a85256a15870532656e1a482e33d6f2da79089fdbc3421a195da343a9fac062d7a8df8a771e30393fac69db859d911e44571eb0cb2f38
7
- data.tar.gz: 07da5186868e2f7ba9fd86131872d2b7d310b1522e581b4949bd1b08a0c4e429bea6ba9a88bce9cc1782237b8c658eee47fef88dc9d6eb5b0ea110c39963fbf2
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.0...master)
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
 
@@ -1,3 +1,3 @@
1
1
  module TweetSanitizer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -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.0
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-15 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: twitter