gnip-rules 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile +5 -4
- data/README.md +5 -3
- data/VERSION +1 -1
- data/gnip-rules.gemspec +1 -1
- data/lib/gnip-rules/api.rb +7 -0
- data/lib/gnip-rules/response.rb +8 -0
- data/lib/gnip-rules/version.rb +3 -0
- data/lib/gnip-rules.rb +3 -8
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmM3MmY3ZTI4NGJlMzE2ODJhNGQ0OTU2YTk2ZTMyMzdlMmM3MjM3ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjFjOWQ0MjI2MDFlNWIzZjNkYTgzOWZhMzViN2Q1NjQ2YWVhMzZmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODNjNTA1ZTE5YzI1MDRlNzY5NTc1NTM4MjEzMzk0NzhjZDc3ZjJlY2E4ZDRl
|
10
|
+
YTRmODEzYTM4M2Q3ZjI5MDA1NjEzMTQxZGM2NGY3M2M1NWI4MzI3NDcyMDVi
|
11
|
+
NjM2NTI5N2QxZWYxOTM3NWFjNmMzZDE2YTU2MGNhNDZmODBhOGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDZkYTY0YzQ4MWRhYjM4NzAxN2JkZWFhNzAyZjI5YTZlYTk1MGMwMjg0ZTBj
|
14
|
+
YTFiMzE0M2ZmMWY1MTVmZjA5ZjhmMTM5OGNiZjU5ZTRiMGI2Njk3MDNiMjI4
|
15
|
+
YThiZjkxNjZmOGI3MGNhMTc3OWJjZWY1ZGU5M2EwZGQ5ZWY4MGI=
|
data/Gemfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
gemspec
|
1
|
+
gemspec
|
2
|
+
source 'https://rubygems.org'
|
2
3
|
|
3
|
-
gem 'httparty', '~> 0.
|
4
|
+
gem 'httparty', '~> 0.13.1'
|
4
5
|
gem 'rake', '>= 0.9.2.2'
|
5
|
-
gem 'json', '~> 1.
|
6
|
+
gem 'json', '~> 1.8'
|
6
7
|
gem 'activesupport', '~> 3.1.3'
|
7
8
|
|
8
9
|
# Add dependencies to develop your gem here.
|
@@ -11,6 +12,6 @@ group :development do
|
|
11
12
|
gem 'shoulda-context'
|
12
13
|
gem 'turn'
|
13
14
|
gem 'assert2'
|
14
|
-
gem "bundler", "~> 1.
|
15
|
+
gem "bundler", "~> 1.5.0"
|
15
16
|
gem "rcov", ">= 0"
|
16
17
|
end
|
data/README.md
CHANGED
@@ -50,20 +50,22 @@ There are two ways you can provide credentials to the gnip-api gem.
|
|
50
50
|
### Listing
|
51
51
|
|
52
52
|
```ruby
|
53
|
-
response = @gnip_rules.list
|
53
|
+
response = @gnip_rules.list.rules
|
54
54
|
p response #=> {"rules": {"value":"larl -bang", "value":"#larloperator"} }
|
55
55
|
```
|
56
56
|
|
57
57
|
### Removing All Rules
|
58
58
|
|
59
|
-
This is really just for convienience while testing. You probably shouldn't ever use this in production.
|
59
|
+
This is really just for convienience while testing. You probably shouldn't ever use this in production. This method loads all the rules from gnip and passes them to the remove method. There is a 3 second pause in between the list and delete to avoid rate limiting.
|
60
60
|
|
61
61
|
```ruby
|
62
62
|
response = @gnip_rules.delete_all!
|
63
63
|
p response #=> 200 OK
|
64
|
-
@gnip.list
|
64
|
+
@gnip.list.rules.empty? #=> true
|
65
65
|
```
|
66
66
|
|
67
|
+
|
68
|
+
|
67
69
|
## Running Tests
|
68
70
|
|
69
71
|
Make sure you have the config file mentioned above at config/gnip.yml
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
data/gnip-rules.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'gnip-rules/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "gnip-rules"
|
8
|
-
spec.version = Gnip::
|
8
|
+
spec.version = Gnip::VERSION
|
9
9
|
spec.authors = ["Spencer Markowski", "The Able Few"]
|
10
10
|
spec.email = ["spencer@theablefew.com"]
|
11
11
|
spec.description = "Remove, Add and List your Gnip Rules"
|
data/lib/gnip-rules/api.rb
CHANGED
data/lib/gnip-rules/response.rb
CHANGED
data/lib/gnip-rules.rb
CHANGED
@@ -27,11 +27,6 @@ module Gnip
|
|
27
27
|
self.class.base_uri uri
|
28
28
|
end
|
29
29
|
|
30
|
-
def delete_all!
|
31
|
-
rules = self.list.rules
|
32
|
-
sleep 3
|
33
|
-
self.remove( rules )
|
34
|
-
end
|
35
30
|
|
36
31
|
private
|
37
32
|
|
@@ -43,9 +38,9 @@ module Gnip
|
|
43
38
|
You must provide a configuration file at config/gnip.yml
|
44
39
|
|
45
40
|
development: &development
|
46
|
-
username: omg@omg.com
|
47
|
-
password:
|
48
|
-
account:
|
41
|
+
username: omg@omg.com
|
42
|
+
password: your_password
|
43
|
+
account: your_account
|
49
44
|
streaming_url: 'https://stream.gnip.com:443/accounts/YOUR_ACCOUNT/publishers/twitter/streams/track/prod/'
|
50
45
|
|
51
46
|
RUBY
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gnip-rules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
version: !binary |-
|
5
|
-
|
5
|
+
MS4yLjE=
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Spencer Markowski
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- lib/gnip-rules/api.rb
|
60
60
|
- lib/gnip-rules/response.rb
|
61
61
|
- lib/gnip-rules/rule.rb
|
62
|
+
- lib/gnip-rules/version.rb
|
62
63
|
- test/helper.rb
|
63
64
|
- test/test_gnip-rules.rb
|
64
65
|
- test/test_rule.rb
|