tutum-api 0.0.2 → 0.0.3

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f3e8f1378f3e0dc6ba521bd4177338c95a2d31e
4
- data.tar.gz: b491927751ab8cd48625ced60577f8c087eed642
3
+ metadata.gz: fadcd0b316aaf3e2a15cd5f5c92b3a4231c53bbc
4
+ data.tar.gz: 8d1c6c2170031082bf0b4e7f14a2eba4d596fb73
5
5
  SHA512:
6
- metadata.gz: 05a2e5d14cef3613af0cf84b7cdcdaf4c7626fb1a3603145207ac0d8490337fb20bbb4e64e9c155ba395d228a61c8cf9df839d53444e0772022a44213bcbb90e
7
- data.tar.gz: 1bce7ef45df309f3983ef8899357f2b5e14ce7cb1d1bbce7dd89d2bce73cf92b89a5e78a915b15432dbe006da1d2ebd27e2d6f2244112ba5be046b4f4f9f605d
6
+ metadata.gz: 3bf4eb0c47dc5cd3c356c60c0c207e7e62718c9e8695ec08637c481993de6ea8c1a0950eb37ea2d3d350e4a1a956dc4172626549c8f745b90ad8c564e7029d30
7
+ data.tar.gz: d359fdb2aa9a22209de767655201c29bf36e8a7195431dfe98b28bea4fbedd51d1b503c41007aea26d25a343454066a7a3d29b1e003f146c04c8a443da92d1b3
data/lib/tutum_actions.rb CHANGED
@@ -14,4 +14,4 @@ class TutumActions < TutumApi
14
14
  def get(uuid)
15
15
  http_get(get_url(uuid))
16
16
  end
17
- end
17
+ end
data/lib/tutum_api.rb CHANGED
@@ -15,18 +15,22 @@ class TutumApi
15
15
  end
16
16
 
17
17
  def http_get(path)
18
- RestClient.get(url(path), headers)
18
+ response = RestClient.get(url(path), headers)
19
+ JSON.parse(response)
19
20
  end
20
21
 
21
22
  def http_post(path, content={})
22
- RestClient.post(url(path), content.to_json, headers)
23
+ response = RestClient.post(url(path), content.to_json, headers)
24
+ JSON.parse(response)
23
25
  end
24
26
 
25
- def http_put(path, content={})
26
- RestClient.put(url(path), content.to_json, headers)
27
+ def http_patch(path, content={})
28
+ response = RestClient.patch(url(path), content.to_json, headers)
29
+ JSON.parse(response)
27
30
  end
28
31
 
29
32
  def http_delete(path)
30
- RestClient.delete(url(path), headers)
33
+ response = RestClient.delete(url(path), headers)
34
+ JSON.parse(response)
31
35
  end
32
36
  end
@@ -28,7 +28,7 @@ class TutumNodeClusters < TutumApi
28
28
  end
29
29
 
30
30
  def update(uuid, params)
31
- http_put(update_url(uuid), params)
31
+ http_patch(update_url(uuid), params)
32
32
  end
33
33
 
34
34
  def deploy_url(uuid)
@@ -14,4 +14,4 @@ class TutumNodeTypes < TutumApi
14
14
  def get(uuid)
15
15
  http_get(get_url(uuid))
16
16
  end
17
- end
17
+ end
@@ -14,5 +14,4 @@ class TutumProviders < TutumApi
14
14
  def get(uuid)
15
15
  http_get(get_url(uuid))
16
16
  end
17
-
18
- end
17
+ end
data/lib/tutum_regions.rb CHANGED
@@ -14,4 +14,4 @@ class TutumRegions < TutumApi
14
14
  def get(uuid)
15
15
  http_get(get_url(uuid))
16
16
  end
17
- end
17
+ end
@@ -36,7 +36,7 @@ class TutumServices < TutumApi
36
36
  end
37
37
 
38
38
  def update(uuid, params)
39
- http_put(update_url(uuid), params)
39
+ http_patch(update_url(uuid), params)
40
40
  end
41
41
 
42
42
  def start_url(uuid)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tutum-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josie Wright
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-10-29 00:00:00.000000000 Z
13
+ date: 2014-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -113,7 +113,7 @@ files:
113
113
  - lib/tutum_providers.rb
114
114
  - lib/tutum_regions.rb
115
115
  - lib/tutum_services.rb
116
- homepage: http://rubygems.org/gems/tutum-api
116
+ homepage: https://github.com/jozw/tutum-api
117
117
  licenses: []
118
118
  metadata: {}
119
119
  post_install_message:
@@ -135,5 +135,5 @@ rubyforge_project:
135
135
  rubygems_version: 2.2.2
136
136
  signing_key:
137
137
  specification_version: 4
138
- summary: A Ruby wrapper around the Tutum API
138
+ summary: A Ruby wrapper for the Tutum API
139
139
  test_files: []