docl 0.0.2 → 0.0.3

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
  !binary "U0hBMQ==":
3
- metadata.gz: 107c68ce02dba2e2f37f5ae5c748a1071a03cebb
4
- data.tar.gz: 8ef14e86bb128d2657a0fef4735cb8b20b481c7e
3
+ metadata.gz: 669a32dd261e4cb65e879cf80ada1307f68ea2bd
4
+ data.tar.gz: 6af92e1ac3b1d3f638cac7c1a5a16af661659d21
5
5
  SHA512:
6
- metadata.gz: be15a58a826d36aaead54e1762ba6240ba2a62292de9fc8a7614fd7ce0a4c6e99b7468e40b4722c4a16443d83425b1b3045ab7769562b49c5b1564db6cddbedc
7
- data.tar.gz: 688c4e8db1901ec514dfe65a26cce7138de24f52c0a38f7caf6cd942ec24da7d286200f92411dbd131c01203a3db86dd51519453e864f1b92f400fe16353758b
6
+ metadata.gz: 3b144f0f942c1101444c8bc6cba207836ffdd20ddbd8effc7ced42601df6a40dfcafda2309b5a762c8c03df5bb4005adda7b60797cf3b23c242833b639866cf3
7
+ data.tar.gz: 41585d41aef68c23a09f20896326852fd64e33f999816ea0aef859fcd2109da7560f584038e35bf3fc9527c569ee91c35067b3b5ea96f33f745aef1a8b4beccf
data/bin/docl CHANGED
@@ -1,3 +1,5 @@
1
+ #! /usr/bin/env ruby
2
+
1
3
  require 'docl'
2
4
 
3
5
  DOCL::CLI.start
data/docl.gemspec CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.version = DOCL::VERSION
8
8
  gem.authors = ["Nathan Samson"]
9
9
  gem.email = ["nathan@nathansamson.be"]
10
+ gem.license = "MIT"
10
11
  gem.description = %q{A command line tool for interacting with your DigitalOcean droplets.}
11
12
  gem.summary = %q{A command line tool for interacting with your DigitalOcean droplets.}
12
13
  gem.homepage = "https://github.com/nathansamson/docl"
data/lib/docl/cli.rb CHANGED
@@ -90,10 +90,12 @@ class DOCL::CLI < Thor
90
90
  if options.user_data
91
91
  call_options[:user_data] = File.read(options.user_data)
92
92
  end
93
- puts call_options
94
93
 
95
94
  response = barge.droplet.create(call_options)
96
- puts response
95
+ if response.id == 'unprocessable_entity'
96
+ puts response.message
97
+ exit(1)
98
+ end
97
99
 
98
100
  if options.wait
99
101
  print "Waiting for droplet to become available"
@@ -104,6 +106,15 @@ class DOCL::CLI < Thor
104
106
  action = barge.action.show(action_link.id).action
105
107
  end until action.status != 'in-progress'
106
108
  puts "Completed"
109
+
110
+ droplet = barge.droplet.show(response.droplet.id).droplet
111
+ network_types = [droplet.networks.v4]
112
+ network_types << droplet.networks.v6 if droplet.networks.v6
113
+
114
+ puts "You can connect to your Droplet via"
115
+ network_types.flatten.select { |nw| nw.type == 'public' }.each do |network|
116
+ puts network.ip_address
117
+ end
107
118
  end
108
119
  end
109
120
 
data/lib/docl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DOCL
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Samson
@@ -70,7 +70,8 @@ files:
70
70
  - lib/docl/cli.rb
71
71
  - lib/docl/version.rb
72
72
  homepage: https://github.com/nathansamson/docl
73
- licenses: []
73
+ licenses:
74
+ - MIT
74
75
  metadata: {}
75
76
  post_install_message:
76
77
  rdoc_options: []