twitter 4.6.1 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +7 -1
- data/README.md +1 -1
- data/lib/twitter/base.rb +1 -7
- data/lib/twitter/search_results.rb +6 -0
- data/lib/twitter/tweet.rb +9 -9
- data/lib/twitter/version.rb +1 -1
- data/spec/twitter/base_spec.rb +0 -5
- data/spec/twitter/search_results_spec.rb +15 -0
- data/spec/twitter/tweet_spec.rb +12 -0
- metadata +28 -44
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 43e71cbb5e79156a7a79f74e460db593730894fa
|
|
4
|
+
data.tar.gz: 60420417eb25d17246d2b4e39864b54cbb6c8732
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 50730023660f01809773b2a9a91a3c8bbe295374320b43994377cddf5cf7acdd90d5d107ad0ab6aafb9c18100eb260306ae61cdda283610a86853087c904dbce
|
|
7
|
+
data.tar.gz: c84cdd2b416aa7e33a24671c676d01e516800c982224e1274bbac9e224bcd5028f77d5b177ce0ad6920a62da110419c866b5ca9b6f8e5ff943ca2427edcb3ee7
|
checksums.yaml.gz.sig
ADDED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
4.6.2
|
|
2
|
+
-----
|
|
3
|
+
* [Fix `SystemStackError: stack level too deep` when converting to JSON](https://github.com/sferik/twitter/issues/368)
|
|
4
|
+
* [Add `Twitter::Tweet#favorite_count`](https://github.com/sferik/twitter/commit/de8a356d0d5e757bfe383b58744efa1c2d842b79)
|
|
5
|
+
* [Add `Twitter::SearchResults#next_results?`](https://github.com/sferik/twitter/commit/d951db4bdaa1ef72383f2026ec6236a289ee9074) ([@KentonWhite](https://twitter.com/KentonWhite))
|
|
6
|
+
|
|
1
7
|
4.6.1
|
|
2
8
|
-----
|
|
3
9
|
* [Convert nested classes in `Twitter::Base#attrs`](https://github.com/sferik/twitter/commit/e56c34c640189eb8b25a16994676a5e82b783cb3) ([@anno](https://twitter.com/anno))
|
|
@@ -6,7 +12,7 @@
|
|
|
6
12
|
-----
|
|
7
13
|
* [Make `Twitter::Base#attrs` call methods if they exist](https://github.com/sferik/twitter/commit/ff4f2daccd1acdfddcea7139d4dd6490b55129db)
|
|
8
14
|
* [Allow `Twitter::API::Tweets#oembed` and `Twitter::API::Tweets#oembeds` to take a URL](https://github.com/sferik/twitter/commit/0d986fa4b0c254e8c816bce086c3f6648d8fd3d7) ([@bshelton229](https://twitter.com/bshelton229))
|
|
9
|
-
* [Add `Twitter::Tweet#filter_level` and `Twitter
|
|
15
|
+
* [Add `Twitter::Tweet#filter_level` and `Twitter::Tweet#lang` attribute readers](https://github.com/sferik/twitter/commit/283aafbe1219e55f19a76517d9edce497001fca2)
|
|
10
16
|
* [Add "Quick Start Guide" to the `README`](https://github.com/sferik/twitter/commit/afc24ee1bd07f19ef7fb8fd6b85aede34f3ab156) ([@coreyhaines](https://twitter.com/coreyhaines))
|
|
11
17
|
|
|
12
18
|
4.5.0
|
data/README.md
CHANGED
|
@@ -77,7 +77,7 @@ this library.
|
|
|
77
77
|
## Mailing List
|
|
78
78
|
Please direct questions about this library to the [mailing list].
|
|
79
79
|
|
|
80
|
-
[mailing list]: https://groups.google.com/group/ruby-
|
|
80
|
+
[mailing list]: https://groups.google.com/group/twitter-ruby-gem
|
|
81
81
|
|
|
82
82
|
## Apps Wiki
|
|
83
83
|
Does your project or organization use this gem? Add it to the [apps
|
data/lib/twitter/base.rb
CHANGED
|
@@ -93,13 +93,7 @@ module Twitter
|
|
|
93
93
|
#
|
|
94
94
|
# @return [Hash]
|
|
95
95
|
def attrs
|
|
96
|
-
@attrs
|
|
97
|
-
if value.respond_to?(:attrs)
|
|
98
|
-
attrs.merge!(key => value.attrs)
|
|
99
|
-
else
|
|
100
|
-
attrs.merge!(key => respond_to?(key) ? send(key) : value)
|
|
101
|
-
end
|
|
102
|
-
end
|
|
96
|
+
@attrs
|
|
103
97
|
end
|
|
104
98
|
alias to_hash attrs
|
|
105
99
|
|
|
@@ -46,6 +46,12 @@ module Twitter
|
|
|
46
46
|
def since_id
|
|
47
47
|
@attrs[:search_metadata][:since_id] if search_metadata?
|
|
48
48
|
end
|
|
49
|
+
|
|
50
|
+
# @return [Boolean]
|
|
51
|
+
def next_results?
|
|
52
|
+
!@attrs[:search_metadata][:next_results].nil? if search_metadata?
|
|
53
|
+
end
|
|
54
|
+
alias next_page? next_results?
|
|
49
55
|
|
|
50
56
|
end
|
|
51
57
|
end
|
data/lib/twitter/tweet.rb
CHANGED
|
@@ -8,11 +8,16 @@ module Twitter
|
|
|
8
8
|
extend Forwardable
|
|
9
9
|
include Twitter::Creatable
|
|
10
10
|
include Twitter::Exceptable
|
|
11
|
-
attr_reader :favorited, :favoriters, :from_user_id,
|
|
12
|
-
:
|
|
13
|
-
:in_reply_to_user_id, :lang, :repliers,
|
|
14
|
-
:
|
|
11
|
+
attr_reader :favorite_count, :favorited, :favoriters, :from_user_id,
|
|
12
|
+
:from_user_name, :in_reply_to_screen_name, :in_reply_to_attrs_id,
|
|
13
|
+
:in_reply_to_status_id, :in_reply_to_user_id, :lang, :repliers,
|
|
14
|
+
:retweeted, :retweeters, :source, :text, :to_user, :to_user_id,
|
|
15
|
+
:to_user_name, :truncated
|
|
15
16
|
alias in_reply_to_tweet_id in_reply_to_status_id
|
|
17
|
+
alias favorites_count favorite_count
|
|
18
|
+
alias favourite_count favorite_count
|
|
19
|
+
alias favourites_count favorite_count
|
|
20
|
+
alias favouriters_count favorite_count
|
|
16
21
|
alias favourited favorited
|
|
17
22
|
alias favourited? favorited?
|
|
18
23
|
alias favouriters favoriters
|
|
@@ -28,11 +33,6 @@ module Twitter
|
|
|
28
33
|
favoriters_count = @attrs[:favoriters_count]
|
|
29
34
|
favoriters_count.to_i if favoriters_count
|
|
30
35
|
end
|
|
31
|
-
alias favorite_count favoriters_count
|
|
32
|
-
alias favorites_count favoriters_count
|
|
33
|
-
alias favourite_count favoriters_count
|
|
34
|
-
alias favourites_count favoriters_count
|
|
35
|
-
alias favouriters_count favoriters_count
|
|
36
36
|
|
|
37
37
|
# @return [String]
|
|
38
38
|
def from_user
|
data/lib/twitter/version.rb
CHANGED
|
@@ -2,7 +2,7 @@ module Twitter
|
|
|
2
2
|
class Version
|
|
3
3
|
MAJOR = 4 unless defined? Twitter::Version::MAJOR
|
|
4
4
|
MINOR = 6 unless defined? Twitter::Version::MINOR
|
|
5
|
-
PATCH =
|
|
5
|
+
PATCH = 2 unless defined? Twitter::Version::PATCH
|
|
6
6
|
PRE = nil unless defined? Twitter::Version::PRE
|
|
7
7
|
|
|
8
8
|
class << self
|
data/spec/twitter/base_spec.rb
CHANGED
|
@@ -112,11 +112,6 @@ describe Twitter::Base do
|
|
|
112
112
|
it 'returns a hash of attributes' do
|
|
113
113
|
expect(Twitter::Base.new(:id => 1).attrs).to eq({:id => 1})
|
|
114
114
|
end
|
|
115
|
-
|
|
116
|
-
it 'converts nested classes' do
|
|
117
|
-
base = Twitter::Base.new(:id => 2, :user => Twitter::User.new(:id => 4))
|
|
118
|
-
expect(base.attrs).to eq({:id => 2, :user => {:id => 4}})
|
|
119
|
-
end
|
|
120
115
|
end
|
|
121
116
|
|
|
122
117
|
end
|
|
@@ -96,5 +96,20 @@ describe Twitter::SearchResults do
|
|
|
96
96
|
expect(since_id).to be_nil
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
|
+
|
|
100
|
+
describe "#next_results?" do
|
|
101
|
+
it "returns true when next_results is set" do
|
|
102
|
+
next_results = Twitter::SearchResults.new(:search_metadata => {:next_results => "?"}).next_results?
|
|
103
|
+
expect(next_results).to be_true
|
|
104
|
+
end
|
|
105
|
+
it "returns false when next_results is not set" do
|
|
106
|
+
next_results = Twitter::SearchResults.new(:search_metadata => {}).next_results?
|
|
107
|
+
expect(next_results).to be_false
|
|
108
|
+
end
|
|
109
|
+
it "returns false is search_metadata is not set" do
|
|
110
|
+
next_results = Twitter::SearchResults.new().next_results?
|
|
111
|
+
expect(next_results).to be_false
|
|
112
|
+
end
|
|
113
|
+
end
|
|
99
114
|
|
|
100
115
|
end
|
data/spec/twitter/tweet_spec.rb
CHANGED
|
@@ -69,6 +69,18 @@ describe Twitter::Tweet do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe "#filter_level" do
|
|
73
|
+
it "returns the filter level when filter_level is set" do
|
|
74
|
+
tweet = Twitter::Tweet.new(:id => 28669546014, :filter_level => 'high')
|
|
75
|
+
expect(tweet.filter_level).to be_a String
|
|
76
|
+
expect(tweet.filter_level).to eq "high"
|
|
77
|
+
end
|
|
78
|
+
it "returns \"none\" when not set" do
|
|
79
|
+
tweet = Twitter::Tweet.new(:id => 28669546014)
|
|
80
|
+
expect(tweet.filter_level).to eq "none"
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
72
84
|
describe "#full_text" do
|
|
73
85
|
it "returns the text of a Tweet" do
|
|
74
86
|
tweet = Twitter::Tweet.new(:id => 28669546014, :text => 'BOOSH')
|
metadata
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twitter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.6.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 4.6.2
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- John Nunemaker
|
|
@@ -13,39 +12,32 @@ authors:
|
|
|
13
12
|
autorequire:
|
|
14
13
|
bindir: bin
|
|
15
14
|
cert_chain:
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
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y60JXIJBBgPcDK/KCP4NUHofm0jfoYD+H5uNJfHCNq7/ZsTxOtE3Ra92s0BCMTpm
|
|
24
|
+
wBMMlWR5MtdEhIYuBO4XhnejYgH0L/7BL2lymntVnsr/agdQoojQCN1IQmsRJvrR
|
|
25
|
+
duZRO3tZvoIo1pBc4JEehDuqCeyBgPLOqMoKtQlold1TQs1kWUBK7KWMFEhKC/Kg
|
|
26
|
+
zyzKRHQo9yDYwOvYngoBLY+T/lwCT4dyssdhzRbfnxAhaKu4SAssIwaC01yVowID
|
|
27
|
+
AQABozkwNzAJBgNVHRMEAjAAMB0GA1UdDgQWBBS0ruDfRak5ci1OpDNX/ZdDEkIs
|
|
28
|
+
iTALBgNVHQ8EBAMCBLAwDQYJKoZIhvcNAQEFBQADggEBAHHSMs/MP0sOaLkEv4Jo
|
|
29
|
+
zvkm3qn5A6t0vaHx774cmejyMU+5wySxRezspL7ULh9NeuK2OhU+Oe3TpqrAg5TK
|
|
30
|
+
R8GQILnVu2FemGA6sAkPDlcPtgA6ieI19PZOF6HVLmc/ID/dP/NgZWWzEeqQKmcK
|
|
31
|
+
2+HM+SEEDhZkScYekw4ZOe164ZtZG816oAv5x0pGitSIkumUp7V8iEZ/6ehr7Y9e
|
|
32
|
+
XOg4eeun5L/JjmjARoW2kNdvkRD3c2EeSLqWvQRsBlypHfhs6JJuLlyZPGhU3R/v
|
|
33
|
+
Sf3lVKpBCWgRpGTvy45XVpB+59y33PJmEuQ1PTEOYvQyao9UKMAAaAN/7qWQtjl0
|
|
34
|
+
hlw=
|
|
35
|
+
-----END CERTIFICATE-----
|
|
36
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
|
44
37
|
dependencies:
|
|
45
38
|
- !ruby/object:Gem::Dependency
|
|
46
39
|
name: faraday
|
|
47
40
|
requirement: !ruby/object:Gem::Requirement
|
|
48
|
-
none: false
|
|
49
41
|
requirements:
|
|
50
42
|
- - ~>
|
|
51
43
|
- !ruby/object:Gem::Version
|
|
@@ -56,7 +48,6 @@ dependencies:
|
|
|
56
48
|
type: :runtime
|
|
57
49
|
prerelease: false
|
|
58
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
59
|
-
none: false
|
|
60
51
|
requirements:
|
|
61
52
|
- - ~>
|
|
62
53
|
- !ruby/object:Gem::Version
|
|
@@ -67,7 +58,6 @@ dependencies:
|
|
|
67
58
|
- !ruby/object:Gem::Dependency
|
|
68
59
|
name: multi_json
|
|
69
60
|
requirement: !ruby/object:Gem::Requirement
|
|
70
|
-
none: false
|
|
71
61
|
requirements:
|
|
72
62
|
- - ~>
|
|
73
63
|
- !ruby/object:Gem::Version
|
|
@@ -75,7 +65,6 @@ dependencies:
|
|
|
75
65
|
type: :runtime
|
|
76
66
|
prerelease: false
|
|
77
67
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
none: false
|
|
79
68
|
requirements:
|
|
80
69
|
- - ~>
|
|
81
70
|
- !ruby/object:Gem::Version
|
|
@@ -83,7 +72,6 @@ dependencies:
|
|
|
83
72
|
- !ruby/object:Gem::Dependency
|
|
84
73
|
name: simple_oauth
|
|
85
74
|
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
none: false
|
|
87
75
|
requirements:
|
|
88
76
|
- - ~>
|
|
89
77
|
- !ruby/object:Gem::Version
|
|
@@ -91,7 +79,6 @@ dependencies:
|
|
|
91
79
|
type: :runtime
|
|
92
80
|
prerelease: false
|
|
93
81
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
none: false
|
|
95
82
|
requirements:
|
|
96
83
|
- - ~>
|
|
97
84
|
- !ruby/object:Gem::Version
|
|
@@ -99,7 +86,6 @@ dependencies:
|
|
|
99
86
|
- !ruby/object:Gem::Dependency
|
|
100
87
|
name: bundler
|
|
101
88
|
requirement: !ruby/object:Gem::Requirement
|
|
102
|
-
none: false
|
|
103
89
|
requirements:
|
|
104
90
|
- - ~>
|
|
105
91
|
- !ruby/object:Gem::Version
|
|
@@ -107,7 +93,6 @@ dependencies:
|
|
|
107
93
|
type: :development
|
|
108
94
|
prerelease: false
|
|
109
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
110
|
-
none: false
|
|
111
96
|
requirements:
|
|
112
97
|
- - ~>
|
|
113
98
|
- !ruby/object:Gem::Version
|
|
@@ -355,27 +340,26 @@ files:
|
|
|
355
340
|
homepage: http://sferik.github.com/twitter/
|
|
356
341
|
licenses:
|
|
357
342
|
- MIT
|
|
343
|
+
metadata: {}
|
|
358
344
|
post_install_message:
|
|
359
345
|
rdoc_options: []
|
|
360
346
|
require_paths:
|
|
361
347
|
- lib
|
|
362
348
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
363
|
-
none: false
|
|
364
349
|
requirements:
|
|
365
|
-
- -
|
|
350
|
+
- - '>='
|
|
366
351
|
- !ruby/object:Gem::Version
|
|
367
352
|
version: '0'
|
|
368
353
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
|
-
none: false
|
|
370
354
|
requirements:
|
|
371
|
-
- -
|
|
355
|
+
- - '>='
|
|
372
356
|
- !ruby/object:Gem::Version
|
|
373
357
|
version: 1.3.6
|
|
374
358
|
requirements: []
|
|
375
359
|
rubyforge_project:
|
|
376
|
-
rubygems_version:
|
|
360
|
+
rubygems_version: 2.0.3
|
|
377
361
|
signing_key:
|
|
378
|
-
specification_version:
|
|
362
|
+
specification_version: 4
|
|
379
363
|
summary: A Ruby interface to the Twitter API.
|
|
380
364
|
test_files:
|
|
381
365
|
- spec/fixtures/about_me.json
|
metadata.gz.sig
CHANGED
|
Binary file
|