twitter 5.3.0 → 5.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +8 -0
- data/README.md +12 -21
- data/lib/twitter/arguments.rb +1 -1
- data/lib/twitter/cursor.rb +0 -2
- data/lib/twitter/rest/api/direct_messages.rb +2 -1
- data/lib/twitter/rest/api/favorites.rb +3 -2
- data/lib/twitter/rest/api/friends_and_followers.rb +2 -1
- data/lib/twitter/rest/api/lists.rb +7 -6
- data/lib/twitter/rest/api/saved_searches.rb +3 -2
- data/lib/twitter/rest/api/tweets.rb +5 -4
- data/lib/twitter/rest/api/users.rb +2 -2
- data/lib/twitter/rest/api/utils.rb +3 -2
- data/lib/twitter/rest/request/multipart_with_file.rb +7 -4
- data/lib/twitter/rest/response/parse_json.rb +3 -1
- data/lib/twitter/streaming/client.rb +0 -2
- data/lib/twitter/utils.rb +14 -0
- data/lib/twitter/version.rb +1 -1
- data/spec/helper.rb +1 -1
- data/spec/twitter/rest/api/saved_searches_spec.rb +14 -4
- data/spec/twitter/streaming/client_spec.rb +85 -58
- data/twitter.gemspec +2 -2
- metadata +188 -162
- metadata.gz.sig +0 -0
- checksums.yaml +0 -7
- checksums.yaml.gz.sig +0 -0
- data/lib/twitter/core_ext/enumerable.rb +0 -8
- data/lib/twitter/core_ext/kernel.rb +0 -8
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
5.3.1
|
2
|
+
-----
|
3
|
+
* [Add `Twitter::Utils` module](https://github.com/sferik/twitter/commit/a1f47fbf19b859c8e680a0a92eff5e225a015090) ([@charliesome](https://twitter.com/charliesome))
|
4
|
+
* [Remove `Enumerable` monkey patch](https://github.com/sferik/twitter/commit/818b28d1621e843c0c6f9ef471076f4125623e52) ([@charliesome](https://twitter.com/charliesome))
|
5
|
+
* [Don't spawning a new thread if there's only one element](https://github.com/sferik/twitter/commit/c01ea8309c16eb77eeb368452df1dadd1e405532)
|
6
|
+
* [Introduce meaningful constant names](https://github.com/sferik/twitter/commit/215c80890d702535de83d8f849885a95ec153920) ([@futuresanta](https://twitter.com/futuresanta))
|
7
|
+
* [Automatically flatten `Twitter::Arguments`](https://github.com/sferik/twitter/commit/a556028ace04cb00c3c2b9cb8f72f792a86f04d6)
|
8
|
+
|
1
9
|
5.3.0
|
2
10
|
-----
|
3
11
|
* [Add `UNABLE_TO_VERIFY_CREDENTIALS` error code](https://github.com/sferik/twitter/commit/6a47e715ef7935cd36a2f78ed877deb3c09af162)
|
data/README.md
CHANGED
@@ -19,16 +19,6 @@ A Ruby interface to the Twitter API.
|
|
19
19
|
## Installation
|
20
20
|
gem install twitter
|
21
21
|
|
22
|
-
To ensure the code you're installing hasn't been tampered with, it's
|
23
|
-
recommended that you verify the signature. To do this, you need to add my
|
24
|
-
public key as a trusted certificate (you only need to do this once):
|
25
|
-
|
26
|
-
gem cert --add <(curl -Ls https://raw.github.com/sferik/twitter/master/certs/sferik.pem)
|
27
|
-
|
28
|
-
Then, install the gem with the medium security trust policy:
|
29
|
-
|
30
|
-
gem install twitter -P MediumSecurity
|
31
|
-
|
32
22
|
## CLI
|
33
23
|
|
34
24
|
Looking for the Twitter command-line interface? It was [removed][] from this
|
@@ -579,26 +569,27 @@ command:
|
|
579
569
|
bundle exec rake erd
|
580
570
|
|
581
571
|
## Supported Ruby Versions
|
572
|
+
|
582
573
|
This library aims to support and is [tested against][travis] the following Ruby
|
583
|
-
|
574
|
+
versions:
|
584
575
|
|
585
576
|
* Ruby 1.8.7
|
586
577
|
* Ruby 1.9.2
|
587
578
|
* Ruby 1.9.3
|
588
579
|
* Ruby 2.0.0
|
589
580
|
|
590
|
-
If something doesn't work on one of these
|
581
|
+
If something doesn't work on one of these versions, it's a bug.
|
591
582
|
|
592
|
-
This library may inadvertently work (or seem to work) on other Ruby
|
593
|
-
|
594
|
-
above.
|
583
|
+
This library may inadvertently work (or seem to work) on other Ruby versions,
|
584
|
+
however support will only be provided for the versions listed above.
|
595
585
|
|
596
|
-
If you would like this library to support another Ruby version
|
597
|
-
volunteer to be a maintainer. Being a maintainer
|
598
|
-
run and pass on that implementation. When
|
599
|
-
implementation, you will be responsible for providing
|
600
|
-
fashion. If critical issues for a particular implementation
|
601
|
-
of a major release, support for that Ruby version may be
|
586
|
+
If you would like this library to support another Ruby version or
|
587
|
+
implementation, you may volunteer to be a maintainer. Being a maintainer
|
588
|
+
entails making sure all tests run and pass on that implementation. When
|
589
|
+
something breaks on your implementation, you will be responsible for providing
|
590
|
+
patches in a timely fashion. If critical issues for a particular implementation
|
591
|
+
exist at the time of a major release, support for that Ruby version may be
|
592
|
+
dropped.
|
602
593
|
|
603
594
|
## Versioning
|
604
595
|
This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
|
data/lib/twitter/arguments.rb
CHANGED
data/lib/twitter/cursor.rb
CHANGED
@@ -2,6 +2,7 @@ require 'twitter/arguments'
|
|
2
2
|
require 'twitter/direct_message'
|
3
3
|
require 'twitter/rest/api/utils'
|
4
4
|
require 'twitter/user'
|
5
|
+
require 'twitter/utils'
|
5
6
|
|
6
7
|
module Twitter
|
7
8
|
module REST
|
@@ -88,7 +89,7 @@ module Twitter
|
|
88
89
|
if arguments.empty?
|
89
90
|
direct_messages_received(arguments.options)
|
90
91
|
else
|
91
|
-
arguments
|
92
|
+
Twitter::Utils.parallel_map(arguments) do |id|
|
92
93
|
direct_message(id, arguments.options)
|
93
94
|
end
|
94
95
|
end
|
@@ -4,6 +4,7 @@ require 'twitter/error/forbidden'
|
|
4
4
|
require 'twitter/rest/api/utils'
|
5
5
|
require 'twitter/tweet'
|
6
6
|
require 'twitter/user'
|
7
|
+
require 'twitter/utils'
|
7
8
|
|
8
9
|
module Twitter
|
9
10
|
module REST
|
@@ -67,7 +68,7 @@ module Twitter
|
|
67
68
|
# @param options [Hash] A customizable set of options.
|
68
69
|
def favorite(*args)
|
69
70
|
arguments = Twitter::Arguments.new(args)
|
70
|
-
arguments
|
71
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
71
72
|
id = extract_id(tweet)
|
72
73
|
begin
|
73
74
|
object_from_response(Twitter::Tweet, :post, '/1.1/favorites/create.json', arguments.options.merge(:id => id))
|
@@ -95,7 +96,7 @@ module Twitter
|
|
95
96
|
# @param options [Hash] A customizable set of options.
|
96
97
|
def favorite!(*args)
|
97
98
|
arguments = Twitter::Arguments.new(args)
|
98
|
-
arguments
|
99
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
99
100
|
id = extract_id(tweet)
|
100
101
|
begin
|
101
102
|
object_from_response(Twitter::Tweet, :post, '/1.1/favorites/create.json', arguments.options.merge(:id => id))
|
@@ -4,6 +4,7 @@ require 'twitter/error/forbidden'
|
|
4
4
|
require 'twitter/relationship'
|
5
5
|
require 'twitter/rest/api/utils'
|
6
6
|
require 'twitter/user'
|
7
|
+
require 'twitter/utils'
|
7
8
|
|
8
9
|
module Twitter
|
9
10
|
module REST
|
@@ -136,7 +137,7 @@ module Twitter
|
|
136
137
|
# @option options [Boolean] :follow (false) Enable notifications for the target user.
|
137
138
|
def follow!(*args)
|
138
139
|
arguments = Twitter::Arguments.new(args)
|
139
|
-
arguments
|
140
|
+
Twitter::Utils.parallel_map(arguments) do |user|
|
140
141
|
object_from_response(Twitter::User, :post, '/1.1/friendships/create.json', merge_user(arguments.options, user))
|
141
142
|
end.compact
|
142
143
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'twitter/arguments'
|
2
|
-
require 'twitter/core_ext/enumerable'
|
3
2
|
require 'twitter/cursor'
|
4
3
|
require 'twitter/error/forbidden'
|
5
4
|
require 'twitter/error/not_found'
|
@@ -7,6 +6,7 @@ require 'twitter/list'
|
|
7
6
|
require 'twitter/rest/api/utils'
|
8
7
|
require 'twitter/tweet'
|
9
8
|
require 'twitter/user'
|
9
|
+
require 'twitter/utils'
|
10
10
|
|
11
11
|
module Twitter
|
12
12
|
module REST
|
@@ -441,12 +441,13 @@ module Twitter
|
|
441
441
|
end
|
442
442
|
|
443
443
|
def list_from_response_with_users(request_method, path, args)
|
444
|
-
arguments =
|
444
|
+
arguments = args.dup
|
445
|
+
options = arguments.last.is_a?(::Hash) ? arguments.pop : {}
|
445
446
|
members = arguments.pop
|
446
|
-
merge_list!(
|
447
|
-
merge_owner!(
|
448
|
-
members.flatten.each_slice(MAX_USERS_PER_REQUEST)
|
449
|
-
object_from_response(Twitter::List, request_method, path, merge_users(
|
447
|
+
merge_list!(options, arguments.pop)
|
448
|
+
merge_owner!(options, arguments.pop)
|
449
|
+
Twitter::Utils.parallel_map(members.flatten.each_slice(MAX_USERS_PER_REQUEST)) do |users|
|
450
|
+
object_from_response(Twitter::List, request_method, path, merge_users(options, users))
|
450
451
|
end.last
|
451
452
|
end
|
452
453
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'twitter/arguments'
|
2
2
|
require 'twitter/rest/api/utils'
|
3
3
|
require 'twitter/saved_search'
|
4
|
+
require 'twitter/utils'
|
4
5
|
|
5
6
|
module Twitter
|
6
7
|
module REST
|
@@ -33,7 +34,7 @@ module Twitter
|
|
33
34
|
if arguments.empty?
|
34
35
|
objects_from_response(Twitter::SavedSearch, :get, '/1.1/saved_searches/list.json', arguments.options)
|
35
36
|
else
|
36
|
-
arguments
|
37
|
+
Twitter::Utils.parallel_map(arguments) do |id|
|
37
38
|
saved_search(id, arguments.options)
|
38
39
|
end
|
39
40
|
end
|
@@ -81,7 +82,7 @@ module Twitter
|
|
81
82
|
# @param options [Hash] A customizable set of options.
|
82
83
|
def destroy_saved_search(*args)
|
83
84
|
arguments = Twitter::Arguments.new(args)
|
84
|
-
arguments
|
85
|
+
Twitter::Utils.parallel_map(arguments) do |id|
|
85
86
|
object_from_response(Twitter::SavedSearch, :post, "/1.1/saved_searches/destroy/#{id}.json", arguments.options)
|
86
87
|
end
|
87
88
|
end
|
@@ -5,6 +5,7 @@ require 'twitter/error/forbidden'
|
|
5
5
|
require 'twitter/oembed'
|
6
6
|
require 'twitter/rest/api/utils'
|
7
7
|
require 'twitter/tweet'
|
8
|
+
require 'twitter/utils'
|
8
9
|
|
9
10
|
module Twitter
|
10
11
|
module REST
|
@@ -142,7 +143,7 @@ module Twitter
|
|
142
143
|
# @option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
|
143
144
|
def retweet(*args)
|
144
145
|
arguments = Twitter::Arguments.new(args)
|
145
|
-
arguments
|
146
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
146
147
|
id = extract_id(tweet)
|
147
148
|
begin
|
148
149
|
post_retweet(id, arguments.options)
|
@@ -168,7 +169,7 @@ module Twitter
|
|
168
169
|
# @option options [Boolean, String, Integer] :trim_user Each tweet returned in a timeline will include a user object with only the author's numerical ID when set to true, 't' or 1.
|
169
170
|
def retweet!(*args)
|
170
171
|
arguments = Twitter::Arguments.new(args)
|
171
|
-
arguments
|
172
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
172
173
|
id = extract_id(tweet)
|
173
174
|
begin
|
174
175
|
post_retweet(id, arguments.options)
|
@@ -249,7 +250,7 @@ module Twitter
|
|
249
250
|
# @option options [String] :lang Language code for the rendered embed. This will affect the text and localization of the rendered HTML.
|
250
251
|
def oembeds(*args)
|
251
252
|
arguments = Twitter::Arguments.new(args)
|
252
|
-
arguments
|
253
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
253
254
|
id = extract_id(tweet)
|
254
255
|
oembed(id, arguments.options)
|
255
256
|
end
|
@@ -281,7 +282,7 @@ module Twitter
|
|
281
282
|
# @return [Array<Twitter::Tweet>]
|
282
283
|
def threaded_tweets_from_response(request_method, path, args)
|
283
284
|
arguments = Twitter::Arguments.new(args)
|
284
|
-
arguments
|
285
|
+
Twitter::Utils.parallel_map(arguments) do |tweet|
|
285
286
|
id = extract_id(tweet)
|
286
287
|
object_from_response(Twitter::Tweet, request_method, path + "/#{id}.json", arguments.options)
|
287
288
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'twitter/arguments'
|
2
|
-
require 'twitter/core_ext/enumerable'
|
3
2
|
require 'twitter/error/not_found'
|
4
3
|
require 'twitter/profile_banner'
|
5
4
|
require 'twitter/rest/api/utils'
|
6
5
|
require 'twitter/settings'
|
7
6
|
require 'twitter/user'
|
7
|
+
require 'twitter/utils'
|
8
8
|
|
9
9
|
module Twitter
|
10
10
|
module REST
|
@@ -227,7 +227,7 @@ module Twitter
|
|
227
227
|
def users(*args)
|
228
228
|
arguments = Twitter::Arguments.new(args)
|
229
229
|
method = arguments.options.delete(:method) || :post
|
230
|
-
arguments.
|
230
|
+
Twitter::Utils.parallel_map(arguments.each_slice(MAX_USERS_PER_REQUEST)) do |users|
|
231
231
|
objects_from_response(Twitter::User, method, '/1.1/users/lookup.json', merge_users(arguments.options, users))
|
232
232
|
end.flatten
|
233
233
|
end
|
@@ -2,6 +2,7 @@ require 'addressable/uri'
|
|
2
2
|
require 'twitter/arguments'
|
3
3
|
require 'twitter/cursor'
|
4
4
|
require 'twitter/user'
|
5
|
+
require 'twitter/utils'
|
5
6
|
|
6
7
|
module Twitter
|
7
8
|
module REST
|
@@ -50,7 +51,7 @@ module Twitter
|
|
50
51
|
# @return [Array<Twitter::User>]
|
51
52
|
def threaded_user_objects_from_response(request_method, path, args)
|
52
53
|
arguments = Twitter::Arguments.new(args)
|
53
|
-
arguments
|
54
|
+
Twitter::Utils.parallel_map(arguments) do |user|
|
54
55
|
object_from_response(Twitter::User, request_method, path, merge_user(arguments.options, user))
|
55
56
|
end
|
56
57
|
end
|
@@ -102,7 +103,7 @@ module Twitter
|
|
102
103
|
# @return [Array]
|
103
104
|
def threaded_objects_from_response(klass, request_method, path, args) # rubocop:disable ParameterLists
|
104
105
|
arguments = Twitter::Arguments.new(args)
|
105
|
-
arguments
|
106
|
+
Twitter::Utils.parallel_map(arguments) do |object|
|
106
107
|
id = extract_id(object)
|
107
108
|
object_from_response(klass, request_method, path, arguments.options.merge(:id => id))
|
108
109
|
end
|
@@ -5,6 +5,9 @@ module Twitter
|
|
5
5
|
module Request
|
6
6
|
class MultipartWithFile < Faraday::Middleware
|
7
7
|
CONTENT_TYPE = 'Content-Type'
|
8
|
+
GIF_REGEX = /\.gif$/i
|
9
|
+
JPEG_REGEX = /\.jpe?g/i
|
10
|
+
PNG_REGEX = /\.png$/i
|
8
11
|
|
9
12
|
def call(env)
|
10
13
|
env[:body].each do |key, value|
|
@@ -19,11 +22,11 @@ module Twitter
|
|
19
22
|
|
20
23
|
def mime_type(path)
|
21
24
|
case path
|
22
|
-
when
|
23
|
-
'image/jpeg'
|
24
|
-
when /\.gif$/i
|
25
|
+
when GIF_REGEX
|
25
26
|
'image/gif'
|
26
|
-
when
|
27
|
+
when JPEG_REGEX
|
28
|
+
'image/jpeg'
|
29
|
+
when PNG_REGEX
|
27
30
|
'image/png'
|
28
31
|
else
|
29
32
|
'application/octet-stream'
|
@@ -5,9 +5,11 @@ module Twitter
|
|
5
5
|
module REST
|
6
6
|
module Response
|
7
7
|
class ParseJson < Faraday::Response::Middleware
|
8
|
+
WHITESPACE_REGEX = /\A^\s*$\z/
|
9
|
+
|
8
10
|
def parse(body)
|
9
11
|
case body
|
10
|
-
when
|
12
|
+
when WHITESPACE_REGEX, nil
|
11
13
|
nil
|
12
14
|
else
|
13
15
|
JSON.parse(body, :symbolize_names => true)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Twitter
|
2
|
+
module Utils
|
3
|
+
class << self
|
4
|
+
def parallel_map(enumerable)
|
5
|
+
# Don't bother spawning a new thread if there's only one item
|
6
|
+
if enumerable.count == 1
|
7
|
+
enumerable.map { |object| yield object }
|
8
|
+
else
|
9
|
+
enumerable.map { |object| Thread.new { yield object } }.map(&:value)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/twitter/version.rb
CHANGED
data/spec/helper.rb
CHANGED
@@ -10,16 +10,21 @@ describe Twitter::REST::API::SavedSearches do
|
|
10
10
|
context 'with ids passed' do
|
11
11
|
before do
|
12
12
|
stub_get('/1.1/saved_searches/show/16129012.json').to_return(:body => fixture('saved_search.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
13
|
+
stub_get('/1.1/saved_searches/show/16129013.json').to_return(:body => fixture('saved_search.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
13
14
|
end
|
14
15
|
it 'requests the correct resource' do
|
15
|
-
@client.saved_searches(16_129_012)
|
16
|
+
@client.saved_searches(16_129_012, 16_129_013)
|
16
17
|
expect(a_get('/1.1/saved_searches/show/16129012.json')).to have_been_made
|
18
|
+
expect(a_get('/1.1/saved_searches/show/16129013.json')).to have_been_made
|
17
19
|
end
|
18
20
|
it 'returns an array of saved searches' do
|
19
|
-
saved_searches = @client.saved_searches(16_129_012)
|
21
|
+
saved_searches = @client.saved_searches(16_129_012, 16_129_013)
|
20
22
|
expect(saved_searches).to be_an Array
|
23
|
+
expect(saved_searches.size).to eq(2)
|
21
24
|
expect(saved_searches.first).to be_a Twitter::SavedSearch
|
22
25
|
expect(saved_searches.first.name).to eq('twitter')
|
26
|
+
expect(saved_searches.last).to be_a Twitter::SavedSearch
|
27
|
+
expect(saved_searches.last.name).to eq('twitter')
|
23
28
|
end
|
24
29
|
end
|
25
30
|
context 'without ids passed' do
|
@@ -72,16 +77,21 @@ describe Twitter::REST::API::SavedSearches do
|
|
72
77
|
describe '#destroy_saved_search' do
|
73
78
|
before do
|
74
79
|
stub_post('/1.1/saved_searches/destroy/16129012.json').to_return(:body => fixture('saved_search.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
80
|
+
stub_post('/1.1/saved_searches/destroy/16129013.json').to_return(:body => fixture('saved_search.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
|
75
81
|
end
|
76
82
|
it 'requests the correct resource' do
|
77
|
-
@client.destroy_saved_search(16_129_012)
|
83
|
+
@client.destroy_saved_search(16_129_012, 16_129_013)
|
78
84
|
expect(a_post('/1.1/saved_searches/destroy/16129012.json')).to have_been_made
|
85
|
+
expect(a_post('/1.1/saved_searches/destroy/16129013.json')).to have_been_made
|
79
86
|
end
|
80
87
|
it 'returns an array of deleted saved searches' do
|
81
|
-
saved_searches = @client.destroy_saved_search(16_129_012)
|
88
|
+
saved_searches = @client.destroy_saved_search(16_129_012, 16_129_013)
|
82
89
|
expect(saved_searches).to be_an Array
|
90
|
+
expect(saved_searches.size).to eq(2)
|
83
91
|
expect(saved_searches.first).to be_a Twitter::SavedSearch
|
84
92
|
expect(saved_searches.first.name).to eq('twitter')
|
93
|
+
expect(saved_searches.last).to be_a Twitter::SavedSearch
|
94
|
+
expect(saved_searches.last.name).to eq('twitter')
|
85
95
|
end
|
86
96
|
end
|
87
97
|
|
@@ -17,80 +17,107 @@ describe Twitter::Streaming::Client do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
describe '#before_request' do
|
21
|
+
it 'runs before a request' do
|
22
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
23
|
+
var = false
|
24
|
+
@client.before_request do
|
25
|
+
var = true
|
26
|
+
end
|
27
|
+
expect(var).to be false
|
28
|
+
@client.user {}
|
29
|
+
expect(var).to be true
|
25
30
|
end
|
26
|
-
expect(var).to be false
|
27
|
-
@client.user {}
|
28
|
-
expect(var).to be true
|
29
31
|
end
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
describe '#filter' do
|
34
|
+
it 'returns an arary of Tweets' do
|
35
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
36
|
+
objects = []
|
37
|
+
@client.filter(:track => 'india') do |object|
|
38
|
+
objects << object
|
39
|
+
end
|
40
|
+
expect(objects.size).to eq(2)
|
41
|
+
expect(objects.first).to be_a Twitter::Tweet
|
42
|
+
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
36
43
|
end
|
37
|
-
expect(objects.size).to eq(2)
|
38
|
-
expect(objects.first).to be_a Twitter::Tweet
|
39
|
-
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
40
44
|
end
|
41
45
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
describe '#firehose' do
|
47
|
+
it 'returns an arary of Tweets' do
|
48
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
49
|
+
objects = []
|
50
|
+
@client.firehose do |object|
|
51
|
+
objects << object
|
52
|
+
end
|
53
|
+
expect(objects.size).to eq(2)
|
54
|
+
expect(objects.first).to be_a Twitter::Tweet
|
55
|
+
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
47
56
|
end
|
48
|
-
expect(objects.size).to eq(2)
|
49
|
-
expect(objects.first).to be_a Twitter::Tweet
|
50
|
-
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
51
57
|
end
|
52
58
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
59
|
+
describe '#sample' do
|
60
|
+
it 'returns an arary of Tweets' do
|
61
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
62
|
+
objects = []
|
63
|
+
@client.sample do |object|
|
64
|
+
objects << object
|
65
|
+
end
|
66
|
+
expect(objects.size).to eq(2)
|
67
|
+
expect(objects.first).to be_a Twitter::Tweet
|
68
|
+
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
58
69
|
end
|
59
|
-
expect(objects.size).to eq(2)
|
60
|
-
expect(objects.first).to be_a Twitter::Tweet
|
61
|
-
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
62
70
|
end
|
63
71
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
72
|
+
describe '#site' do
|
73
|
+
context 'with a user ID passed' do
|
74
|
+
it 'returns an arary of Tweets' do
|
75
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
76
|
+
objects = []
|
77
|
+
@client.site(7_505_382) do |object|
|
78
|
+
objects << object
|
79
|
+
end
|
80
|
+
expect(objects.size).to eq(2)
|
81
|
+
expect(objects.first).to be_a Twitter::Tweet
|
82
|
+
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
83
|
+
end
|
84
|
+
end
|
85
|
+
context 'with a user object passed' do
|
86
|
+
it 'returns an arary of Tweets' do
|
87
|
+
@client.connection = FakeConnection.new(fixture('track_streaming.json'))
|
88
|
+
objects = []
|
89
|
+
user = Twitter::User.new(:id => 7_505_382)
|
90
|
+
@client.site(user) do |object|
|
91
|
+
objects << object
|
92
|
+
end
|
93
|
+
expect(objects.size).to eq(2)
|
94
|
+
expect(objects.first).to be_a Twitter::Tweet
|
95
|
+
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
96
|
+
end
|
69
97
|
end
|
70
|
-
expect(objects.size).to eq(2)
|
71
|
-
expect(objects.first).to be_a Twitter::Tweet
|
72
|
-
expect(objects.first.text).to eq "The problem with your code is that it's doing exactly what you told it to do."
|
73
98
|
end
|
74
99
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
100
|
+
describe '#user' do
|
101
|
+
it 'returns an arary of Tweets' do
|
102
|
+
@client.connection = FakeConnection.new(fixture('track_streaming_user.json'))
|
103
|
+
objects = []
|
104
|
+
@client.user do |object|
|
105
|
+
objects << object
|
106
|
+
end
|
107
|
+
expect(objects.size).to eq(6)
|
108
|
+
expect(objects[0]).to be_a Twitter::Streaming::FriendList
|
109
|
+
expect(objects[0]).to eq([488_736_931, 311_444_249])
|
110
|
+
expect(objects[1]).to be_a Twitter::Tweet
|
111
|
+
expect(objects[1].text).to eq("The problem with your code is that it's doing exactly what you told it to do.")
|
112
|
+
expect(objects[2]).to be_a Twitter::DirectMessage
|
113
|
+
expect(objects[2].text).to eq('hello bot')
|
114
|
+
expect(objects[3]).to be_a Twitter::Streaming::Event
|
115
|
+
expect(objects[3].name).to eq(:follow)
|
116
|
+
expect(objects[4]).to be_a Twitter::Streaming::DeletedTweet
|
117
|
+
expect(objects[4].id).to eq(272_691_609_211_117_568)
|
118
|
+
expect(objects[5]).to be_a Twitter::Streaming::StallWarning
|
119
|
+
expect(objects[5].code).to eq('FALLING_BEHIND')
|
80
120
|
end
|
81
|
-
expect(objects.size).to eq(6)
|
82
|
-
expect(objects[0]).to be_a Twitter::Streaming::FriendList
|
83
|
-
expect(objects[0]).to eq([488_736_931, 311_444_249])
|
84
|
-
expect(objects[1]).to be_a Twitter::Tweet
|
85
|
-
expect(objects[1].text).to eq("The problem with your code is that it's doing exactly what you told it to do.")
|
86
|
-
expect(objects[2]).to be_a Twitter::DirectMessage
|
87
|
-
expect(objects[2].text).to eq('hello bot')
|
88
|
-
expect(objects[3]).to be_a Twitter::Streaming::Event
|
89
|
-
expect(objects[3].name).to eq(:follow)
|
90
|
-
expect(objects[4]).to be_a Twitter::Streaming::DeletedTweet
|
91
|
-
expect(objects[4].id).to eq(272_691_609_211_117_568)
|
92
|
-
expect(objects[5]).to be_a Twitter::Streaming::StallWarning
|
93
|
-
expect(objects[5].code).to eq('FALLING_BEHIND')
|
94
121
|
end
|
95
122
|
|
96
123
|
end
|
data/twitter.gemspec
CHANGED
@@ -6,12 +6,12 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.add_dependency 'addressable', '~> 2.3'
|
7
7
|
spec.add_dependency 'buftok', '~> 0.2.0'
|
8
8
|
spec.add_dependency 'descendants_tracker', '~> 0.0.1'
|
9
|
-
spec.add_dependency 'equalizer',
|
9
|
+
spec.add_dependency 'equalizer', '~> 0.0.9'
|
10
10
|
spec.add_dependency 'faraday', ['>= 0.8', '< 0.10']
|
11
11
|
spec.add_dependency 'http', '~> 0.5.0'
|
12
12
|
spec.add_dependency 'http_parser.rb', '~> 0.6.0'
|
13
13
|
spec.add_dependency 'json', '~> 1.8'
|
14
|
-
spec.add_dependency 'memoizable', '~> 0.
|
14
|
+
spec.add_dependency 'memoizable', '~> 0.4.0'
|
15
15
|
spec.add_dependency 'simple_oauth', '~> 0.2.0'
|
16
16
|
spec.add_development_dependency 'bundler', '~> 1.0'
|
17
17
|
spec.authors = ["Erik Michaels-Ober", "John Nunemaker", "Wynn Netherland", "Steve Richert", "Steve Agalloco"]
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Erik Michaels-Ober
|
@@ -9,198 +10,220 @@ authors:
|
|
9
10
|
- Wynn Netherland
|
10
11
|
- Steve Richert
|
11
12
|
- Steve Agalloco
|
12
|
-
autorequire:
|
13
|
+
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain:
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
16
|
+
- !binary |-
|
17
|
+
LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMakNDQWhhZ0F3SUJB
|
18
|
+
Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE5TVE4d0RRWURWUVFEREFaelpt
|
19
|
+
VnkKYVdzeEZUQVRCZ29Ka2lhSmsvSXNaQUVaRmdWbmJXRnBiREVUTUJFR0Nn
|
20
|
+
bVNKb21UOGl4a0FSa1dBMk52YlRBZQpGdzB4TXpBeU1ETXhNREF5TWpkYUZ3
|
21
|
+
MHhOREF5TURNeE1EQXlNamRhTUQweER6QU5CZ05WQkFNTUJuTm1aWEpwCmF6
|
22
|
+
RVZNQk1HQ2dtU0pvbVQ4aXhrQVJrV0JXZHRZV2xzTVJNd0VRWUtDWkltaVpQ
|
23
|
+
eUxHUUJHUllEWTI5dE1JSUIKSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4
|
24
|
+
QU1JSUJDZ0tDQVFFQWwweDVkeDh1S3hpN1Rrckl1eUJVVEpWQgp2MW85M25V
|
25
|
+
QjlqL3k0TTk2Z1Yycll3QWNpMUpQQnNlTmQ2RnliempvM1lHdUhsN0VRSHVT
|
26
|
+
SE5hZjFwMmx4ZXcvCnk2MEpYSUpCQmdQY0RLL0tDUDROVUhvZm0wamZvWUQr
|
27
|
+
SDV1TkpmSENOcTcvWnNUeE90RTNSYTkyczBCQ01UcG0Kd0JNTWxXUjVNdGRF
|
28
|
+
aElZdUJPNFhobmVqWWdIMEwvN0JMMmx5bW50Vm5zci9hZ2RRb29qUUNOMUlR
|
29
|
+
bXNSSnZyUgpkdVpSTzN0WnZvSW8xcEJjNEpFZWhEdXFDZXlCZ1BMT3FNb0t0
|
30
|
+
UWxvbGQxVFFzMWtXVUJLN0tXTUZFaEtDL0tnCnp5ektSSFFvOXlEWXdPdllu
|
31
|
+
Z29CTFkrVC9sd0NUNGR5c3NkaHpSYmZueEFoYUt1NFNBc3NJd2FDMDF5Vm93
|
32
|
+
SUQKQVFBQm96a3dOekFKQmdOVkhSTUVBakFBTUIwR0ExVWREZ1FXQkJTMHJ1
|
33
|
+
RGZSYWs1Y2kxT3BETlgvWmRERWtJcwppVEFMQmdOVkhROEVCQU1DQkxBd0RR
|
34
|
+
WUpLb1pJaHZjTkFRRUZCUUFEZ2dFQkFISFNNcy9NUDBzT2FMa0V2NEpvCnp2
|
35
|
+
a20zcW41QTZ0MHZhSHg3NzRjbWVqeU1VKzV3eVN4UmV6c3BMN1VMaDlOZXVL
|
36
|
+
Mk9oVStPZTNUcHFyQWc1VEsKUjhHUUlMblZ1MkZlbUdBNnNBa1BEbGNQdGdB
|
37
|
+
NmllSTE5UFpPRjZIVkxtYy9JRC9kUC9OZ1pXV3pFZXFRS21jSwoyK0hNK1NF
|
38
|
+
RURoWmtTY1lla3c0Wk9lMTY0WnRaRzgxNm9BdjV4MHBHaXRTSWt1bVVwN1Y4
|
39
|
+
aUVaLzZlaHI3WTllClhPZzRlZXVuNUwvSmptakFSb1cya05kdmtSRDNjMkVl
|
40
|
+
U0xxV3ZRUnNCbHlwSGZoczZKSnVMbHlaUEdoVTNSL3YKU2YzbFZLcEJDV2dS
|
41
|
+
cEdUdnk0NVhWcEIrNTl5MzNQSm1FdVExUFRFT1l2UXlhbzlVS01BQWFBTi83
|
42
|
+
cVdRdGpsMApobHc9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
43
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
37
44
|
dependencies:
|
38
45
|
- !ruby/object:Gem::Dependency
|
39
46
|
name: addressable
|
40
|
-
|
47
|
+
requirement: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
41
49
|
requirements:
|
42
50
|
- - ~>
|
43
51
|
- !ruby/object:Gem::Version
|
44
52
|
version: '2.3'
|
45
|
-
|
53
|
+
type: :runtime
|
54
|
+
prerelease: false
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
46
57
|
requirements:
|
47
58
|
- - ~>
|
48
59
|
- !ruby/object:Gem::Version
|
49
60
|
version: '2.3'
|
50
|
-
prerelease: false
|
51
|
-
type: :runtime
|
52
61
|
- !ruby/object:Gem::Dependency
|
53
62
|
name: buftok
|
54
|
-
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
55
65
|
requirements:
|
56
66
|
- - ~>
|
57
67
|
- !ruby/object:Gem::Version
|
58
68
|
version: 0.2.0
|
59
|
-
|
69
|
+
type: :runtime
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
60
73
|
requirements:
|
61
74
|
- - ~>
|
62
75
|
- !ruby/object:Gem::Version
|
63
76
|
version: 0.2.0
|
64
|
-
prerelease: false
|
65
|
-
type: :runtime
|
66
77
|
- !ruby/object:Gem::Dependency
|
67
78
|
name: descendants_tracker
|
68
|
-
|
79
|
+
requirement: !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
69
81
|
requirements:
|
70
82
|
- - ~>
|
71
83
|
- !ruby/object:Gem::Version
|
72
84
|
version: 0.0.1
|
73
|
-
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
74
89
|
requirements:
|
75
90
|
- - ~>
|
76
91
|
- !ruby/object:Gem::Version
|
77
92
|
version: 0.0.1
|
78
|
-
prerelease: false
|
79
|
-
type: :runtime
|
80
93
|
- !ruby/object:Gem::Dependency
|
81
94
|
name: equalizer
|
82
|
-
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
83
97
|
requirements:
|
84
98
|
- - ~>
|
85
99
|
- !ruby/object:Gem::Version
|
86
|
-
version: 0.0.
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
100
|
+
version: 0.0.9
|
101
|
+
type: :runtime
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
91
105
|
requirements:
|
92
106
|
- - ~>
|
93
107
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.0.
|
95
|
-
- - '!='
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: 0.0.8
|
98
|
-
prerelease: false
|
99
|
-
type: :runtime
|
108
|
+
version: 0.0.9
|
100
109
|
- !ruby/object:Gem::Dependency
|
101
110
|
name: faraday
|
102
|
-
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
103
113
|
requirements:
|
104
|
-
- - '>='
|
114
|
+
- - ! '>='
|
105
115
|
- !ruby/object:Gem::Version
|
106
116
|
version: '0.8'
|
107
117
|
- - <
|
108
118
|
- !ruby/object:Gem::Version
|
109
119
|
version: '0.10'
|
110
|
-
|
120
|
+
type: :runtime
|
121
|
+
prerelease: false
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
111
124
|
requirements:
|
112
|
-
- - '>='
|
125
|
+
- - ! '>='
|
113
126
|
- !ruby/object:Gem::Version
|
114
127
|
version: '0.8'
|
115
128
|
- - <
|
116
129
|
- !ruby/object:Gem::Version
|
117
130
|
version: '0.10'
|
118
|
-
prerelease: false
|
119
|
-
type: :runtime
|
120
131
|
- !ruby/object:Gem::Dependency
|
121
132
|
name: http
|
122
|
-
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
123
135
|
requirements:
|
124
136
|
- - ~>
|
125
137
|
- !ruby/object:Gem::Version
|
126
138
|
version: 0.5.0
|
127
|
-
|
139
|
+
type: :runtime
|
140
|
+
prerelease: false
|
141
|
+
version_requirements: !ruby/object:Gem::Requirement
|
142
|
+
none: false
|
128
143
|
requirements:
|
129
144
|
- - ~>
|
130
145
|
- !ruby/object:Gem::Version
|
131
146
|
version: 0.5.0
|
132
|
-
prerelease: false
|
133
|
-
type: :runtime
|
134
147
|
- !ruby/object:Gem::Dependency
|
135
148
|
name: http_parser.rb
|
136
|
-
|
149
|
+
requirement: !ruby/object:Gem::Requirement
|
150
|
+
none: false
|
137
151
|
requirements:
|
138
152
|
- - ~>
|
139
153
|
- !ruby/object:Gem::Version
|
140
154
|
version: 0.6.0
|
141
|
-
|
155
|
+
type: :runtime
|
156
|
+
prerelease: false
|
157
|
+
version_requirements: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
142
159
|
requirements:
|
143
160
|
- - ~>
|
144
161
|
- !ruby/object:Gem::Version
|
145
162
|
version: 0.6.0
|
146
|
-
prerelease: false
|
147
|
-
type: :runtime
|
148
163
|
- !ruby/object:Gem::Dependency
|
149
164
|
name: json
|
150
|
-
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
151
167
|
requirements:
|
152
168
|
- - ~>
|
153
169
|
- !ruby/object:Gem::Version
|
154
170
|
version: '1.8'
|
155
|
-
|
171
|
+
type: :runtime
|
172
|
+
prerelease: false
|
173
|
+
version_requirements: !ruby/object:Gem::Requirement
|
174
|
+
none: false
|
156
175
|
requirements:
|
157
176
|
- - ~>
|
158
177
|
- !ruby/object:Gem::Version
|
159
178
|
version: '1.8'
|
160
|
-
prerelease: false
|
161
|
-
type: :runtime
|
162
179
|
- !ruby/object:Gem::Dependency
|
163
180
|
name: memoizable
|
164
|
-
|
181
|
+
requirement: !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
165
183
|
requirements:
|
166
184
|
- - ~>
|
167
185
|
- !ruby/object:Gem::Version
|
168
|
-
version: 0.
|
169
|
-
|
186
|
+
version: 0.4.0
|
187
|
+
type: :runtime
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
190
|
+
none: false
|
170
191
|
requirements:
|
171
192
|
- - ~>
|
172
193
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
174
|
-
prerelease: false
|
175
|
-
type: :runtime
|
194
|
+
version: 0.4.0
|
176
195
|
- !ruby/object:Gem::Dependency
|
177
196
|
name: simple_oauth
|
178
|
-
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
179
199
|
requirements:
|
180
200
|
- - ~>
|
181
201
|
- !ruby/object:Gem::Version
|
182
202
|
version: 0.2.0
|
183
|
-
|
203
|
+
type: :runtime
|
204
|
+
prerelease: false
|
205
|
+
version_requirements: !ruby/object:Gem::Requirement
|
206
|
+
none: false
|
184
207
|
requirements:
|
185
208
|
- - ~>
|
186
209
|
- !ruby/object:Gem::Version
|
187
210
|
version: 0.2.0
|
188
|
-
prerelease: false
|
189
|
-
type: :runtime
|
190
211
|
- !ruby/object:Gem::Dependency
|
191
212
|
name: bundler
|
192
|
-
|
213
|
+
requirement: !ruby/object:Gem::Requirement
|
214
|
+
none: false
|
193
215
|
requirements:
|
194
216
|
- - ~>
|
195
217
|
- !ruby/object:Gem::Version
|
196
218
|
version: '1.0'
|
197
|
-
|
219
|
+
type: :development
|
220
|
+
prerelease: false
|
221
|
+
version_requirements: !ruby/object:Gem::Requirement
|
222
|
+
none: false
|
198
223
|
requirements:
|
199
224
|
- - ~>
|
200
225
|
- !ruby/object:Gem::Version
|
201
226
|
version: '1.0'
|
202
|
-
prerelease: false
|
203
|
-
type: :development
|
204
227
|
description: A Ruby interface to the Twitter API.
|
205
228
|
email:
|
206
229
|
- sferik@gmail.com
|
@@ -215,7 +238,6 @@ files:
|
|
215
238
|
- README.md
|
216
239
|
- Rakefile
|
217
240
|
- twitter.gemspec
|
218
|
-
- lib/twitter.rb
|
219
241
|
- lib/twitter/arguments.rb
|
220
242
|
- lib/twitter/base.rb
|
221
243
|
- lib/twitter/basic_user.rb
|
@@ -224,43 +246,12 @@ files:
|
|
224
246
|
- lib/twitter/creatable.rb
|
225
247
|
- lib/twitter/cursor.rb
|
226
248
|
- lib/twitter/direct_message.rb
|
227
|
-
- lib/twitter/entity.rb
|
228
|
-
- lib/twitter/enumerable.rb
|
229
|
-
- lib/twitter/error.rb
|
230
|
-
- lib/twitter/factory.rb
|
231
|
-
- lib/twitter/geo.rb
|
232
|
-
- lib/twitter/geo_factory.rb
|
233
|
-
- lib/twitter/geo_results.rb
|
234
|
-
- lib/twitter/identity.rb
|
235
|
-
- lib/twitter/language.rb
|
236
|
-
- lib/twitter/list.rb
|
237
|
-
- lib/twitter/media_factory.rb
|
238
|
-
- lib/twitter/metadata.rb
|
239
|
-
- lib/twitter/null_object.rb
|
240
|
-
- lib/twitter/oembed.rb
|
241
|
-
- lib/twitter/place.rb
|
242
|
-
- lib/twitter/profile_banner.rb
|
243
|
-
- lib/twitter/rate_limit.rb
|
244
|
-
- lib/twitter/relationship.rb
|
245
|
-
- lib/twitter/saved_search.rb
|
246
|
-
- lib/twitter/search_results.rb
|
247
|
-
- lib/twitter/settings.rb
|
248
|
-
- lib/twitter/size.rb
|
249
|
-
- lib/twitter/source_user.rb
|
250
|
-
- lib/twitter/suggestion.rb
|
251
|
-
- lib/twitter/target_user.rb
|
252
|
-
- lib/twitter/token.rb
|
253
|
-
- lib/twitter/trend.rb
|
254
|
-
- lib/twitter/trend_results.rb
|
255
|
-
- lib/twitter/tweet.rb
|
256
|
-
- lib/twitter/user.rb
|
257
|
-
- lib/twitter/version.rb
|
258
|
-
- lib/twitter/core_ext/enumerable.rb
|
259
|
-
- lib/twitter/core_ext/kernel.rb
|
260
249
|
- lib/twitter/entity/hashtag.rb
|
261
250
|
- lib/twitter/entity/symbol.rb
|
262
251
|
- lib/twitter/entity/uri.rb
|
263
252
|
- lib/twitter/entity/user_mention.rb
|
253
|
+
- lib/twitter/entity.rb
|
254
|
+
- lib/twitter/enumerable.rb
|
264
255
|
- lib/twitter/error/already_favorited.rb
|
265
256
|
- lib/twitter/error/already_posted.rb
|
266
257
|
- lib/twitter/error/already_retweeted.rb
|
@@ -276,10 +267,25 @@ files:
|
|
276
267
|
- lib/twitter/error/too_many_requests.rb
|
277
268
|
- lib/twitter/error/unauthorized.rb
|
278
269
|
- lib/twitter/error/unprocessable_entity.rb
|
270
|
+
- lib/twitter/error.rb
|
271
|
+
- lib/twitter/factory.rb
|
279
272
|
- lib/twitter/geo/point.rb
|
280
273
|
- lib/twitter/geo/polygon.rb
|
274
|
+
- lib/twitter/geo.rb
|
275
|
+
- lib/twitter/geo_factory.rb
|
276
|
+
- lib/twitter/geo_results.rb
|
277
|
+
- lib/twitter/identity.rb
|
278
|
+
- lib/twitter/language.rb
|
279
|
+
- lib/twitter/list.rb
|
281
280
|
- lib/twitter/media/photo.rb
|
282
|
-
- lib/twitter/
|
281
|
+
- lib/twitter/media_factory.rb
|
282
|
+
- lib/twitter/metadata.rb
|
283
|
+
- lib/twitter/null_object.rb
|
284
|
+
- lib/twitter/oembed.rb
|
285
|
+
- lib/twitter/place.rb
|
286
|
+
- lib/twitter/profile_banner.rb
|
287
|
+
- lib/twitter/rate_limit.rb
|
288
|
+
- lib/twitter/relationship.rb
|
283
289
|
- lib/twitter/rest/api/direct_messages.rb
|
284
290
|
- lib/twitter/rest/api/favorites.rb
|
285
291
|
- lib/twitter/rest/api/friends_and_followers.rb
|
@@ -297,10 +303,16 @@ files:
|
|
297
303
|
- lib/twitter/rest/api/undocumented.rb
|
298
304
|
- lib/twitter/rest/api/users.rb
|
299
305
|
- lib/twitter/rest/api/utils.rb
|
306
|
+
- lib/twitter/rest/client.rb
|
300
307
|
- lib/twitter/rest/request/multipart_with_file.rb
|
301
308
|
- lib/twitter/rest/response/parse_error_json.rb
|
302
309
|
- lib/twitter/rest/response/parse_json.rb
|
303
310
|
- lib/twitter/rest/response/raise_error.rb
|
311
|
+
- lib/twitter/saved_search.rb
|
312
|
+
- lib/twitter/search_results.rb
|
313
|
+
- lib/twitter/settings.rb
|
314
|
+
- lib/twitter/size.rb
|
315
|
+
- lib/twitter/source_user.rb
|
304
316
|
- lib/twitter/streaming/client.rb
|
305
317
|
- lib/twitter/streaming/connection.rb
|
306
318
|
- lib/twitter/streaming/deleted_tweet.rb
|
@@ -309,8 +321,16 @@ files:
|
|
309
321
|
- lib/twitter/streaming/message_parser.rb
|
310
322
|
- lib/twitter/streaming/response.rb
|
311
323
|
- lib/twitter/streaming/stall_warning.rb
|
312
|
-
-
|
313
|
-
-
|
324
|
+
- lib/twitter/suggestion.rb
|
325
|
+
- lib/twitter/target_user.rb
|
326
|
+
- lib/twitter/token.rb
|
327
|
+
- lib/twitter/trend.rb
|
328
|
+
- lib/twitter/trend_results.rb
|
329
|
+
- lib/twitter/tweet.rb
|
330
|
+
- lib/twitter/user.rb
|
331
|
+
- lib/twitter/utils.rb
|
332
|
+
- lib/twitter/version.rb
|
333
|
+
- lib/twitter.rb
|
314
334
|
- spec/fixtures/already_favorited.json
|
315
335
|
- spec/fixtures/already_posted.json
|
316
336
|
- spec/fixtures/already_retweeted.json
|
@@ -375,17 +395,22 @@ files:
|
|
375
395
|
- spec/fixtures/users_list2.json
|
376
396
|
- spec/fixtures/we_concept_bg2.png
|
377
397
|
- spec/fixtures/wildcomet2.jpe
|
398
|
+
- spec/helper.rb
|
378
399
|
- spec/twitter/base_spec.rb
|
379
400
|
- spec/twitter/basic_user_spec.rb
|
380
401
|
- spec/twitter/configuration_spec.rb
|
381
402
|
- spec/twitter/cursor_spec.rb
|
382
403
|
- spec/twitter/direct_message_spec.rb
|
404
|
+
- spec/twitter/entity/uri_spec.rb
|
383
405
|
- spec/twitter/error_spec.rb
|
406
|
+
- spec/twitter/geo/point_spec.rb
|
407
|
+
- spec/twitter/geo/polygon_spec.rb
|
384
408
|
- spec/twitter/geo_factory_spec.rb
|
385
409
|
- spec/twitter/geo_results_spec.rb
|
386
410
|
- spec/twitter/geo_spec.rb
|
387
411
|
- spec/twitter/identifiable_spec.rb
|
388
412
|
- spec/twitter/list_spec.rb
|
413
|
+
- spec/twitter/media/photo_spec.rb
|
389
414
|
- spec/twitter/media_factory_spec.rb
|
390
415
|
- spec/twitter/null_object_spec.rb
|
391
416
|
- spec/twitter/oembed_spec.rb
|
@@ -393,23 +418,6 @@ files:
|
|
393
418
|
- spec/twitter/profile_banner_spec.rb
|
394
419
|
- spec/twitter/rate_limit_spec.rb
|
395
420
|
- spec/twitter/relationship_spec.rb
|
396
|
-
- spec/twitter/saved_search_spec.rb
|
397
|
-
- spec/twitter/search_results_spec.rb
|
398
|
-
- spec/twitter/settings_spec.rb
|
399
|
-
- spec/twitter/size_spec.rb
|
400
|
-
- spec/twitter/source_user_spec.rb
|
401
|
-
- spec/twitter/suggestion_spec.rb
|
402
|
-
- spec/twitter/target_user_spec.rb
|
403
|
-
- spec/twitter/token_spec.rb
|
404
|
-
- spec/twitter/trend_results_spec.rb
|
405
|
-
- spec/twitter/trend_spec.rb
|
406
|
-
- spec/twitter/tweet_spec.rb
|
407
|
-
- spec/twitter/user_spec.rb
|
408
|
-
- spec/twitter/entity/uri_spec.rb
|
409
|
-
- spec/twitter/geo/point_spec.rb
|
410
|
-
- spec/twitter/geo/polygon_spec.rb
|
411
|
-
- spec/twitter/media/photo_spec.rb
|
412
|
-
- spec/twitter/rest/client_spec.rb
|
413
421
|
- spec/twitter/rest/api/direct_messages_spec.rb
|
414
422
|
- spec/twitter/rest/api/favorites_spec.rb
|
415
423
|
- spec/twitter/rest/api/friends_and_followers_spec.rb
|
@@ -426,38 +434,54 @@ files:
|
|
426
434
|
- spec/twitter/rest/api/tweets_spec.rb
|
427
435
|
- spec/twitter/rest/api/undocumented_spec.rb
|
428
436
|
- spec/twitter/rest/api/users_spec.rb
|
437
|
+
- spec/twitter/rest/client_spec.rb
|
438
|
+
- spec/twitter/saved_search_spec.rb
|
439
|
+
- spec/twitter/search_results_spec.rb
|
440
|
+
- spec/twitter/settings_spec.rb
|
441
|
+
- spec/twitter/size_spec.rb
|
442
|
+
- spec/twitter/source_user_spec.rb
|
429
443
|
- spec/twitter/streaming/client_spec.rb
|
430
444
|
- spec/twitter/streaming/deleted_tweet_spec.rb
|
431
445
|
- spec/twitter/streaming/event_spec.rb
|
432
446
|
- spec/twitter/streaming/friend_list_spec.rb
|
433
447
|
- spec/twitter/streaming/message_parser_spec.rb
|
448
|
+
- spec/twitter/suggestion_spec.rb
|
449
|
+
- spec/twitter/target_user_spec.rb
|
450
|
+
- spec/twitter/token_spec.rb
|
451
|
+
- spec/twitter/trend_results_spec.rb
|
452
|
+
- spec/twitter/trend_spec.rb
|
453
|
+
- spec/twitter/tweet_spec.rb
|
454
|
+
- spec/twitter/user_spec.rb
|
455
|
+
- spec/twitter_spec.rb
|
434
456
|
homepage: http://sferik.github.com/twitter/
|
435
457
|
licenses:
|
436
458
|
- MIT
|
437
|
-
|
438
|
-
post_install_message:
|
459
|
+
post_install_message:
|
439
460
|
rdoc_options: []
|
440
461
|
require_paths:
|
441
462
|
- lib
|
442
463
|
required_ruby_version: !ruby/object:Gem::Requirement
|
464
|
+
none: false
|
443
465
|
requirements:
|
444
|
-
- - '>='
|
466
|
+
- - ! '>='
|
445
467
|
- !ruby/object:Gem::Version
|
446
468
|
version: '0'
|
469
|
+
segments:
|
470
|
+
- 0
|
471
|
+
hash: 3125248739769463340
|
447
472
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
473
|
+
none: false
|
448
474
|
requirements:
|
449
|
-
- - '>='
|
475
|
+
- - ! '>='
|
450
476
|
- !ruby/object:Gem::Version
|
451
477
|
version: 1.3.5
|
452
478
|
requirements: []
|
453
|
-
rubyforge_project:
|
454
|
-
rubygems_version:
|
455
|
-
signing_key:
|
456
|
-
specification_version:
|
479
|
+
rubyforge_project:
|
480
|
+
rubygems_version: 1.8.23
|
481
|
+
signing_key:
|
482
|
+
specification_version: 3
|
457
483
|
summary: A Ruby interface to the Twitter API.
|
458
484
|
test_files:
|
459
|
-
- spec/helper.rb
|
460
|
-
- spec/twitter_spec.rb
|
461
485
|
- spec/fixtures/already_favorited.json
|
462
486
|
- spec/fixtures/already_posted.json
|
463
487
|
- spec/fixtures/already_retweeted.json
|
@@ -522,17 +546,22 @@ test_files:
|
|
522
546
|
- spec/fixtures/users_list2.json
|
523
547
|
- spec/fixtures/we_concept_bg2.png
|
524
548
|
- spec/fixtures/wildcomet2.jpe
|
549
|
+
- spec/helper.rb
|
525
550
|
- spec/twitter/base_spec.rb
|
526
551
|
- spec/twitter/basic_user_spec.rb
|
527
552
|
- spec/twitter/configuration_spec.rb
|
528
553
|
- spec/twitter/cursor_spec.rb
|
529
554
|
- spec/twitter/direct_message_spec.rb
|
555
|
+
- spec/twitter/entity/uri_spec.rb
|
530
556
|
- spec/twitter/error_spec.rb
|
557
|
+
- spec/twitter/geo/point_spec.rb
|
558
|
+
- spec/twitter/geo/polygon_spec.rb
|
531
559
|
- spec/twitter/geo_factory_spec.rb
|
532
560
|
- spec/twitter/geo_results_spec.rb
|
533
561
|
- spec/twitter/geo_spec.rb
|
534
562
|
- spec/twitter/identifiable_spec.rb
|
535
563
|
- spec/twitter/list_spec.rb
|
564
|
+
- spec/twitter/media/photo_spec.rb
|
536
565
|
- spec/twitter/media_factory_spec.rb
|
537
566
|
- spec/twitter/null_object_spec.rb
|
538
567
|
- spec/twitter/oembed_spec.rb
|
@@ -540,23 +569,6 @@ test_files:
|
|
540
569
|
- spec/twitter/profile_banner_spec.rb
|
541
570
|
- spec/twitter/rate_limit_spec.rb
|
542
571
|
- spec/twitter/relationship_spec.rb
|
543
|
-
- spec/twitter/saved_search_spec.rb
|
544
|
-
- spec/twitter/search_results_spec.rb
|
545
|
-
- spec/twitter/settings_spec.rb
|
546
|
-
- spec/twitter/size_spec.rb
|
547
|
-
- spec/twitter/source_user_spec.rb
|
548
|
-
- spec/twitter/suggestion_spec.rb
|
549
|
-
- spec/twitter/target_user_spec.rb
|
550
|
-
- spec/twitter/token_spec.rb
|
551
|
-
- spec/twitter/trend_results_spec.rb
|
552
|
-
- spec/twitter/trend_spec.rb
|
553
|
-
- spec/twitter/tweet_spec.rb
|
554
|
-
- spec/twitter/user_spec.rb
|
555
|
-
- spec/twitter/entity/uri_spec.rb
|
556
|
-
- spec/twitter/geo/point_spec.rb
|
557
|
-
- spec/twitter/geo/polygon_spec.rb
|
558
|
-
- spec/twitter/media/photo_spec.rb
|
559
|
-
- spec/twitter/rest/client_spec.rb
|
560
572
|
- spec/twitter/rest/api/direct_messages_spec.rb
|
561
573
|
- spec/twitter/rest/api/favorites_spec.rb
|
562
574
|
- spec/twitter/rest/api/friends_and_followers_spec.rb
|
@@ -573,9 +585,23 @@ test_files:
|
|
573
585
|
- spec/twitter/rest/api/tweets_spec.rb
|
574
586
|
- spec/twitter/rest/api/undocumented_spec.rb
|
575
587
|
- spec/twitter/rest/api/users_spec.rb
|
588
|
+
- spec/twitter/rest/client_spec.rb
|
589
|
+
- spec/twitter/saved_search_spec.rb
|
590
|
+
- spec/twitter/search_results_spec.rb
|
591
|
+
- spec/twitter/settings_spec.rb
|
592
|
+
- spec/twitter/size_spec.rb
|
593
|
+
- spec/twitter/source_user_spec.rb
|
576
594
|
- spec/twitter/streaming/client_spec.rb
|
577
595
|
- spec/twitter/streaming/deleted_tweet_spec.rb
|
578
596
|
- spec/twitter/streaming/event_spec.rb
|
579
597
|
- spec/twitter/streaming/friend_list_spec.rb
|
580
598
|
- spec/twitter/streaming/message_parser_spec.rb
|
581
|
-
|
599
|
+
- spec/twitter/suggestion_spec.rb
|
600
|
+
- spec/twitter/target_user_spec.rb
|
601
|
+
- spec/twitter/token_spec.rb
|
602
|
+
- spec/twitter/trend_results_spec.rb
|
603
|
+
- spec/twitter/trend_spec.rb
|
604
|
+
- spec/twitter/tweet_spec.rb
|
605
|
+
- spec/twitter/user_spec.rb
|
606
|
+
- spec/twitter_spec.rb
|
607
|
+
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: c8ede6de03967ee80467ebc8bb1c0a92aafb5283
|
4
|
-
data.tar.gz: 4f935d07a65ecf9c26216d08e115faee3245d0e8
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 13627ec0860841892df6557a893b9c67893d63654178d0d369c868150041246fad6d6bf25e38a6be120ff83988d7924750af53b8fab42458c3913e7d74bb5d46
|
7
|
-
data.tar.gz: ec9357d3d90cd82b7fbb7d2f01b5e129352ff99735698258c30fcb1feffec70c07994c8aa07fccd4aa00bf131e409a620db57619080487dc946cf3268667df65
|
checksums.yaml.gz.sig
DELETED
Binary file
|