barge 0.5.0 → 0.6.0

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: 812d968b6233cf86946ddba0aadd71b5d7daa6c5
4
- data.tar.gz: 70cbacbf6cc75e8dddfd70a7255248204c880282
3
+ metadata.gz: 14cc331d2afc2f1568d5b02b05b2535a3d9129d1
4
+ data.tar.gz: 3b5a8377d815db33367aef61f048bf4cfd12a9bb
5
5
  SHA512:
6
- metadata.gz: 23349a278ef256a21002afbf8ff94a6056f25ecef565705a5819e1bf683b3d3b6de103533083fd63d65c247b8b95e3281250603b9fa093330d1bdc5d0b56b856
7
- data.tar.gz: 6c68c3c554d0c1b71e36721df1742f3018104af7f365ef4b37de42c4e1c99fbac64e86da6c36136d9e7dea0cfe0df2ebc5cb05e34bb7dec83d5c9a6c01c67b09
6
+ metadata.gz: ae136b0230f015bde2688a91a8f93c960a7d686c154d3a4aaeab78eb5ebbc51cc4b6812675289a47818015f06b206e403ff6d644722172a27cb8a265ff0c0923
7
+ data.tar.gz: 03525331f0589dc7238aa0c28056a367d1a82fafadebeaf5ef9eae6dbad27148b6564bfd691c38b05cece8e233645c4edb4474c558c92af95ec6c9faee2f05a8
data/README.md CHANGED
@@ -103,7 +103,7 @@ barge.droplet.create(options)
103
103
 
104
104
  See the [API documentation][droplet-create] for options.
105
105
 
106
- [droplet-create]: https://github.com/digitaloceancloud/api-v2-docs#droplet-create-a-new-droplet-post
106
+ [droplet-create]: https://developers.digitalocean.com/#create-a-new-droplet
107
107
 
108
108
  ### Show all droplets
109
109
 
@@ -248,7 +248,7 @@ barge.image.update(image_id, options)
248
248
 
249
249
  See the [API documentation][image-update] for options.
250
250
 
251
- [image-update]: https://github.com/digitaloceancloud/api-v2-docs#images-update-an-image-put
251
+ [image-update]: https://developers.digitalocean.com/#update-an-image
252
252
 
253
253
  ### Destroy image
254
254
 
@@ -281,7 +281,7 @@ barge.domain.create(options)
281
281
 
282
282
  See the [API documentation][domain-create] for options.
283
283
 
284
- [domain-create]: https://github.com/digitaloceancloud/api-v2-docs#domains-create-a-new-domain-post
284
+ [domain-create]: https://developers.digitalocean.com/#create-a-new-domain
285
285
 
286
286
  ### Show all domains
287
287
 
@@ -309,7 +309,7 @@ barge.domain.create_record(domain_name, options)
309
309
 
310
310
  See the [API documentation][domain-create-record] for options.
311
311
 
312
- [domain-create-record]: https://github.com/digitaloceancloud/api-v2-docs#domain-records-create-a-new-domain-record-post
312
+ [domain-create-record]: https://developers.digitalocean.com/#create-a-new-domain-record
313
313
 
314
314
  ### Show all domain records
315
315
 
@@ -346,7 +346,7 @@ barge.key.create(options)
346
346
 
347
347
  See the [API documentation][key-create] for options.
348
348
 
349
- [key-create]: https://github.com/digitaloceancloud/api-v2-docs#keys-create-a-new-key-post
349
+ [key-create]: https://developers.digitalocean.com/#create-a-new-key
350
350
 
351
351
  ### Show all keys
352
352
 
@@ -360,6 +360,16 @@ barge.key.all
360
360
  barge.key.show(key_id_or_fingerprint)
361
361
  ```
362
362
 
363
+ ### Update key
364
+
365
+ ``` ruby
366
+ barge.key.update(key_id_or_fingerprint, options)
367
+ ```
368
+
369
+ See the [API documentation][key-update] for options.
370
+
371
+ [key-update]: https://developers.digitalocean.com/#update-a-key
372
+
363
373
  ### Destroy key
364
374
 
365
375
  ``` ruby
@@ -83,7 +83,7 @@ module Barge
83
83
 
84
84
  def action(droplet_id, type, params = {})
85
85
  post("droplets/#{droplet_id}/actions",
86
- { type: type, params: params }.to_json)
86
+ { type: type }.merge(params).to_json)
87
87
  end
88
88
  end
89
89
  end
@@ -31,7 +31,7 @@ module Barge
31
31
 
32
32
  def action(image_id, type, params = {})
33
33
  post("images/#{image_id}/actions",
34
- { type: type, params: params }.to_json)
34
+ { type: type }.merge(params).to_json)
35
35
  end
36
36
  end
37
37
  end
@@ -15,6 +15,10 @@ module Barge
15
15
  get("account/keys/#{key_id}")
16
16
  end
17
17
 
18
+ def update(key_id, options)
19
+ put("account/keys/#{key_id}", options.to_json)
20
+ end
21
+
18
22
  def destroy(key_id)
19
23
  delete("account/keys/#{key_id}")
20
24
  end
data/lib/barge/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Barge
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 5
4
+ MINOR = 6
5
5
  PATCH = 0
6
6
 
7
7
  def self.to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Ørjan Blom"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday