tugboat 2.0.0 → 2.0.1
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 +4 -4
- data/CHANGELOG.md +79 -5
- data/lib/tugboat/cli.rb +5 -5
- data/lib/tugboat/middleware/find_droplet.rb +8 -3
- data/lib/tugboat/version.rb +1 -1
- data/spec/cli/create_cli_spec.rb +17 -1
- data/spec/fixtures/droplet_no_network.json +103 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dff182303d9c37521cf816ceb57e0b5b73c9f60f
|
|
4
|
+
data.tar.gz: 98b25bcaa9909fcf9dbdc20a23e3db937e77148f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84eed42cf4f8fbb5927b667bf05f243c34e070c58b9813150c790687fb1e5ed89958644f3c90b789e25e60f4797545f68f6684d7507239ea6fca76c01c9e2ce8
|
|
7
|
+
data.tar.gz: 5ccd3c89a919f5a47bd71792effca44afb6c552a1d64d3a085f012cd6846eed8bedb2e191cc961a4570a8b90c33e6af56bfb1a1f76e887beb402016a8df39aff
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,89 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [Unreleased](https://github.com/pearkes/tugboat/tree/HEAD)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://github.com/pearkes/tugboat/compare/v2.0.0...HEAD)
|
|
6
|
+
|
|
7
|
+
## [v2.0.0](https://github.com/pearkes/tugboat/tree/v2.0.0) (2015-11-03)
|
|
8
|
+
|
|
9
|
+
[Full Changelog](https://github.com/pearkes/tugboat/compare/v2.0.0.RC1...v2.0.0)
|
|
10
|
+
|
|
11
|
+
**Implemented enhancements:**
|
|
12
|
+
|
|
13
|
+
- Setting client\_id and api\_key as environment variables in shell [\#176](https://github.com/pearkes/tugboat/issues/176)
|
|
14
|
+
|
|
15
|
+
- API v2.0 Support [\#122](https://github.com/pearkes/tugboat/issues/122)
|
|
16
|
+
|
|
17
|
+
- If a command that requires arguments is entered without arguments, print the help for that. [\#191](https://github.com/pearkes/tugboat/issues/191)
|
|
18
|
+
|
|
19
|
+
- Support traditional `-y` for automatically confirming a destructive action. [\#190](https://github.com/pearkes/tugboat/issues/190)
|
|
20
|
+
|
|
21
|
+
- Allow specification of user data in create command [\#162](https://github.com/pearkes/tugboat/issues/162)
|
|
22
|
+
|
|
23
|
+
- Multiple default SSH keys \(for new droplets\)? [\#142](https://github.com/pearkes/tugboat/issues/142)
|
|
24
|
+
|
|
25
|
+
- tugboat info should show IPv6 address [\#119](https://github.com/pearkes/tugboat/issues/119)
|
|
26
|
+
|
|
27
|
+
- Allow configuring IPv6 in create command [\#118](https://github.com/pearkes/tugboat/issues/118)
|
|
28
|
+
|
|
29
|
+
- Allow resize -s to take a string size rather than ID [\#101](https://github.com/pearkes/tugboat/issues/101)
|
|
30
|
+
|
|
31
|
+
- Machine Readable Flag [\#6](https://github.com/pearkes/tugboat/issues/6)
|
|
32
|
+
|
|
33
|
+
**Fixed bugs:**
|
|
34
|
+
|
|
35
|
+
- New Droplets dont have IP address immediatly, so the info command fails [\#198](https://github.com/pearkes/tugboat/issues/198)
|
|
36
|
+
|
|
37
|
+
- Ipv6 changes broke ssh [\#192](https://github.com/pearkes/tugboat/issues/192)
|
|
38
|
+
|
|
39
|
+
- tugboat doesn't work with team accounts, because they use api v2 [\#168](https://github.com/pearkes/tugboat/issues/168)
|
|
40
|
+
|
|
41
|
+
- tugboat ssh not using ssh-agent? [\#160](https://github.com/pearkes/tugboat/issues/160)
|
|
42
|
+
|
|
43
|
+
**Merged pull requests:**
|
|
44
|
+
|
|
45
|
+
- Fixes multiple keys for droplet creation [\#201](https://github.com/pearkes/tugboat/pull/201) ([petems](https://github.com/petems))
|
|
46
|
+
|
|
47
|
+
- Gives more specific output for ssh [\#199](https://github.com/pearkes/tugboat/pull/199) ([petems](https://github.com/petems))
|
|
48
|
+
|
|
49
|
+
- Allow setting user data for droplet creation [\#197](https://github.com/pearkes/tugboat/pull/197) ([petems](https://github.com/petems))
|
|
50
|
+
|
|
51
|
+
- Hacky way to get the ips for find droplet [\#196](https://github.com/pearkes/tugboat/pull/196) ([petems](https://github.com/petems))
|
|
52
|
+
|
|
53
|
+
- Better help message [\#195](https://github.com/pearkes/tugboat/pull/195) ([petems](https://github.com/petems))
|
|
54
|
+
|
|
55
|
+
- Add -y flag to skip confirmation [\#194](https://github.com/pearkes/tugboat/pull/194) ([petems](https://github.com/petems))
|
|
56
|
+
|
|
57
|
+
- Add Min Disk Size to info\_image [\#193](https://github.com/pearkes/tugboat/pull/193) ([bmamlin](https://github.com/bmamlin))
|
|
58
|
+
|
|
59
|
+
- Adds ability to enable IP6 on new droplets [\#189](https://github.com/pearkes/tugboat/pull/189) ([petems](https://github.com/petems))
|
|
60
|
+
|
|
61
|
+
- Readme fixes API2 [\#188](https://github.com/pearkes/tugboat/pull/188) ([petems](https://github.com/petems))
|
|
62
|
+
|
|
63
|
+
- Info droplet API2 changes [\#187](https://github.com/pearkes/tugboat/pull/187) ([petems](https://github.com/petems))
|
|
64
|
+
|
|
65
|
+
- Fix references to id to slugs [\#186](https://github.com/pearkes/tugboat/pull/186) ([petems](https://github.com/petems))
|
|
66
|
+
|
|
67
|
+
- Add "include\_urls" option to "droplets" command [\#185](https://github.com/pearkes/tugboat/pull/185) ([FreedomBen](https://github.com/FreedomBen))
|
|
68
|
+
|
|
69
|
+
- Adds ability to use environment variable for key [\#184](https://github.com/pearkes/tugboat/pull/184) ([petems](https://github.com/petems))
|
|
70
|
+
|
|
71
|
+
- Proper 2.0.0 release [\#183](https://github.com/pearkes/tugboat/pull/183) ([petems](https://github.com/petems))
|
|
72
|
+
|
|
73
|
+
- Add UI System [\#200](https://github.com/pearkes/tugboat/pull/200) ([petems](https://github.com/petems))
|
|
74
|
+
|
|
3
75
|
## [v2.0.0.RC1](https://github.com/pearkes/tugboat/tree/v2.0.0.RC1) (2015-10-20)
|
|
4
76
|
|
|
5
77
|
[Full Changelog](https://github.com/pearkes/tugboat/compare/v1.3.1...v2.0.0.RC1)
|
|
6
78
|
|
|
7
79
|
**Closed issues:**
|
|
8
80
|
|
|
81
|
+
- API 2.0 Release Candidate Guinea Pigs and Feedback [\#182](https://github.com/pearkes/tugboat/issues/182)
|
|
82
|
+
|
|
83
|
+
- API 2.0 Switchover [\#161](https://github.com/pearkes/tugboat/issues/161)
|
|
84
|
+
|
|
85
|
+
- API v2 Support [\#102](https://github.com/pearkes/tugboat/issues/102)
|
|
86
|
+
|
|
9
87
|
- Possible to delete an image/snapshot? [\#177](https://github.com/pearkes/tugboat/issues/177)
|
|
10
88
|
|
|
11
89
|
**Merged pull requests:**
|
|
@@ -20,7 +98,7 @@
|
|
|
20
98
|
|
|
21
99
|
## [v1.3.1](https://github.com/pearkes/tugboat/tree/v1.3.1) (2015-08-02)
|
|
22
100
|
|
|
23
|
-
[Full Changelog](https://github.com/pearkes/tugboat/compare/
|
|
101
|
+
[Full Changelog](https://github.com/pearkes/tugboat/compare/v1.3.0...v1.3.1)
|
|
24
102
|
|
|
25
103
|
**Closed issues:**
|
|
26
104
|
|
|
@@ -30,10 +108,6 @@
|
|
|
30
108
|
|
|
31
109
|
- Removes wrong help messages for `images`. [\#173](https://github.com/pearkes/tugboat/pull/173) ([haihappen](https://github.com/haihappen))
|
|
32
110
|
|
|
33
|
-
## [v2.1.0.ALPHA](https://github.com/pearkes/tugboat/tree/v2.1.0.ALPHA) (2015-07-20)
|
|
34
|
-
|
|
35
|
-
[Full Changelog](https://github.com/pearkes/tugboat/compare/v1.3.0...v2.1.0.ALPHA)
|
|
36
|
-
|
|
37
111
|
## [v1.3.0](https://github.com/pearkes/tugboat/tree/v1.3.0) (2015-07-19)
|
|
38
112
|
|
|
39
113
|
[Full Changelog](https://github.com/pearkes/tugboat/compare/v1.2.0...v1.3.0)
|
data/lib/tugboat/cli.rb
CHANGED
|
@@ -144,15 +144,15 @@ module Tugboat
|
|
|
144
144
|
|
|
145
145
|
desc "create NAME", "Create a droplet."
|
|
146
146
|
method_option "size",
|
|
147
|
-
:type => :
|
|
147
|
+
:type => :string,
|
|
148
148
|
:aliases => "-s",
|
|
149
149
|
:desc => "The size slug of the droplet"
|
|
150
150
|
method_option "image",
|
|
151
|
-
:type => :
|
|
151
|
+
:type => :string,
|
|
152
152
|
:aliases => "-i",
|
|
153
153
|
:desc => "The image slug of the droplet"
|
|
154
154
|
method_option "region",
|
|
155
|
-
:type => :
|
|
155
|
+
:type => :string,
|
|
156
156
|
:aliases => "-r",
|
|
157
157
|
:desc => "The region slug of the droplet"
|
|
158
158
|
method_option "keys",
|
|
@@ -474,10 +474,10 @@ module Tugboat
|
|
|
474
474
|
:aliases => "-n",
|
|
475
475
|
:desc => "The exact name of the droplet"
|
|
476
476
|
method_option "size",
|
|
477
|
-
:type => :
|
|
477
|
+
:type => :string,
|
|
478
478
|
:aliases => "-s",
|
|
479
479
|
:required => true,
|
|
480
|
-
:desc => "The
|
|
480
|
+
:desc => "The size slug to resize the droplet to"
|
|
481
481
|
def resize(name=nil)
|
|
482
482
|
Middleware.sequence_resize_droplet.call({
|
|
483
483
|
"tugboat_action" => __method__,
|
|
@@ -100,9 +100,14 @@ module Tugboat
|
|
|
100
100
|
|
|
101
101
|
env["droplet_id"] = droplet_return.id
|
|
102
102
|
env["droplet_name"] = "(#{droplet_return.name})"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
if droplet_return.networks.v4.empty?
|
|
104
|
+
env["droplet_ip"] = '' # No Network Yet
|
|
105
|
+
env["droplet_ip_private"] = '' # No Network Yet
|
|
106
|
+
else
|
|
107
|
+
env["droplet_ip"] = droplet_return.networks.v4.detect { |address| address.type == 'public' }.ip_address
|
|
108
|
+
check_private_ip = droplet_return.networks.v4.detect { |address| address.type == 'private' }
|
|
109
|
+
env["droplet_ip_private"] = check_private_ip.ip_address if check_private_ip
|
|
110
|
+
end
|
|
106
111
|
env["droplet_status"] = droplet_return.status
|
|
107
112
|
elsif found_droplets.length > 1
|
|
108
113
|
# Did we run the multiple questionairre?
|
data/lib/tugboat/version.rb
CHANGED
data/spec/cli/create_cli_spec.rb
CHANGED
|
@@ -73,7 +73,23 @@ Queueing creation of droplet 'example.com'...Could not find file: /foo/bar/baz.s
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
it "doesn't create a droplet when mistyping help command" do
|
|
76
|
-
help_text =
|
|
76
|
+
help_text = <<-eos
|
|
77
|
+
Usage:
|
|
78
|
+
rspec create NAME
|
|
79
|
+
|
|
80
|
+
Options:
|
|
81
|
+
-s, [--size=SIZE] # The size slug of the droplet
|
|
82
|
+
-i, [--image=IMAGE] # The image slug of the droplet
|
|
83
|
+
-r, [--region=REGION] # The region slug of the droplet
|
|
84
|
+
-k, [--keys=KEYS] # A comma separated list of SSH key ids to add to the droplet
|
|
85
|
+
-p, [--private-networking] # Enable private networking on the droplet
|
|
86
|
+
-l, [--ip6] # Enable IP6 on the droplet
|
|
87
|
+
-u, [--user-data=USER_DATA] # Location of a file to read and use as user data
|
|
88
|
+
-b, [--backups-enabled] # Enable backups on the droplet
|
|
89
|
+
-q, [--quiet] \x20
|
|
90
|
+
|
|
91
|
+
Create a droplet.
|
|
92
|
+
eos
|
|
77
93
|
|
|
78
94
|
@cli.create('help')
|
|
79
95
|
expect($stdout.string).to eq help_text
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"droplet": {
|
|
3
|
+
"id": 6918990,
|
|
4
|
+
"name": "example.com",
|
|
5
|
+
"memory": 512,
|
|
6
|
+
"vcpus": 1,
|
|
7
|
+
"disk": 20,
|
|
8
|
+
"locked": true,
|
|
9
|
+
"status": "active",
|
|
10
|
+
"kernel": {
|
|
11
|
+
"id": 5175,
|
|
12
|
+
"name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-57-generic",
|
|
13
|
+
"version": "3.13.0-57-generic"
|
|
14
|
+
},
|
|
15
|
+
"created_at": "2015-11-03T14:13:53Z",
|
|
16
|
+
"features": [
|
|
17
|
+
"virtio"
|
|
18
|
+
],
|
|
19
|
+
"backup_ids": [
|
|
20
|
+
|
|
21
|
+
],
|
|
22
|
+
"next_backup_window": null,
|
|
23
|
+
"snapshot_ids": [
|
|
24
|
+
|
|
25
|
+
],
|
|
26
|
+
"image": {
|
|
27
|
+
"id": 13089493,
|
|
28
|
+
"name": "14.04 x64",
|
|
29
|
+
"distribution": "Ubuntu",
|
|
30
|
+
"slug": "ubuntu-14-04-x64",
|
|
31
|
+
"public": true,
|
|
32
|
+
"regions": [
|
|
33
|
+
"nyc1",
|
|
34
|
+
"ams1",
|
|
35
|
+
"sfo1",
|
|
36
|
+
"nyc2",
|
|
37
|
+
"ams2",
|
|
38
|
+
"sgp1",
|
|
39
|
+
"lon1",
|
|
40
|
+
"nyc3",
|
|
41
|
+
"ams3",
|
|
42
|
+
"fra1",
|
|
43
|
+
"tor1"
|
|
44
|
+
],
|
|
45
|
+
"created_at": "2015-08-10T21:30:19Z",
|
|
46
|
+
"min_disk_size": 20,
|
|
47
|
+
"type": "snapshot"
|
|
48
|
+
},
|
|
49
|
+
"size": {
|
|
50
|
+
"slug": "512mb",
|
|
51
|
+
"memory": 512,
|
|
52
|
+
"vcpus": 1,
|
|
53
|
+
"disk": 20,
|
|
54
|
+
"transfer": 1,
|
|
55
|
+
"price_monthly": 5,
|
|
56
|
+
"price_hourly": 0.00744,
|
|
57
|
+
"regions": [
|
|
58
|
+
"nyc1",
|
|
59
|
+
"sgp1",
|
|
60
|
+
"sfo1",
|
|
61
|
+
"nyc2",
|
|
62
|
+
"lon1",
|
|
63
|
+
"nyc3",
|
|
64
|
+
"ams3",
|
|
65
|
+
"ams2",
|
|
66
|
+
"fra1",
|
|
67
|
+
"tor1"
|
|
68
|
+
],
|
|
69
|
+
"available": true
|
|
70
|
+
},
|
|
71
|
+
"size_slug": "512mb",
|
|
72
|
+
"networks": {
|
|
73
|
+
"v4": [
|
|
74
|
+
|
|
75
|
+
],
|
|
76
|
+
"v6": [
|
|
77
|
+
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"region": {
|
|
81
|
+
"name": "London 1",
|
|
82
|
+
"slug": "lon1",
|
|
83
|
+
"sizes": [
|
|
84
|
+
"512mb",
|
|
85
|
+
"1gb",
|
|
86
|
+
"2gb",
|
|
87
|
+
"4gb",
|
|
88
|
+
"8gb",
|
|
89
|
+
"32gb",
|
|
90
|
+
"48gb",
|
|
91
|
+
"64gb",
|
|
92
|
+
"16gb"
|
|
93
|
+
],
|
|
94
|
+
"features": [
|
|
95
|
+
"private_networking",
|
|
96
|
+
"backups",
|
|
97
|
+
"ipv6",
|
|
98
|
+
"metadata"
|
|
99
|
+
],
|
|
100
|
+
"available": true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tugboat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jack Pearkes
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2015-11-
|
|
13
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: thor
|
|
@@ -258,6 +258,7 @@ files:
|
|
|
258
258
|
- spec/fixtures/create_droplet.json
|
|
259
259
|
- spec/fixtures/create_ssh_key.json
|
|
260
260
|
- spec/fixtures/create_ssh_key_from_file.json
|
|
261
|
+
- spec/fixtures/droplet_no_network.json
|
|
261
262
|
- spec/fixtures/droplet_start_response.json
|
|
262
263
|
- spec/fixtures/not_found.json
|
|
263
264
|
- spec/fixtures/password_reset_response.json
|
|
@@ -355,6 +356,7 @@ test_files:
|
|
|
355
356
|
- spec/fixtures/create_droplet.json
|
|
356
357
|
- spec/fixtures/create_ssh_key.json
|
|
357
358
|
- spec/fixtures/create_ssh_key_from_file.json
|
|
359
|
+
- spec/fixtures/droplet_no_network.json
|
|
358
360
|
- spec/fixtures/droplet_start_response.json
|
|
359
361
|
- spec/fixtures/not_found.json
|
|
360
362
|
- spec/fixtures/password_reset_response.json
|