barge 0.1.0 → 0.2.0

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: a3508385a65f762c38891540ba2c37544e4ab89f
4
- data.tar.gz: 69b2373c7d80246b12f180f531d65f95c6a6ad85
3
+ metadata.gz: 2ba2d56eb1aefe8844f1cfdede0bcc31a66c6212
4
+ data.tar.gz: f875f5aeb71cbab91361020393b11e95a0510b20
5
5
  SHA512:
6
- metadata.gz: 4aeeeb86c1a73d8a91c443df99c3eb41242d42b8ad431c845bb3b6c01f6f1c047880e03f293cffa68dd4d417d6e0ba68a8cd708d0c0246f980e00696b3c23bc4
7
- data.tar.gz: d5f51677663b6f0598db96b64cdf3d6f5b019b7659629186d74ffa486e0a71bb648eb5797f811a133c6884d75376120aa27e694c95f0b3b5bf026dacf9f49dfe
6
+ metadata.gz: d09c27c68506ce2744c2301b06a4d6f2549094fa1641a438f189138f8ffea25c4182fcf08f81c91393ec3b0c79cef6d832d2c77ca28aee6bf04d47c418347f4d
7
+ data.tar.gz: 5254c993f1de915069ed1e18b6cdf673732be65be6335a74c6284d21a0bf5bba3bc75bfa67505e93950ff8b6be30ec40cabdd50c25265c792e6f4e4aa3bc055e
@@ -0,0 +1,19 @@
1
+ Contributing
2
+ ============
3
+
4
+ 1. **Topic branch**. Work in a dedicated topic branch. Rebase against master
5
+ before submitting your pull request if master has changed.
6
+
7
+ 2. **Commit message format**. See [this][format] and use present tense (*Add
8
+ feature*, not *Added feature*).
9
+
10
+ 3. **Squash commits**. Squash related commits together. If there is no good
11
+ reason to have separate commits for something, combine them.
12
+
13
+ 4. **Passing tests**. Run `bundle exec rake`. This will run RuboCop and RSpec.
14
+
15
+ 5. **Code coverage**. `bundle exec rake coverage` should report 100% coverage.
16
+
17
+ Thank you!
18
+
19
+ [format]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
data/README.md CHANGED
@@ -1,18 +1,20 @@
1
1
  Barge
2
2
  =====
3
3
 
4
+ [![Gem Version](http://img.shields.io/gem/v/barge.svg)][gem]
4
5
  [![Build Status](http://img.shields.io/travis/boats/barge.svg)][travis]
5
6
  [![Coverage Status](http://img.shields.io/coveralls/boats/barge.svg)][coveralls]
6
7
  [![Code Climate](http://img.shields.io/codeclimate/github/boats/barge.svg)][codeclimate]
7
8
  [![Dependency Status](http://img.shields.io/gemnasium/boats/barge.svg)][gemnasium]
8
9
 
10
+ [gem]: http://rubygems.org/gems/barge
9
11
  [travis]: https://travis-ci.org/boats/barge
10
12
  [coveralls]: https://coveralls.io/r/boats/barge
11
13
  [codeclimate]: https://codeclimate.com/github/boats/barge
12
14
  [gemnasium]: https://gemnasium.com/boats/barge
13
15
 
14
- Ruby library for version 2 of
15
- [DigitalOcean's API](https://developers.digitalocean.com/).
16
+ Ruby library for [version 2 of DigitalOcean's
17
+ API](https://github.com/digitaloceancloud/api-v2-docs).
16
18
 
17
19
  **Please note that version 2 of DigitalOcean's API is in beta, and is still
18
20
  being developed. Everything is subject to change.**
@@ -86,7 +88,7 @@ barge.droplet.create(options)
86
88
 
87
89
  See the [API documentation][droplet-create] for options.
88
90
 
89
- [droplet-create]: https://github.com/digitaloceancloud/api-v2-docs#droplet-create-post
91
+ [droplet-create]: https://github.com/digitaloceancloud/api-v2-docs#droplet-create-a-new-droplet-post
90
92
 
91
93
  ### Show all droplets
92
94
 
@@ -168,6 +170,12 @@ barge.droplet.restore(droplet_id, image_id)
168
170
  barge.droplet.password_reset(droplet_id)
169
171
  ```
170
172
 
173
+ ### Show droplet action
174
+
175
+ ``` ruby
176
+ barge.droplet.show_action(droplet_id, action_id)
177
+ ```
178
+
171
179
  Image
172
180
  -----
173
181
 
@@ -201,7 +209,7 @@ barge.image.update(image_id, options)
201
209
 
202
210
  See the [API documentation][image-update] for options.
203
211
 
204
- [image-update]: https://github.com/digitaloceancloud/api-v2-docs#images-update-put
212
+ [image-update]: https://github.com/digitaloceancloud/api-v2-docs#images-update-an-image-put
205
213
 
206
214
  ### Destroy image
207
215
 
@@ -217,6 +225,12 @@ barge.image.transfer(image_id, 'region slug')
217
225
 
218
226
  Where *region slug* is for example `sfo1`.
219
227
 
228
+ ### Show image action
229
+
230
+ ``` ruby
231
+ barge.image.show_action(image_id, action_id)
232
+ ```
233
+
220
234
  Domain
221
235
  ------
222
236
 
@@ -228,7 +242,7 @@ barge.domain.create(options)
228
242
 
229
243
  See the [API documentation][domain-create] for options.
230
244
 
231
- [domain-create]: https://github.com/digitaloceancloud/api-v2-docs#domain-records-create-post
245
+ [domain-create]: https://github.com/digitaloceancloud/api-v2-docs#domains-create-a-new-domain-post
232
246
 
233
247
  ### Show all domains
234
248
 
@@ -256,7 +270,7 @@ barge.domain.create_record(domain_name, options)
256
270
 
257
271
  See the [API documentation][domain-create-record] for options.
258
272
 
259
- [domain-create-record]: https://github.com/digitaloceancloud/api-v2-docs#domain-records-create-post
273
+ [domain-create-record]: https://github.com/digitaloceancloud/api-v2-docs#domain-records-create-a-new-domain-record-post
260
274
 
261
275
  ### Show all domain records
262
276
 
@@ -293,7 +307,7 @@ barge.key.create(options)
293
307
 
294
308
  See the [API documentation][key-create] for options.
295
309
 
296
- [key-create]: https://github.com/digitaloceancloud/api-v2-docs#keys-create-post
310
+ [key-create]: https://github.com/digitaloceancloud/api-v2-docs#keys-create-a-new-key-post
297
311
 
298
312
  ### Show all keys
299
313
 
@@ -59,6 +59,10 @@ module Barge
59
59
  action(droplet_id, __method__)
60
60
  end
61
61
 
62
+ def show_action(droplet_id, action_id)
63
+ get("droplets/#{droplet_id}/actions/#{action_id}")
64
+ end
65
+
62
66
  private
63
67
 
64
68
  def action(droplet_id, type, params = {})
@@ -23,6 +23,10 @@ module Barge
23
23
  action(image_id, __method__, region: region)
24
24
  end
25
25
 
26
+ def show_action(image_id, action_id)
27
+ get("images/#{image_id}/actions/#{action_id}")
28
+ end
29
+
26
30
  private
27
31
 
28
32
  def action(image_id, type, params = {})
@@ -1,7 +1,7 @@
1
1
  module Barge
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 1
4
+ MINOR = 2
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.1.0
4
+ version: 0.2.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-07 00:00:00.000000000 Z
11
+ date: 2014-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - CONTRIBUTING.md
62
63
  - LICENSE
63
64
  - README.md
64
65
  - lib/barge.rb