scalr_api_v2 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88fb75c5f8f55a72130481651889c0ab9c56823d
4
- data.tar.gz: 937534bc0d5823556136a50e7c41300b4c3d10e6
3
+ metadata.gz: 8d9424c3a0e3e7a46c0bf1c92bc0f46d541a165f
4
+ data.tar.gz: 8d84a43070160837901b3a5c5905ba24bfefab17
5
5
  SHA512:
6
- metadata.gz: 293b1980f69372cae7726c239909a8929e85d5bd9e576d5191b1c501e3c77a1f4356a78b96b4abbd3659f242fde4876ff33296958b80464cf68535f3b96037df
7
- data.tar.gz: a413e910a14eb2b0aa9014267d10774742418a94636f8cfb65c13bbe8621d6293406bce661e2cbd2f5d3fe606a22cfa098c9dec09bc4d5a1c7857951a7e4e3de
6
+ metadata.gz: 3703ed23cb5881541916b49606059ea19487e303c3899394e86efb27a59cb39c4ab30d528e9e18ac090a2d8633963945460836a6d379c446882ecf4f011601a0
7
+ data.tar.gz: bf1050c276c2df39863930d467d9a7909176b6cf87531a09ca22ae8c0f04c85c1a7e84a4e8b5408a825d865df334170165becb0fd64a69b18b6e805d0417daf8
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.2.1
2
+
3
+ * Bugfix: duplicate json encoding was taking place in Scripts class
4
+
1
5
  == 0.2.0
2
6
 
3
7
  * Added account/user logic based on SCALR_ENV_ID being set. Defaults to 'account' mode if nil
@@ -30,31 +30,31 @@ module ScalrApiV2
30
30
 
31
31
  # Create script accepts script_object as hash and generates JSON before making SCALR api call
32
32
  def create(script_object)
33
- item = @scalr.create(format('/api/v1beta0/%s/scripts/', @config['mode_path']), JSON.generate(script_object))
33
+ item = @scalr.create(format('/api/v1beta0/%s/scripts/', @config['mode_path']), script_object)
34
34
  return item
35
35
  end
36
36
 
37
37
  # Create script version
38
38
  def create_version(script_id, script_object)
39
- item = @scalr.create(format('/api/v1beta0/%s/scripts/%s/script-versions/', @config['mode_path'], script_id), JSON.generate(script_object))
39
+ item = @scalr.create(format('/api/v1beta0/%s/scripts/%s/script-versions/', @config['mode_path'], script_id), script_object)
40
40
  return item
41
41
  end
42
42
 
43
43
  # Update script version
44
44
  def update_version(script_id, script_version, script_object)
45
- item = @scalr.patch(format('/api/v1beta0/%s/scripts/%s/script-versions/%s/', @config['mode_path'], script_id, script_version), JSON.generate(script_object))
45
+ item = @scalr.patch(format('/api/v1beta0/%s/scripts/%s/script-versions/%s/', @config['mode_path'], script_id, script_version), script_object)
46
46
  return item
47
47
  end
48
48
 
49
49
  # execute version
50
50
  def execute(script_id, script_execution_object)
51
- item = @scalr.post(format('/api/v1beta0/%s/scripts/%s/actions/execute', @config['mode_path'], script_id), JSON.generate(script_execution_object))
51
+ item = @scalr.post(format('/api/v1beta0/%s/scripts/%s/actions/execute', @config['mode_path'], script_id), script_execution_object)
52
52
  return item
53
53
  end
54
54
 
55
55
  # execute script version
56
56
  def execute_version(script_id, script_version, script_execution_object)
57
- item = @scalr.post(format('/api/v1beta0/%s/scripts/%s/script-versions/%s/actions/execute', @config['mode_path'], script_id, script_version), JSON.generate(script_execution_object))
57
+ item = @scalr.post(format('/api/v1beta0/%s/scripts/%s/script-versions/%s/actions/execute', @config['mode_path'], script_id, script_version), script_execution_object)
58
58
  return item
59
59
  end
60
60
  end
@@ -1,4 +1,4 @@
1
1
  # ScalrApiV2::VERSION
2
2
  module ScalrApiV2
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scalr_api_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - david.meekin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-18 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler