tugboat 1.3.1 → 2.0.0.RC1

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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +12 -8
  4. data/lib/tugboat/cli.rb +8 -7
  5. data/lib/tugboat/config.rb +8 -12
  6. data/lib/tugboat/middleware/add_key.rb +9 -6
  7. data/lib/tugboat/middleware/ask_for_credentials.rb +7 -8
  8. data/lib/tugboat/middleware/check_configuration.rb +1 -1
  9. data/lib/tugboat/middleware/check_credentials.rb +4 -2
  10. data/lib/tugboat/middleware/config.rb +3 -4
  11. data/lib/tugboat/middleware/create_droplet.rb +32 -26
  12. data/lib/tugboat/middleware/destroy_droplet.rb +6 -6
  13. data/lib/tugboat/middleware/destroy_image.rb +6 -6
  14. data/lib/tugboat/middleware/find_droplet.rb +20 -16
  15. data/lib/tugboat/middleware/find_image.rb +17 -10
  16. data/lib/tugboat/middleware/halt_droplet.rb +8 -8
  17. data/lib/tugboat/middleware/info_droplet.rb +38 -25
  18. data/lib/tugboat/middleware/info_image.rb +5 -5
  19. data/lib/tugboat/middleware/inject_client.rb +3 -9
  20. data/lib/tugboat/middleware/list_droplets.rb +6 -4
  21. data/lib/tugboat/middleware/list_images.rb +28 -23
  22. data/lib/tugboat/middleware/list_regions.rb +3 -3
  23. data/lib/tugboat/middleware/list_sizes.rb +3 -3
  24. data/lib/tugboat/middleware/list_ssh_keys.rb +5 -4
  25. data/lib/tugboat/middleware/password_reset.rb +7 -7
  26. data/lib/tugboat/middleware/rebuild_droplet.rb +8 -8
  27. data/lib/tugboat/middleware/resize_droplet.rb +7 -7
  28. data/lib/tugboat/middleware/restart_droplet.rb +8 -8
  29. data/lib/tugboat/middleware/snapshot_droplet.rb +6 -6
  30. data/lib/tugboat/middleware/ssh_droplet.rb +3 -1
  31. data/lib/tugboat/middleware/start_droplet.rb +6 -6
  32. data/lib/tugboat/middleware/wait_for_state.rb +6 -6
  33. data/lib/tugboat/version.rb +1 -1
  34. data/spec/cli/add_key_spec.rb +16 -9
  35. data/spec/cli/authorize_cli_spec.rb +24 -29
  36. data/spec/cli/config_cli_spec.rb +57 -0
  37. data/spec/cli/create_cli_spec.rb +18 -28
  38. data/spec/cli/debug_cli_spec.rb +8 -14
  39. data/spec/cli/destroy_cli_spec.rb +39 -50
  40. data/spec/cli/destroy_image_cli_spec.rb +33 -39
  41. data/spec/cli/droplets_cli_spec.rb +15 -12
  42. data/spec/cli/halt_cli_spec.rb +50 -46
  43. data/spec/cli/images_cli_spec.rb +134 -58
  44. data/spec/cli/info_cli_spec.rb +139 -139
  45. data/spec/cli/info_image_cli_spec.rb +113 -26
  46. data/spec/cli/keys_cli_spec.rb +7 -5
  47. data/spec/cli/password_reset_cli_spec.rb +46 -44
  48. data/spec/cli/rebuild_cli_spec.rb +187 -101
  49. data/spec/cli/regions_cli_spec.rb +13 -6
  50. data/spec/cli/resize_cli_spec.rb +51 -48
  51. data/spec/cli/restart_cli_spec.rb +41 -39
  52. data/spec/cli/sizes_cli_spec.rb +13 -8
  53. data/spec/cli/snapshot_cli_spec.rb +36 -37
  54. data/spec/cli/ssh_cli_spec.rb +7 -15
  55. data/spec/cli/start_cli_spec.rb +39 -35
  56. data/spec/cli/verify_cli_spec.rb +20 -12
  57. data/spec/cli/wait_cli_spec.rb +43 -27
  58. data/spec/config_spec.rb +19 -25
  59. data/spec/fixtures/create_droplet.json +44 -0
  60. data/spec/fixtures/create_ssh_key.json +4 -4
  61. data/spec/fixtures/create_ssh_key_from_file.json +8 -0
  62. data/spec/fixtures/droplet_start_response.json +13 -0
  63. data/spec/fixtures/not_found.json +4 -0
  64. data/spec/fixtures/password_reset_response.json +13 -0
  65. data/spec/fixtures/power_cycle_response.json +13 -0
  66. data/spec/fixtures/resize_droplet.json +13 -0
  67. data/spec/fixtures/restart_response.json +13 -0
  68. data/spec/fixtures/show_coreos_image.json +23 -0
  69. data/spec/fixtures/show_droplet.json +90 -11
  70. data/spec/fixtures/show_droplet_inactive.json +90 -11
  71. data/spec/fixtures/show_droplets.json +249 -30
  72. data/spec/fixtures/show_droplets_empty.json +5 -2
  73. data/spec/fixtures/show_image.json +14 -7
  74. data/spec/fixtures/show_images.json +1075 -13
  75. data/spec/fixtures/show_images_global.json +25 -16
  76. data/spec/fixtures/show_keys.json +15 -7
  77. data/spec/fixtures/show_redmine_image.json +24 -0
  78. data/spec/fixtures/show_regions.json +181 -12
  79. data/spec/fixtures/show_sizes.json +178 -9
  80. data/spec/fixtures/shutdown_response.json +13 -0
  81. data/spec/fixtures/snapshot_response.json +13 -0
  82. data/spec/fixtures/ubuntu_image_9801951.json +24 -0
  83. data/spec/middleware/check_credentials_spec.rb +4 -3
  84. data/spec/middleware/inject_client_spec.rb +2 -2
  85. data/spec/shared/environment.rb +6 -7
  86. data/spec/spec_helper.rb +1 -1
  87. data/tugboat.gemspec +39 -19
  88. metadata +50 -14
  89. data/spec/fixtures/show_droplet_fuzzy.json +0 -13
  90. data/spec/fixtures/show_droplets_fuzzy.json +0 -35
  91. data/spec/fixtures/show_droplets_inactive.json +0 -37
data/tugboat.gemspec CHANGED
@@ -4,30 +4,50 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'tugboat/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
- gem.name = "tugboat"
7
+ gem.name = 'tugboat'
8
8
  gem.version = Tugboat::VERSION
9
- gem.authors = ["Jack Pearkes"]
10
- gem.email = ["jackpearkes@gmail.com"]
11
- gem.description = %q{A command line tool for interacting with your DigitalOcean droplets.}
12
- gem.summary = %q{A command line tool for interacting with your DigitalOcean droplets.}
13
- gem.homepage = "https://github.com/pearkes/tugboat"
9
+ gem.authors = ['Jack Pearkes', 'Peter Souter', 'Ørjan Blom']
10
+ gem.email = ['jackpearkes@gmail.com']
11
+ gem.description = 'A command line tool for interacting with your DigitalOcean droplets.'
12
+ gem.summary = 'A command line tool for interacting with your DigitalOcean droplets.'
13
+ gem.homepage = 'https://github.com/pearkes/tugboat'
14
14
 
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
- gem.required_ruby_version = ">= 1.9.2"
18
+ gem.require_paths = ['lib']
19
+ gem.required_ruby_version = '>= 1.9.2'
20
20
 
21
- gem.add_dependency "thor", "~> 0.18.1"
22
- gem.add_dependency "digital_ocean", "~> 1.0.1"
23
- gem.add_dependency "middleware" , "~> 0.1.0"
21
+ gem.add_dependency 'thor', '~> 0.18.1'
22
+ gem.add_dependency 'barge', '~> 0.10.0'
23
+ gem.add_dependency 'middleware', '~> 0.1.0'
24
24
 
25
- gem.add_development_dependency "rake"
26
- gem.add_development_dependency "rspec-core", "~> 2.14.0"
27
- gem.add_development_dependency "rspec-expectations", "~> 2.14.0"
28
- gem.add_development_dependency "rspec-mocks", "~> 2.14.0"
29
- gem.add_development_dependency "webmock", "~> 1.11.0"
30
- gem.add_development_dependency "coveralls", "~> 0.6.7"
25
+ gem.add_development_dependency 'rake'
26
+ gem.add_development_dependency 'rspec-core', '~> 2.14.0'
27
+ gem.add_development_dependency 'rspec-expectations', '~> 2.14.0'
28
+ gem.add_development_dependency 'rspec-mocks', '~> 2.14.0'
29
+ gem.add_development_dependency 'webmock', '~> 1.11.0'
30
+ gem.add_development_dependency 'coveralls', '~> 0.6.7'
31
31
  gem.add_development_dependency 'aruba', '~> 0.6.2'
32
+ gem.add_development_dependency 'pry'
33
+
34
+ gem.post_install_message = '***************************************'
35
+ gem.post_install_message = ' . o .. '
36
+ gem.post_install_message = ' o . o o.o '
37
+ gem.post_install_message = ' ...oo '
38
+ gem.post_install_message = ' __[]__ '
39
+ gem.post_install_message = ' __|_o_o_o\__ '
40
+ gem.post_install_message = ' \""""""""""/ '
41
+ gem.post_install_message = ' \. .. . / '
42
+ gem.post_install_message = ' ^^^^^^^^^^^^^^^^^^^^ '
43
+ gem.post_install_message = " Tugboat #{Tugboat::VERSION} version "
44
+ gem.post_install_message = ' '
45
+ gem.post_install_message = ' If you updated from Tugboat 1.0 '
46
+ gem.post_install_message = ' You will need to update your API Keys'
47
+ gem.post_install_message = ' For more details see here: '
48
+ gem.post_install_message = ' https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-api-v2'
49
+ gem.post_install_message = ' The Tugboat 1.0 API EOL as of November 9th 2015'
50
+ gem.post_install_message = ' Tugboat < 1.0.0 will no longer work from that time'
51
+ gem.post_install_message = '***************************************'
32
52
 
33
53
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tugboat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.0.0.RC1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Pearkes
8
+ - Peter Souter
9
+ - "Ørjan Blom"
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2015-08-02 00:00:00.000000000 Z
13
+ date: 2015-10-20 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: thor
@@ -25,19 +27,19 @@ dependencies:
25
27
  - !ruby/object:Gem::Version
26
28
  version: 0.18.1
27
29
  - !ruby/object:Gem::Dependency
28
- name: digital_ocean
30
+ name: barge
29
31
  requirement: !ruby/object:Gem::Requirement
30
32
  requirements:
31
33
  - - "~>"
32
34
  - !ruby/object:Gem::Version
33
- version: 1.0.1
35
+ version: 0.10.0
34
36
  type: :runtime
35
37
  prerelease: false
36
38
  version_requirements: !ruby/object:Gem::Requirement
37
39
  requirements:
38
40
  - - "~>"
39
41
  - !ruby/object:Gem::Version
40
- version: 1.0.1
42
+ version: 0.10.0
41
43
  - !ruby/object:Gem::Dependency
42
44
  name: middleware
43
45
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +152,20 @@ dependencies:
150
152
  - - "~>"
151
153
  - !ruby/object:Gem::Version
152
154
  version: 0.6.2
155
+ - !ruby/object:Gem::Dependency
156
+ name: pry
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ type: :development
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
153
169
  description: A command line tool for interacting with your DigitalOcean droplets.
154
170
  email:
155
171
  - jackpearkes@gmail.com
@@ -212,6 +228,7 @@ files:
212
228
  - lib/tugboat/version.rb
213
229
  - spec/cli/add_key_spec.rb
214
230
  - spec/cli/authorize_cli_spec.rb
231
+ - spec/cli/config_cli_spec.rb
215
232
  - spec/cli/create_cli_spec.rb
216
233
  - spec/cli/debug_cli_spec.rb
217
234
  - spec/cli/destroy_cli_spec.rb
@@ -239,20 +256,29 @@ files:
239
256
  - spec/fixtures/500.html
240
257
  - spec/fixtures/create_droplet.json
241
258
  - spec/fixtures/create_ssh_key.json
259
+ - spec/fixtures/create_ssh_key_from_file.json
260
+ - spec/fixtures/droplet_start_response.json
261
+ - spec/fixtures/not_found.json
262
+ - spec/fixtures/password_reset_response.json
263
+ - spec/fixtures/power_cycle_response.json
264
+ - spec/fixtures/resize_droplet.json
265
+ - spec/fixtures/restart_response.json
266
+ - spec/fixtures/show_coreos_image.json
242
267
  - spec/fixtures/show_droplet.json
243
- - spec/fixtures/show_droplet_fuzzy.json
244
268
  - spec/fixtures/show_droplet_inactive.json
245
269
  - spec/fixtures/show_droplets.json
246
270
  - spec/fixtures/show_droplets_empty.json
247
- - spec/fixtures/show_droplets_fuzzy.json
248
- - spec/fixtures/show_droplets_inactive.json
249
271
  - spec/fixtures/show_image.json
250
272
  - spec/fixtures/show_images.json
251
273
  - spec/fixtures/show_images_empty.json
252
274
  - spec/fixtures/show_images_global.json
253
275
  - spec/fixtures/show_keys.json
276
+ - spec/fixtures/show_redmine_image.json
254
277
  - spec/fixtures/show_regions.json
255
278
  - spec/fixtures/show_sizes.json
279
+ - spec/fixtures/shutdown_response.json
280
+ - spec/fixtures/snapshot_response.json
281
+ - spec/fixtures/ubuntu_image_9801951.json
256
282
  - spec/middleware/base_spec.rb
257
283
  - spec/middleware/check_configuration_spec.rb
258
284
  - spec/middleware/check_credentials_spec.rb
@@ -270,7 +296,7 @@ files:
270
296
  homepage: https://github.com/pearkes/tugboat
271
297
  licenses: []
272
298
  metadata: {}
273
- post_install_message:
299
+ post_install_message: "***************************************"
274
300
  rdoc_options: []
275
301
  require_paths:
276
302
  - lib
@@ -281,9 +307,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
307
  version: 1.9.2
282
308
  required_rubygems_version: !ruby/object:Gem::Requirement
283
309
  requirements:
284
- - - ">="
310
+ - - ">"
285
311
  - !ruby/object:Gem::Version
286
- version: '0'
312
+ version: 1.3.1
287
313
  requirements: []
288
314
  rubyforge_project:
289
315
  rubygems_version: 2.4.8
@@ -296,6 +322,7 @@ test_files:
296
322
  - features/vagrant-adam/config_current_directory.feature
297
323
  - spec/cli/add_key_spec.rb
298
324
  - spec/cli/authorize_cli_spec.rb
325
+ - spec/cli/config_cli_spec.rb
299
326
  - spec/cli/create_cli_spec.rb
300
327
  - spec/cli/debug_cli_spec.rb
301
328
  - spec/cli/destroy_cli_spec.rb
@@ -323,20 +350,29 @@ test_files:
323
350
  - spec/fixtures/500.html
324
351
  - spec/fixtures/create_droplet.json
325
352
  - spec/fixtures/create_ssh_key.json
353
+ - spec/fixtures/create_ssh_key_from_file.json
354
+ - spec/fixtures/droplet_start_response.json
355
+ - spec/fixtures/not_found.json
356
+ - spec/fixtures/password_reset_response.json
357
+ - spec/fixtures/power_cycle_response.json
358
+ - spec/fixtures/resize_droplet.json
359
+ - spec/fixtures/restart_response.json
360
+ - spec/fixtures/show_coreos_image.json
326
361
  - spec/fixtures/show_droplet.json
327
- - spec/fixtures/show_droplet_fuzzy.json
328
362
  - spec/fixtures/show_droplet_inactive.json
329
363
  - spec/fixtures/show_droplets.json
330
364
  - spec/fixtures/show_droplets_empty.json
331
- - spec/fixtures/show_droplets_fuzzy.json
332
- - spec/fixtures/show_droplets_inactive.json
333
365
  - spec/fixtures/show_image.json
334
366
  - spec/fixtures/show_images.json
335
367
  - spec/fixtures/show_images_empty.json
336
368
  - spec/fixtures/show_images_global.json
337
369
  - spec/fixtures/show_keys.json
370
+ - spec/fixtures/show_redmine_image.json
338
371
  - spec/fixtures/show_regions.json
339
372
  - spec/fixtures/show_sizes.json
373
+ - spec/fixtures/shutdown_response.json
374
+ - spec/fixtures/snapshot_response.json
375
+ - spec/fixtures/ubuntu_image_9801951.json
340
376
  - spec/middleware/base_spec.rb
341
377
  - spec/middleware/check_configuration_spec.rb
342
378
  - spec/middleware/check_credentials_spec.rb
@@ -1,13 +0,0 @@
1
- {
2
- "status": "OK",
3
- "droplet": {
4
- "backups_active": null,
5
- "id": 100823,
6
- "image_id": 420,
7
- "name": "test222",
8
- "ip_address": "33.33.33.10",
9
- "region_id": 1,
10
- "size_id": 33,
11
- "status": "active"
12
- }
13
- }
@@ -1,35 +0,0 @@
1
- {
2
- "status": "OK",
3
- "droplets": [
4
- {
5
- "ip_address": "33.33.33.10",
6
- "backups_active": null,
7
- "id": 100823,
8
- "image_id": 420,
9
- "name": "test222",
10
- "region_id": 1,
11
- "size_id": 33,
12
- "status": "active"
13
- },
14
- {
15
- "ip_address": "33.33.33.10",
16
- "backups_active": null,
17
- "id": 100824,
18
- "image_id": 420,
19
- "name": "test223",
20
- "region_id": 1,
21
- "size_id": 33,
22
- "status": "active"
23
- },
24
- {
25
- "ip_address": "33.33.33.10",
26
- "backups_active": null,
27
- "id": 100825,
28
- "image_id": 420,
29
- "name": "foo",
30
- "region_id": 1,
31
- "size_id": 33,
32
- "status": "active"
33
- }
34
- ]
35
- }
@@ -1,37 +0,0 @@
1
- {
2
- "status": "OK",
3
- "droplets": [
4
- {
5
- "ip_address": "33.33.33.10",
6
- "private_ip_address": "10.20.30.1",
7
- "backups_active": null,
8
- "id": 100823,
9
- "image_id": 420,
10
- "name": "test222",
11
- "region_id": 1,
12
- "size_id": 33,
13
- "status": "off"
14
- },
15
- {
16
- "ip_address": "33.33.33.10",
17
- "backups_active": null,
18
- "id": 100823,
19
- "image_id": 420,
20
- "name": "test223",
21
- "region_id": 1,
22
- "size_id": 33,
23
- "status": "off"
24
- },
25
- {
26
- "ip_address": "33.33.33.10",
27
- "private_ip_address": "10.20.30.40",
28
- "backups_active": null,
29
- "id": 100823,
30
- "image_id": 420,
31
- "name": "foo",
32
- "region_id": 1,
33
- "size_id": 33,
34
- "status": "off"
35
- }
36
- ]
37
- }