barge 0.9.0 → 0.10.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: ee587fcb8b63dc226ba46746923a997175ebeb6a
4
- data.tar.gz: 9ee2443d877ef2d6299deb5bffdda8ed0294a5c2
3
+ metadata.gz: 6e47d6ce79184d2736005a88831b9d6a51fee2a1
4
+ data.tar.gz: 20625ab896bbd3ef8dba8df0ca5b6772075c85f0
5
5
  SHA512:
6
- metadata.gz: 9fd6c0fc454d507cc3287e872e8d58f27f425b499094f4cc29fbe5b8c96bbd0e903c884385f6c54620d6a9cecd7c4f0e1cbb3c0c1be67a0777787d87745da80e
7
- data.tar.gz: 8faeb0088fd79fd4c286c15ad9dbf7bb3a171f7e75fbfacf6e983e5e3f3e7bfd2ea77d51543993c55ca97e7f202bcb8018ff524fe5e0df1302117be58e08c81d
6
+ metadata.gz: 4abcd783bca750b1e0a792719d8cab8d2195d8bd0325edf75103102ddc5223c3e4ba55642d16787ebd8817f3c4b7a2ad82dc6f86b9e2cd41360df74cd4c122fb
7
+ data.tar.gz: a09c1dd117cf522b1733fb6a62cfcc8f3b4a4f4b88634879ffe8192e4627c2f33cad82f4679e61b52bbf7e8cee51696b7df205d2ef10c847fda877ea487a0d22
@@ -0,0 +1,56 @@
1
+ 2014-08-03 - 0.10.0
2
+ -------------------
3
+
4
+ * [Use option hashes everywhere for attributes](https://github.com/boats/barge/commit/731d7b9af6a4a69d29531166b2e3c793a14b2d5d)
5
+
6
+ 2014-07-27 - 0.9.0
7
+ ------------------
8
+
9
+ * [Add Droplet#snapshot](https://github.com/boats/barge/commit/7651ea6e142f2f096835a097428576084b773b24)
10
+
11
+ 2014-07-18 - 0.8.0
12
+ ------------------
13
+
14
+ * [Add basic pagination support](https://github.com/boats/barge/compare/8dd84d2...7dc6208)
15
+
16
+ 2014-07-03 - 0.7.0
17
+ ------------------
18
+
19
+ * [Add Droplet#enable_private_networking](https://github.com/boats/barge/commit/b6ebb9364abf0303f4f20c2e8560663f1e2bc97b)
20
+ * [Add Droplet#disable_backups](https://github.com/boats/barge/commit/aebb0fe8d8a656475d59eb836b8d3dff8b12f99b)
21
+ * [Add Droplet#enable_ipv6](https://github.com/boats/barge/commit/c6cff2754f0aa48d3c735b2f9411b91a8d4ae810)
22
+ * [Add Droplet#change_kernel](https://github.com/boats/barge/commit/4f84d00a7f71c00eebb51239131efc796d2ab8a2)
23
+
24
+ 2014-07-01 - 0.6.0
25
+ ------------------
26
+
27
+ * [Add Key#update](https://github.com/boats/barge/commit/bccd671e68ce42194577350fb6addf78ca9a46b2)
28
+
29
+ 2014-06-29 - 0.5.0
30
+ ------------------
31
+
32
+ * [Increase per_page](https://github.com/boats/barge/commit/fb5ef4d34aba9c2a6513411e8bbf85e80009f9c7)
33
+ * [Add Droplet#kernels](https://github.com/boats/barge/commit/6f0543af777707ff59c8fbcc8c421079cb4bd8d1)
34
+ * [Add Droplet#actions](https://github.com/boats/barge/commit/6e3a2f8da909c703095dce71d9d4fee495c40315)
35
+
36
+ 2014-06-28 - 0.4.0
37
+ ------------------
38
+
39
+ * [Add action resource](https://github.com/boats/barge/commit/5fac0be55860d96831d0c0aecd5d4de9f04217dd)
40
+
41
+ 2014-06-10 - 0.3.0
42
+ ------------------
43
+
44
+ * [Add Droplet#snapshots](https://github.com/boats/barge/commit/2f06fd03617f750388e6457d82abbb789ba397b0)
45
+ * [Add Droplet#backups](https://github.com/boats/barge/commit/7962e6d365d0ed699b037b50c0fe8ce461944630)
46
+
47
+ 2014-06-08 - 0.2.0
48
+ ------------------
49
+
50
+ * [Add Image#show_action](https://github.com/boats/barge/commit/7fb754f02d4f997a2f811ce62876bcb1f3292e9a)
51
+ * [Add Droplet#show_action](https://github.com/boats/barge/commit/ce1db15a98bc72c844c39fbbf8f1f5c753e340af)
52
+
53
+ 2014-06-07 - 0.1.0
54
+ ------------------
55
+
56
+ Initial release.
data/README.md CHANGED
@@ -55,9 +55,9 @@ can be accessed using dot notation:
55
55
 
56
56
  ``` ruby
57
57
  droplet = barge.droplet.show(droplet_id)
58
- droplet.droplet.name # => "foo"
59
- droplet.droplet.image.id # => 123
60
- droplet.droplet.size!.vcpus # => 1
58
+ droplet.droplet.name # => "foo"
59
+ droplet.droplet.image.id # => 123
60
+ droplet.droplet.size!.slug # => "512mb"
61
61
  ```
62
62
 
63
63
  Notice that `size!` and not `size` was used. This is because `size` already is
@@ -65,8 +65,8 @@ a method, and Hashie::Mash will not override it. You can also use square
65
65
  brackets:
66
66
 
67
67
  ``` ruby
68
- droplet[:droplet][:size][:vcpus] # => 1
69
- droplet['droplet']['size']['vcpus'] # => 1
68
+ droplet[:droplet][:size][:slug] # => "512mb"
69
+ droplet['droplet']['size']['slug'] # => "512mb"
70
70
  ```
71
71
 
72
72
  See the [API documentation on responses][api-responses] if you are wondering
@@ -76,24 +76,25 @@ instead.
76
76
 
77
77
  [api-responses]: https://developers.digitalocean.com/#responses
78
78
 
79
- ### success?
79
+ ### #success?
80
80
 
81
- You can use `success?` to check if a successful HTTP status code was returned:
81
+ You can use `#success?` to check if a successful HTTP status code was returned:
82
82
 
83
83
  ``` ruby
84
84
  barge.droplet.create(options).success? # => true
85
85
  ```
86
86
 
87
- ### response
87
+ ### #response
88
88
 
89
- Barge uses [Faraday][faraday]. You can use `response` to get to the response
90
- object:
89
+ Barge uses [Faraday][faraday]. You can use `#response` to get to the [response
90
+ object][faraday-response]:
91
91
 
92
92
  ``` ruby
93
93
  barge.droplet.show(droplet_id).response # => Faraday::Response
94
94
  ```
95
95
 
96
96
  [faraday]: https://github.com/lostisland/faraday
97
+ [faraday-response]: http://rubydoc.info/gems/faraday/Faraday/Response
97
98
 
98
99
  Pagination
99
100
  ----------
@@ -195,7 +196,7 @@ barge.droplet.snapshots(droplet_id)
195
196
  ### Create snapshot
196
197
 
197
198
  ``` ruby
198
- barge.droplet.snapshot(droplet_id, 'image name')
199
+ barge.droplet.snapshot(droplet_id, name: 'image name')
199
200
  ```
200
201
 
201
202
  ### Destroy droplet
@@ -207,7 +208,7 @@ barge.droplet.destroy(droplet_id)
207
208
  ### Rename droplet
208
209
 
209
210
  ``` ruby
210
- barge.droplet.rename(droplet_id, 'new name')
211
+ barge.droplet.rename(droplet_id, name: 'new name')
211
212
  ```
212
213
 
213
214
  ### Reboot droplet
@@ -243,7 +244,7 @@ barge.droplet.power_on(droplet_id)
243
244
  ### Resize droplet
244
245
 
245
246
  ``` ruby
246
- barge.droplet.resize(droplet_id, 'size slug')
247
+ barge.droplet.resize(droplet_id, size: 'size slug')
247
248
  ```
248
249
 
249
250
  Where *size slug* is for example `1024mb`.
@@ -251,13 +252,13 @@ Where *size slug* is for example `1024mb`.
251
252
  ### Rebuild droplet
252
253
 
253
254
  ``` ruby
254
- barge.droplet.rebuild(droplet_id, image_id)
255
+ barge.droplet.rebuild(droplet_id, image: image_id)
255
256
  ```
256
257
 
257
258
  ### Restore droplet
258
259
 
259
260
  ``` ruby
260
- barge.droplet.restore(droplet_id, image_id)
261
+ barge.droplet.restore(droplet_id, image: image_id)
261
262
  ```
262
263
 
263
264
  ### Reset a droplet's password
@@ -269,7 +270,7 @@ barge.droplet.password_reset(droplet_id)
269
270
  ### Change a droplet's kernel
270
271
 
271
272
  ``` ruby
272
- barge.droplet.change_kernel(droplet_id, kernel_id)
273
+ barge.droplet.change_kernel(droplet_id, kernel: kernel_id)
273
274
  ```
274
275
 
275
276
  ### Enable IPv6 for a droplet
@@ -346,7 +347,7 @@ barge.image.destroy(image_id)
346
347
  ### Transfer image
347
348
 
348
349
  ``` ruby
349
- barge.image.transfer(image_id, 'region slug')
350
+ barge.image.transfer(image_id, region: 'region slug')
350
351
  ```
351
352
 
352
353
  Where *region slug* is for example `sfo1`.
@@ -31,12 +31,12 @@ module Barge
31
31
  delete("droplets/#{droplet_id}")
32
32
  end
33
33
 
34
- def rename(droplet_id, name)
35
- action(droplet_id, __method__, name: name)
34
+ def rename(droplet_id, options)
35
+ action(droplet_id, __method__, options)
36
36
  end
37
37
 
38
- def snapshot(droplet_id, name)
39
- action(droplet_id, __method__, name: name)
38
+ def snapshot(droplet_id, options)
39
+ action(droplet_id, __method__, options)
40
40
  end
41
41
 
42
42
  def reboot(droplet_id)
@@ -59,24 +59,24 @@ module Barge
59
59
  action(droplet_id, __method__)
60
60
  end
61
61
 
62
- def resize(droplet_id, size)
63
- action(droplet_id, __method__, size: size)
62
+ def resize(droplet_id, options)
63
+ action(droplet_id, __method__, options)
64
64
  end
65
65
 
66
- def rebuild(droplet_id, image_id)
67
- action(droplet_id, __method__, image: image_id)
66
+ def rebuild(droplet_id, options)
67
+ action(droplet_id, __method__, options)
68
68
  end
69
69
 
70
- def restore(droplet_id, image_id)
71
- action(droplet_id, __method__, image: image_id)
70
+ def restore(droplet_id, options)
71
+ action(droplet_id, __method__, options)
72
72
  end
73
73
 
74
74
  def password_reset(droplet_id)
75
75
  action(droplet_id, __method__)
76
76
  end
77
77
 
78
- def change_kernel(droplet_id, kernel_id)
79
- action(droplet_id, __method__, kernel: kernel_id)
78
+ def change_kernel(droplet_id, options)
79
+ action(droplet_id, __method__, options)
80
80
  end
81
81
 
82
82
  def enable_ipv6(droplet_id)
@@ -19,8 +19,8 @@ module Barge
19
19
  delete("images/#{image_id}")
20
20
  end
21
21
 
22
- def transfer(image_id, region)
23
- action(image_id, __method__, region: region)
22
+ def transfer(image_id, options)
23
+ action(image_id, __method__, options)
24
24
  end
25
25
 
26
26
  def show_action(image_id, action_id)
@@ -1,7 +1,7 @@
1
1
  module Barge
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 9
4
+ MINOR = 10
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.9.0
4
+ version: 0.10.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-07-27 00:00:00.000000000 Z
11
+ date: 2014-08-03 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
+ - CHANGELOG.md
62
63
  - CONTRIBUTING.md
63
64
  - LICENSE
64
65
  - README.md