carrot-top 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/carrot-top.gemspec +1 -1
  2. data/lib/carrot-top.rb +5 -1
  3. metadata +7 -7
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "carrot-top"
6
- s.version = "0.0.4"
6
+ s.version = "0.0.5"
7
7
  s.authors = ["Sean Porter"]
8
8
  s.email = ["portertech@gmail.com"]
9
9
  s.homepage = "https://github.com/portertech/carrot-top"
@@ -31,6 +31,10 @@ class CarrotTop
31
31
 
32
32
  def method_missing(method, *args, &block)
33
33
  response = self.query_api(:path => "/#{method}")
34
- JSON.parse(response.body)
34
+ begin
35
+ JSON.parse(response.body)
36
+ rescue JSON::ParserError
37
+ Hash.new
38
+ end
35
39
  end
36
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrot-top
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70298040847220 !ruby/object:Gem::Requirement
16
+ requirement: &70110001810600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70298040847220
24
+ version_requirements: *70110001810600
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &70298040845860 !ruby/object:Gem::Requirement
27
+ requirement: &70110001809100 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70298040845860
35
+ version_requirements: *70110001809100
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: webmock
38
- requirement: &70298040843340 !ruby/object:Gem::Requirement
38
+ requirement: &70110001806840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70298040843340
46
+ version_requirements: *70110001806840
47
47
  description: A Ruby library for querying the RabbitMQ Management API
48
48
  email:
49
49
  - portertech@gmail.com