gnip-rules 1.2.6 → 1.2.7
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 +8 -8
- data/VERSION +1 -1
- data/lib/gnip-rules/api.rb +3 -3
- data/lib/gnip-rules.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDFhOTUwMzEwYzRhNTRjOGY1Y2NmOGRiZDQ2MjFjMDRlNGUyMTVjZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTRkM2ZmMTA3NTRiNzY0MjExYmM1Yzk1M2MyMjQ3OGQyODY4NTdiMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjdmMTg4OWFkN2FmY2M1NDhmYzg5ZTdlNThhMzFjZWRkODI3MjNhOWMzMzJj
|
10
|
+
MWZlYjY3MjBjODVhNjM5Y2M1NmM1YWUzNDNkM2NkYzI3YmEwMjM1ZWIxMThj
|
11
|
+
YzA2YzE4NjdiNmU1NzQ4YzFhMzg4MWE0YmE5NzM3MjQwZGIzZTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjI5ZGFiYjk5MTgxNGVjMTM0ZjJmMGJiM2VhNmI0NGY3MzQxOWU5ZGI5Zjlh
|
14
|
+
YzU5OTE5NTc3Y2VlNGNmMzdiNzQyOGI2NDM4MDIwN2EwMGNkNGY1NWVjNmU3
|
15
|
+
NmRkOWU0MjM0ODYwYTExYzkxMGRmODk0YTI5ODQ3NzBiZTk0Mjg=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.7
|
data/lib/gnip-rules/api.rb
CHANGED
@@ -3,16 +3,16 @@ module Gnip
|
|
3
3
|
def add(rules)
|
4
4
|
options = ActiveSupport::JSON.encode( {:rules => rules} )
|
5
5
|
puts options
|
6
|
-
Gnip::Response.new self.class.post('/rules.json', :body => options
|
6
|
+
Gnip::Response.new self.class.post('/rules.json', :body => options)
|
7
7
|
end
|
8
8
|
|
9
9
|
def remove( rules )
|
10
10
|
options = ActiveSupport::JSON.encode( {:rules => rules} )
|
11
|
-
Gnip::Response.new self.class.delete('/rules.json', :body => options
|
11
|
+
Gnip::Response.new self.class.delete('/rules.json', :body => options)
|
12
12
|
end
|
13
13
|
|
14
14
|
def list
|
15
|
-
Gnip::Response.new self.class.get( '/rules.json'
|
15
|
+
Gnip::Response.new self.class.get( '/rules.json')
|
16
16
|
end
|
17
17
|
|
18
18
|
def delete_all!
|
data/lib/gnip-rules.rb
CHANGED
@@ -14,7 +14,7 @@ module Gnip
|
|
14
14
|
headers 'Accept' => 'application/json', 'Content-Type' => 'application/json'
|
15
15
|
format :json
|
16
16
|
|
17
|
-
def initialize( configuration = nil, username = nil, password = nil, uri = nil )
|
17
|
+
def initialize( configuration = nil, username = nil, password = nil, uri = nil, timeout = 60 )
|
18
18
|
@configuration_file = configuration
|
19
19
|
unless username && password && uri
|
20
20
|
load_credentials!
|
@@ -25,6 +25,7 @@ module Gnip
|
|
25
25
|
|
26
26
|
self.class.basic_auth username , password
|
27
27
|
self.class.base_uri uri
|
28
|
+
self.class.default_timeout timeout
|
28
29
|
end
|
29
30
|
|
30
31
|
|