rackspace-monitoring 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.7
@@ -1,6 +1,5 @@
1
1
  require 'fog'
2
2
  require 'fog/core'
3
- require 'json'
4
3
 
5
4
  module Fog
6
5
  module Monitoring
@@ -119,7 +118,7 @@ module Fog
119
118
  end
120
119
  end
121
120
  unless response.body.empty?
122
- response.body = JSON.parse(response.body)
121
+ response.body = JSON.decode(response.body)
123
122
  end
124
123
  response
125
124
  rescue Exception => error
@@ -6,7 +6,7 @@ module Fog
6
6
  def create_agent_token(options = {})
7
7
  data = options.dup
8
8
  request(
9
- :body => JSON.generate(data),
9
+ :body => JSON.encode(data),
10
10
  :expects => [201],
11
11
  :method => 'POST',
12
12
  :path => 'agent_tokens'
@@ -6,7 +6,7 @@ module Fog
6
6
  def create_alarm(entity_id, options = {})
7
7
  data = options.dup
8
8
  request(
9
- :body => JSON.generate(data),
9
+ :body => JSON.encode(data),
10
10
  :expects => [201],
11
11
  :method => 'POST',
12
12
  :path => "entities/#{entity_id}/alarms"
@@ -6,7 +6,7 @@ module Fog
6
6
  def create_check(entity_id, options = {})
7
7
  data = options.dup
8
8
  request(
9
- :body => JSON.generate(data),
9
+ :body => JSON.encode(data),
10
10
  :expects => [201],
11
11
  :method => 'POST',
12
12
  :path => "entities/#{entity_id}/checks"
@@ -6,7 +6,7 @@ module Fog
6
6
  def create_entity(options = {})
7
7
  data = options.dup
8
8
  request(
9
- :body => JSON.generate(data),
9
+ :body => JSON.encode(data),
10
10
  :expects => [201],
11
11
  :method => 'POST',
12
12
  :path => 'entities'
@@ -7,7 +7,7 @@ module Fog
7
7
  options ||= {}
8
8
  data = {:values => options.dup}
9
9
  request(
10
- :body => JSON.generate(data),
10
+ :body => JSON.encode(data),
11
11
  :expects => [200],
12
12
  :method => 'POST',
13
13
  :path => "alarm_examples/#{id}"
@@ -5,7 +5,7 @@ module Fog
5
5
 
6
6
  def update_check(entity_id, id, options)
7
7
  request(
8
- :body => JSON.generate(options),
8
+ :body => JSON.encode(options),
9
9
  :expects => [204],
10
10
  :method => 'PUT',
11
11
  :path => "entities/#{entity_id}/checks/#{id}"
@@ -5,7 +5,7 @@ module Fog
5
5
 
6
6
  def update_entity(id, options)
7
7
  request(
8
- :body => JSON.generate(options),
8
+ :body => JSON.encode(options),
9
9
  :expects => [204],
10
10
  :method => 'PUT',
11
11
  :path => "entities/#{id}"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rackspace-monitoring
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dan Di Spaltro