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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODQ3MTQ0OWVkYTU5OGM5MWVmNjQxNDU3ZGU4ZjM3ZmQ5OWQ1MmI0Mw==
4
+ ZDFhOTUwMzEwYzRhNTRjOGY1Y2NmOGRiZDQ2MjFjMDRlNGUyMTVjZg==
5
5
  data.tar.gz: !binary |-
6
- NzMzMDhkMjQ5MWNkODUwMGU1OTVmZmFhYjkxMDBmYTAzMjM3YTRlYQ==
6
+ MTRkM2ZmMTA3NTRiNzY0MjExYmM1Yzk1M2MyMjQ3OGQyODY4NTdiMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTlhZDEzYjA3ZjA4MjAwNjJiNjRkYjVkZmE3YjAwM2M4YTRkZTNlMzdjMWM4
10
- NDRmMTVmZjdmYTY1OTA1YTk0YjhiZGI0MmE2NTQ2MDVmYWUyM2E5ODZkZjNi
11
- NDlkMzU0ZWEyNTI3MTQ1YjRkYWU1ZWViOWFmOTM1OTU0MGU1ZDc=
9
+ MjdmMTg4OWFkN2FmY2M1NDhmYzg5ZTdlNThhMzFjZWRkODI3MjNhOWMzMzJj
10
+ MWZlYjY3MjBjODVhNjM5Y2M1NmM1YWUzNDNkM2NkYzI3YmEwMjM1ZWIxMThj
11
+ YzA2YzE4NjdiNmU1NzQ4YzFhMzg4MWE0YmE5NzM3MjQwZGIzZTI=
12
12
  data.tar.gz: !binary |-
13
- YjM5MzQ2ZGZkZTdhY2YyM2U2NTcyZDg2NTY5N2U1ZWE1ZDliNzVmZjk4MTIy
14
- NmE0ZDY2ZWZmZWFjYzBmNWY4OTBlMzIyODljYmM2MTc1NDA4MTdmODc4M2Fm
15
- MDRlMGJmYTFiYTY3ODdmODg5ZTlhZjdjNTNiMGVkMWRhYTkzNDI=
13
+ NjI5ZGFiYjk5MTgxNGVjMTM0ZjJmMGJiM2VhNmI0NGY3MzQxOWU5ZGI5Zjlh
14
+ YzU5OTE5NTc3Y2VlNGNmMzdiNzQyOGI2NDM4MDIwN2EwMGNkNGY1NWVjNmU3
15
+ NmRkOWU0MjM0ODYwYTExYzkxMGRmODk0YTI5ODQ3NzBiZTk0Mjg=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.6
1
+ 1.2.7
@@ -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, :timeout => 60 )
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, :timeout => 60 )
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', :timeout => 60 )
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
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gnip-rules
3
3
  version: !ruby/object:Gem::Version
4
4
  version: !binary |-
5
- MS4yLjY=
5
+ MS4yLjc=
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Markowski