gnip_api 0.0.1 → 0.0.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 +4 -4
- data/.gitignore +2 -1
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +6 -1
- data/README.md +43 -4
- data/gnip_api.gemspec +1 -0
- data/lib/gnip_api/adapter.rb +44 -22
- data/lib/gnip_api/adapters/base_adapter.rb +59 -0
- data/lib/gnip_api/adapters/httparty_adapter.rb +33 -1
- data/lib/gnip_api/apis/power_track/buffer.rb +4 -0
- data/lib/gnip_api/apis/power_track/rule.rb +31 -0
- data/lib/gnip_api/apis/power_track/rules.rb +69 -2
- data/lib/gnip_api/apis/power_track/stream.rb +41 -22
- data/lib/gnip_api/apis/search/count.rb +0 -0
- data/lib/gnip_api/apis/search/query.rb +36 -0
- data/lib/gnip_api/apis/search/result.rb +17 -0
- data/lib/gnip_api/apis/search/stream.rb +26 -0
- data/lib/gnip_api/configuration.rb +4 -1
- data/lib/gnip_api/endpoints.rb +15 -2
- data/lib/gnip_api/errors.rb +39 -0
- data/lib/gnip_api/gnip/activity.rb +72 -0
- data/lib/gnip_api/gnip/actor.rb +42 -11
- data/lib/gnip_api/gnip/gnip_data.rb +23 -0
- data/lib/gnip_api/gnip/message.rb +24 -51
- data/lib/gnip_api/gnip/system_message.rb +30 -0
- data/lib/gnip_api/gnip/url.rb +35 -0
- data/lib/gnip_api/limiters/rules.rb +56 -0
- data/lib/gnip_api/rate_limiter.rb +14 -0
- data/lib/gnip_api/request.rb +26 -0
- data/lib/gnip_api/response.rb +35 -0
- data/lib/gnip_api/version.rb +1 -1
- data/lib/gnip_api.rb +31 -0
- data/spec/fixtures/activities/full_activity.json +227 -0
- data/spec/fixtures/activities/nil_urls.json +1 -0
- data/spec/fixtures/activities/real_activity.json +127 -0
- data/spec/fixtures/activities/real_activity_long_rules.json +126 -0
- data/spec/fixtures/system_messages/error.json +1 -0
- data/spec/fixtures/system_messages/info.json +1 -0
- data/spec/fixtures/system_messages/warn.json +1 -0
- data/spec/fixtures/twitter_messages/quote.json +219 -0
- data/spec/fixtures/twitter_messages/retweet.json +418 -0
- data/spec/fixtures/twitter_messages/retweet_long_rules.json +417 -0
- data/spec/fixtures/twitter_messages/scrub_geo.json +11 -0
- data/spec/fixtures/twitter_messages/status_delete.json +11 -0
- data/spec/fixtures/twitter_messages/status_withheld.json +11 -0
- data/spec/fixtures/twitter_messages/tweet.json +233 -0
- data/spec/fixtures/twitter_messages/tweet_long_rules.json +232 -0
- data/spec/fixtures/twitter_messages/user_delete.json +7 -0
- data/spec/fixtures/twitter_messages/user_protect.json +7 -0
- data/spec/fixtures/twitter_messages/user_suspend.json +7 -0
- data/spec/fixtures/twitter_messages/user_undelete.json +7 -0
- data/spec/fixtures/twitter_messages/user_unprotect.json +7 -0
- data/spec/fixtures/twitter_messages/user_unsuspend.json +7 -0
- data/spec/fixtures/twitter_messages/user_withheld.json +10 -0
- data/spec/gnip_api/adapter_spec.rb +78 -0
- data/spec/gnip_api/adapters/base_adapter_spec.rb +0 -0
- data/spec/gnip_api/adapters/httparty_adapter_spec.rb +0 -0
- data/spec/gnip_api/apis/power_track/rule_spec.rb +62 -0
- data/spec/gnip_api/apis/power_track/rules_spec.rb +70 -0
- data/spec/gnip_api/apis/power_track/stream_spec.rb +50 -0
- data/spec/gnip_api/gnip/activity_spec.rb +123 -0
- data/spec/gnip_api/gnip/gnip_data_spec.rb +108 -0
- data/spec/gnip_api/gnip/message_spec.rb +48 -0
- data/spec/gnip_api/limiters/rules_spec.rb +74 -0
- data/spec/gnip_api/request_spec.rb +33 -0
- data/spec/gnip_api/response_spec.rb +32 -0
- data/spec/lib/test_adapter.rb +16 -0
- data/spec/spec_helper.rb +8 -0
- metadata +103 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Gnip::GnipData do
|
|
4
|
+
context 'when urls have nil' do
|
|
5
|
+
before do
|
|
6
|
+
@activity = File.read(fixture_path.join('activities', 'nil_urls.json'))
|
|
7
|
+
@activity = JSON.parse(@activity)
|
|
8
|
+
@gnip = Gnip::GnipData.new(@activity['gnip'])
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
it 'does not fail using expanded urls' do
|
|
12
|
+
expect(Proc.new{@gnip.urls.first.expanded_url}).not_to raise_error
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
it 'does not fail using expanded urls' do
|
|
16
|
+
expect(Proc.new{@gnip.urls.first.url}).not_to raise_error
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
context 'with long rules' do
|
|
21
|
+
before do
|
|
22
|
+
@activity = File.read(fixture_path.join('activities', 'real_activity_long_rules.json'))
|
|
23
|
+
@activity = JSON.parse(@activity)
|
|
24
|
+
@gnip = @activity['gnip']
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'accepts gnip data' do
|
|
28
|
+
expect(Proc.new{Gnip::GnipData.new(@gnip)}).not_to raise_error
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
describe 'parsed GnipData' do
|
|
32
|
+
before do
|
|
33
|
+
@gnip_data = Gnip::GnipData.new(@gnip)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'has matching rules' do
|
|
37
|
+
expect(@gnip_data.matching_rules).not_to eq(nil)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'has urls' do
|
|
41
|
+
expect(@gnip_data.urls).not_to eq(nil)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it 'has language' do
|
|
45
|
+
expect(@gnip_data.language).not_to eq(nil)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'matching rules' do
|
|
49
|
+
before do
|
|
50
|
+
@matching_rules = @gnip_data.matching_rules
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it 'has no rule value' do
|
|
54
|
+
expect(@matching_rules.first.value).to eq(nil)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it 'has tag' do
|
|
58
|
+
expect(@matching_rules.first.tag).not_to eq(nil)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
context 'with short rules' do
|
|
65
|
+
before do
|
|
66
|
+
@activity = File.read(fixture_path.join('activities', 'real_activity.json'))
|
|
67
|
+
@activity = JSON.parse(@activity)
|
|
68
|
+
@gnip = @activity['gnip']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
it 'accepts gnip data' do
|
|
72
|
+
expect(Proc.new{Gnip::GnipData.new(@gnip)}).not_to raise_error
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
describe 'parsed GnipData' do
|
|
76
|
+
before do
|
|
77
|
+
@gnip_data = Gnip::GnipData.new(@gnip)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
it 'has matching rules' do
|
|
81
|
+
expect(@gnip_data.matching_rules).not_to eq(nil)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
it 'has urls' do
|
|
85
|
+
expect(@gnip_data.urls).not_to eq(nil)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it 'has language' do
|
|
89
|
+
expect(@gnip_data.language).not_to eq(nil)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
describe 'matching rules' do
|
|
93
|
+
before do
|
|
94
|
+
@matching_rules = @gnip_data.matching_rules
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
it 'has rule value' do
|
|
98
|
+
expect(@matching_rules.first.value).not_to eq(nil)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
it 'has tag' do
|
|
102
|
+
expect(@matching_rules.first.tag).not_to eq(nil)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe Gnip::Message do
|
|
4
|
+
describe '.build' do
|
|
5
|
+
context 'weird message' do
|
|
6
|
+
before do
|
|
7
|
+
@message = {'lolcat' => 'madcat'}
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it 'raises Undefinedmessage exception' do
|
|
11
|
+
expect(Proc.new{Gnip::Message.build(@message)}).to raise_error(Gnip::UndefinedMessage)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
context 'activity' do
|
|
16
|
+
before do
|
|
17
|
+
@activity = JSON.parse File.read(fixture_path.join('activities', 'real_activity.json'))
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'recognizes activity' do
|
|
21
|
+
expect(Proc.new{Gnip::Message.build(@activity)}).not_to raise_error
|
|
22
|
+
expect(Gnip::Message.build(@activity).class).to eq(Gnip::Activity)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context 'system_message' do
|
|
27
|
+
before do
|
|
28
|
+
@error = JSON.parse File.read(fixture_path.join('system_messages', 'error.json'))
|
|
29
|
+
@warn = JSON.parse File.read(fixture_path.join('system_messages', 'warn.json'))
|
|
30
|
+
@info = JSON.parse File.read(fixture_path.join('system_messages', 'info.json'))
|
|
31
|
+
end
|
|
32
|
+
it 'recognizes error message' do
|
|
33
|
+
expect(Proc.new{Gnip::Message.build(@error)}).not_to raise_error
|
|
34
|
+
expect(Gnip::Message.build(@error).class).to eq(Gnip::SystemMessage)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it 'recognizes warn message' do
|
|
38
|
+
expect(Proc.new{Gnip::Message.build(@warn)}).not_to raise_error
|
|
39
|
+
expect(Gnip::Message.build(@warn).class).to eq(Gnip::SystemMessage)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it 'recognizes info message' do
|
|
43
|
+
expect(Proc.new{Gnip::Message.build(@info)}).not_to raise_error
|
|
44
|
+
expect(Gnip::Message.build(@info).class).to eq(Gnip::SystemMessage)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe GnipApi::Limiters::Rules do
|
|
4
|
+
before do
|
|
5
|
+
@limiter = Object.new
|
|
6
|
+
@limiter.extend(GnipApi::Limiters::Rules)
|
|
7
|
+
@limiter.rules_init
|
|
8
|
+
allow(@limiter).to receive(:mutex).and_return(Mutex.new)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
describe '#rules_request_allowed?' do
|
|
12
|
+
before do
|
|
13
|
+
Timecop.freeze(Time.now)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
after do
|
|
17
|
+
Timecop.return
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it 'allows 5 requests' do
|
|
21
|
+
requests = []
|
|
22
|
+
5.times{requests << @limiter.rules_request_allowed?}
|
|
23
|
+
expect(requests.uniq).to eq([true])
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it 'does not allow more than 5 requests' do
|
|
27
|
+
5.times{@limiter.rules_request_allowed?}
|
|
28
|
+
expect(@limiter.rules_request_allowed?).to eq(false)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
describe '#reset_rules_if_expired' do
|
|
33
|
+
before do
|
|
34
|
+
Timecop.freeze(Time.now)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
after do
|
|
38
|
+
Timecop.return
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it 'does not reset if not expired' do
|
|
42
|
+
current_time = @limiter.rules_last_reset
|
|
43
|
+
current_count = @limiter.rules_requests
|
|
44
|
+
@limiter.reset_rules_if_expired!
|
|
45
|
+
expect(@limiter.rules_last_reset).to eq(current_time)
|
|
46
|
+
expect(@limiter.rules_requests).to eq(current_count)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'resets if expired' do
|
|
50
|
+
@limiter.add_rules_request!
|
|
51
|
+
current_time = @limiter.rules_last_reset
|
|
52
|
+
current_count = @limiter.rules_requests
|
|
53
|
+
Timecop.travel(Time.at(Time.now.to_i + 1))
|
|
54
|
+
@limiter.reset_rules_if_expired!
|
|
55
|
+
expect(@limiter.rules_last_reset).not_to eq(current_time)
|
|
56
|
+
expect(@limiter.rules_requests).not_to eq(current_count)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe '#seconds_since_last_rules_reset' do
|
|
61
|
+
before do
|
|
62
|
+
Timecop.freeze(Time.now)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
after do
|
|
66
|
+
Timecop.return
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it 'returns number of seconds since last reset' do
|
|
70
|
+
Timecop.travel(Time.at(Time.now.to_i + 1))
|
|
71
|
+
expect(@limiter.seconds_since_last_rules_request).to eq(1)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe GnipApi::Request do
|
|
4
|
+
it 'generates a request' do
|
|
5
|
+
expect(Proc.new{GnipApi::Request.new}).not_to raise_error
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
describe 'request data' do
|
|
9
|
+
before do
|
|
10
|
+
@uri = 'http://localt.com'
|
|
11
|
+
@payload = 'some_payload'
|
|
12
|
+
@headers = {:header => 'a_header'}
|
|
13
|
+
@method = 'POST'
|
|
14
|
+
@request = GnipApi::Request.new(:uri => @uri, :request_method => @method, :payload => @payload, :headers => @headers)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
it 'sets method' do
|
|
18
|
+
expect(@request.request_method).to eq(@method)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
it 'sets uri' do
|
|
22
|
+
expect(@request.uri).to eq(@uri)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it 'sets payload' do
|
|
26
|
+
expect(@request.payload).to eq(@payload)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'sets headers' do
|
|
30
|
+
expect(@request.headers).to eq(@headers)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe GnipApi::Response do
|
|
4
|
+
before { @uri = URI('http://somewhere.com') }
|
|
5
|
+
it 'creates a response' do
|
|
6
|
+
request = GnipApi::Request.new_get @uri
|
|
7
|
+
expect(Proc.new{GnipApi::Response.new(request, 200, 'body', {:header => 'a header'})}).not_to raise_error
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
describe 'response data' do
|
|
11
|
+
before do
|
|
12
|
+
@status = 100
|
|
13
|
+
@body = 'something'
|
|
14
|
+
@headers = {:header => 'something'}
|
|
15
|
+
@request = GnipApi::Request.new_get @uri
|
|
16
|
+
@response = GnipApi::Response.new(@request, @status, @body, @headers)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
it 'has a status' do
|
|
20
|
+
expect(@response.status).to eq(@status)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
it 'has a body' do
|
|
24
|
+
expect(@response.body).to eq(@body)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
it 'has headers' do
|
|
28
|
+
expect(@response.headers).to eq(@headers)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
class TestAdapter
|
|
2
|
+
def post request
|
|
3
|
+
return GnipApi::Response.new(request, 200, 'post_result', {:status => 'OK'})
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def delete request
|
|
7
|
+
return GnipApi::Response.new(request, 200, 'delete_result', {:status => 'OK'})
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def get request
|
|
11
|
+
return GnipApi::Response.new(request, 200, 'get_result', {:status => 'OK'})
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def stream_get request
|
|
15
|
+
end
|
|
16
|
+
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
require 'gnip_api'
|
|
2
|
+
require 'pry'
|
|
3
|
+
require 'lib/test_adapter.rb'
|
|
4
|
+
require 'timecop'
|
|
2
5
|
|
|
3
6
|
def configure_gem
|
|
4
7
|
GnipApi.configure do |config|
|
|
5
8
|
config.user = "someone"
|
|
6
9
|
config.password = "lolcat"
|
|
7
10
|
config.account = "something"
|
|
11
|
+
config.adapter_class = TestAdapter
|
|
8
12
|
end
|
|
9
13
|
end
|
|
14
|
+
|
|
15
|
+
def fixture_path
|
|
16
|
+
Pathname.new('spec/fixtures')
|
|
17
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gnip_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rayko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -80,6 +80,20 @@ dependencies:
|
|
|
80
80
|
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: timecop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
83
97
|
- !ruby/object:Gem::Dependency
|
|
84
98
|
name: httparty
|
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -130,6 +144,8 @@ extensions: []
|
|
|
130
144
|
extra_rdoc_files: []
|
|
131
145
|
files:
|
|
132
146
|
- ".gitignore"
|
|
147
|
+
- ".ruby-gemset"
|
|
148
|
+
- ".ruby-version"
|
|
133
149
|
- Gemfile
|
|
134
150
|
- Gemfile.lock
|
|
135
151
|
- LICENSE.txt
|
|
@@ -139,18 +155,68 @@ files:
|
|
|
139
155
|
- gnip_api.gemspec
|
|
140
156
|
- lib/gnip_api.rb
|
|
141
157
|
- lib/gnip_api/adapter.rb
|
|
158
|
+
- lib/gnip_api/adapters/base_adapter.rb
|
|
142
159
|
- lib/gnip_api/adapters/httparty_adapter.rb
|
|
143
160
|
- lib/gnip_api/apis/power_track/buffer.rb
|
|
161
|
+
- lib/gnip_api/apis/power_track/rule.rb
|
|
144
162
|
- lib/gnip_api/apis/power_track/rules.rb
|
|
145
163
|
- lib/gnip_api/apis/power_track/stream.rb
|
|
164
|
+
- lib/gnip_api/apis/search/count.rb
|
|
165
|
+
- lib/gnip_api/apis/search/query.rb
|
|
166
|
+
- lib/gnip_api/apis/search/result.rb
|
|
167
|
+
- lib/gnip_api/apis/search/stream.rb
|
|
146
168
|
- lib/gnip_api/configuration.rb
|
|
147
169
|
- lib/gnip_api/endpoints.rb
|
|
170
|
+
- lib/gnip_api/errors.rb
|
|
171
|
+
- lib/gnip_api/gnip/activity.rb
|
|
148
172
|
- lib/gnip_api/gnip/actor.rb
|
|
173
|
+
- lib/gnip_api/gnip/gnip_data.rb
|
|
149
174
|
- lib/gnip_api/gnip/message.rb
|
|
175
|
+
- lib/gnip_api/gnip/system_message.rb
|
|
176
|
+
- lib/gnip_api/gnip/url.rb
|
|
177
|
+
- lib/gnip_api/limiters/rules.rb
|
|
178
|
+
- lib/gnip_api/rate_limiter.rb
|
|
179
|
+
- lib/gnip_api/request.rb
|
|
180
|
+
- lib/gnip_api/response.rb
|
|
150
181
|
- lib/gnip_api/version.rb
|
|
182
|
+
- spec/fixtures/activities/full_activity.json
|
|
183
|
+
- spec/fixtures/activities/nil_urls.json
|
|
184
|
+
- spec/fixtures/activities/real_activity.json
|
|
185
|
+
- spec/fixtures/activities/real_activity_long_rules.json
|
|
186
|
+
- spec/fixtures/system_messages/error.json
|
|
187
|
+
- spec/fixtures/system_messages/info.json
|
|
188
|
+
- spec/fixtures/system_messages/warn.json
|
|
189
|
+
- spec/fixtures/twitter_messages/quote.json
|
|
190
|
+
- spec/fixtures/twitter_messages/retweet.json
|
|
191
|
+
- spec/fixtures/twitter_messages/retweet_long_rules.json
|
|
192
|
+
- spec/fixtures/twitter_messages/scrub_geo.json
|
|
193
|
+
- spec/fixtures/twitter_messages/status_delete.json
|
|
194
|
+
- spec/fixtures/twitter_messages/status_withheld.json
|
|
195
|
+
- spec/fixtures/twitter_messages/tweet.json
|
|
196
|
+
- spec/fixtures/twitter_messages/tweet_long_rules.json
|
|
197
|
+
- spec/fixtures/twitter_messages/user_delete.json
|
|
198
|
+
- spec/fixtures/twitter_messages/user_protect.json
|
|
199
|
+
- spec/fixtures/twitter_messages/user_suspend.json
|
|
200
|
+
- spec/fixtures/twitter_messages/user_undelete.json
|
|
201
|
+
- spec/fixtures/twitter_messages/user_unprotect.json
|
|
202
|
+
- spec/fixtures/twitter_messages/user_unsuspend.json
|
|
203
|
+
- spec/fixtures/twitter_messages/user_withheld.json
|
|
204
|
+
- spec/gnip_api/adapter_spec.rb
|
|
205
|
+
- spec/gnip_api/adapters/base_adapter_spec.rb
|
|
206
|
+
- spec/gnip_api/adapters/httparty_adapter_spec.rb
|
|
151
207
|
- spec/gnip_api/apis/power_track/buffer_spec.rb
|
|
208
|
+
- spec/gnip_api/apis/power_track/rule_spec.rb
|
|
209
|
+
- spec/gnip_api/apis/power_track/rules_spec.rb
|
|
210
|
+
- spec/gnip_api/apis/power_track/stream_spec.rb
|
|
152
211
|
- spec/gnip_api/configuration_spec.rb
|
|
153
212
|
- spec/gnip_api/endpoints_spec.rb
|
|
213
|
+
- spec/gnip_api/gnip/activity_spec.rb
|
|
214
|
+
- spec/gnip_api/gnip/gnip_data_spec.rb
|
|
215
|
+
- spec/gnip_api/gnip/message_spec.rb
|
|
216
|
+
- spec/gnip_api/limiters/rules_spec.rb
|
|
217
|
+
- spec/gnip_api/request_spec.rb
|
|
218
|
+
- spec/gnip_api/response_spec.rb
|
|
219
|
+
- spec/lib/test_adapter.rb
|
|
154
220
|
- spec/spec_helper.rb
|
|
155
221
|
- spec/test_spec.rb
|
|
156
222
|
homepage: ''
|
|
@@ -178,8 +244,43 @@ signing_key:
|
|
|
178
244
|
specification_version: 4
|
|
179
245
|
summary: GnipApi provides exposes all Gnip APIs.
|
|
180
246
|
test_files:
|
|
247
|
+
- spec/fixtures/activities/full_activity.json
|
|
248
|
+
- spec/fixtures/activities/nil_urls.json
|
|
249
|
+
- spec/fixtures/activities/real_activity.json
|
|
250
|
+
- spec/fixtures/activities/real_activity_long_rules.json
|
|
251
|
+
- spec/fixtures/system_messages/error.json
|
|
252
|
+
- spec/fixtures/system_messages/info.json
|
|
253
|
+
- spec/fixtures/system_messages/warn.json
|
|
254
|
+
- spec/fixtures/twitter_messages/quote.json
|
|
255
|
+
- spec/fixtures/twitter_messages/retweet.json
|
|
256
|
+
- spec/fixtures/twitter_messages/retweet_long_rules.json
|
|
257
|
+
- spec/fixtures/twitter_messages/scrub_geo.json
|
|
258
|
+
- spec/fixtures/twitter_messages/status_delete.json
|
|
259
|
+
- spec/fixtures/twitter_messages/status_withheld.json
|
|
260
|
+
- spec/fixtures/twitter_messages/tweet.json
|
|
261
|
+
- spec/fixtures/twitter_messages/tweet_long_rules.json
|
|
262
|
+
- spec/fixtures/twitter_messages/user_delete.json
|
|
263
|
+
- spec/fixtures/twitter_messages/user_protect.json
|
|
264
|
+
- spec/fixtures/twitter_messages/user_suspend.json
|
|
265
|
+
- spec/fixtures/twitter_messages/user_undelete.json
|
|
266
|
+
- spec/fixtures/twitter_messages/user_unprotect.json
|
|
267
|
+
- spec/fixtures/twitter_messages/user_unsuspend.json
|
|
268
|
+
- spec/fixtures/twitter_messages/user_withheld.json
|
|
269
|
+
- spec/gnip_api/adapter_spec.rb
|
|
270
|
+
- spec/gnip_api/adapters/base_adapter_spec.rb
|
|
271
|
+
- spec/gnip_api/adapters/httparty_adapter_spec.rb
|
|
181
272
|
- spec/gnip_api/apis/power_track/buffer_spec.rb
|
|
273
|
+
- spec/gnip_api/apis/power_track/rule_spec.rb
|
|
274
|
+
- spec/gnip_api/apis/power_track/rules_spec.rb
|
|
275
|
+
- spec/gnip_api/apis/power_track/stream_spec.rb
|
|
182
276
|
- spec/gnip_api/configuration_spec.rb
|
|
183
277
|
- spec/gnip_api/endpoints_spec.rb
|
|
278
|
+
- spec/gnip_api/gnip/activity_spec.rb
|
|
279
|
+
- spec/gnip_api/gnip/gnip_data_spec.rb
|
|
280
|
+
- spec/gnip_api/gnip/message_spec.rb
|
|
281
|
+
- spec/gnip_api/limiters/rules_spec.rb
|
|
282
|
+
- spec/gnip_api/request_spec.rb
|
|
283
|
+
- spec/gnip_api/response_spec.rb
|
|
284
|
+
- spec/lib/test_adapter.rb
|
|
184
285
|
- spec/spec_helper.rb
|
|
185
286
|
- spec/test_spec.rb
|