dokkufy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/bin/dokkufy +64 -66
- data/lib/dokkufy/info.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4b1d7d04e4d3451365de3f2d1fcce0e54b1adf9
|
4
|
+
data.tar.gz: 8b194433b6e1637a122e1a93638d66c4225174fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4116b60507c37a17562b11d1c769b6577ea0185b698cd0e2008e28b9da267a0a357fca8c41ecb1fdac0b45f2eb6176481119a11b0e72c11489d44453c750c653
|
7
|
+
data.tar.gz: 8ed8142b4880e8eb72c1fd481166e6ce2c2d5dfbf7d7fb19522128f5047c356313541089f035530864e196bf2978fa4fa33686257c0c375d8ade181d49bc1707
|
data/README.md
CHANGED
@@ -122,6 +122,8 @@ $ ssh -t dokku@example.com run test_app ls
|
|
122
122
|
|
123
123
|
## Release notes
|
124
124
|
|
125
|
+
* **0.1.5** Using classic style commander
|
126
|
+
* **0.1.4** Checks for SSH key before installing on server
|
125
127
|
* **0.1.3** Applies double install fix on 14.04
|
126
128
|
* **0.1.0** Adds the `dokku` command
|
127
129
|
* **0.0.7** Adds the (un)dokkufication of apps
|
data/bin/dokkufy
CHANGED
@@ -1,86 +1,84 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'dokkufy'
|
3
|
-
require 'commander'
|
3
|
+
require 'commander/import'
|
4
4
|
require 'terminal-table'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
program :help, 'Author', 'Cristiano Betta <cbetta@gmail.com>'
|
6
|
+
program :name, 'Dokkufy'
|
7
|
+
program :version, Dokkufy::VERSION
|
8
|
+
program :description, 'An interactive script to enable Dokku on a server'
|
9
|
+
program :help, 'Author', 'Cristiano Betta <cbetta@gmail.com>'
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
command :'server' do |c|
|
12
|
+
c.syntax = 'dokkufy server [<hostname> <username> <domain>]'
|
13
|
+
c.description = "Installs Dokku on a Ubuntu 12.04 or 14.04 server"
|
14
|
+
c.option '--version', Float, 'Dokku version'
|
15
|
+
c.action do |args, options|
|
16
|
+
hostname = args[0] || ask('Server hostname or IP: ')
|
17
|
+
username = args[1] || ask('Username on server: ')
|
18
|
+
domain = args[2] || ask('Desired root domain (e.g. example.com): ')
|
19
|
+
version = options.version.nil? ? Dokkufy::Utils.stable_version : "v#{options.version}"
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
end
|
21
|
+
server = Dokkufy::Server.new(hostname, username)
|
22
|
+
server.dokkufy(version, domain)
|
25
23
|
end
|
24
|
+
end
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
26
|
+
command :'plugin:list' do |c|
|
27
|
+
c.syntax = 'dokkufy plugin:list'
|
28
|
+
c.description = "Lists known Dokku plugins"
|
29
|
+
c.option('--with-notes'){ $with_notes = true }
|
30
|
+
c.action do |args, options|
|
31
|
+
puts Terminal::Table.new rows: Dokkufy::Plugin.all($with_notes), headings: ["ID", "Name", "Description"]
|
34
32
|
end
|
33
|
+
end
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
end
|
35
|
+
command :'plugin:install' do |c|
|
36
|
+
c.syntax = 'dokkufy plugin:install <plugin_name_or_id> [<hostname> <username>]'
|
37
|
+
c.description = "Installs a known Dokku plugin"
|
38
|
+
c.action do |args, options|
|
39
|
+
id_or_name = args[0] || ask('Plugin ID or Name: ')
|
40
|
+
hostname = args[1] || ask('Server hostname or IP: ')
|
41
|
+
username = args[2] || ask('Username on server: ')
|
42
|
+
Dokkufy::Plugin.new(hostname, username).install(id_or_name)
|
45
43
|
end
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
end
|
46
|
+
command :'plugin:uninstall' do |c|
|
47
|
+
c.syntax = 'dokkufy plugin:uninstall <plugin_name_or_id> [<hostname> <username>]'
|
48
|
+
c.description = "Uninstalls a known Dokku plugin"
|
49
|
+
c.action do |args, options|
|
50
|
+
id_or_name = args[0] || ask('Plugin ID or Name: ')
|
51
|
+
hostname = args[1] || ask('Server hostname or IP: ')
|
52
|
+
username = args[2] || ask('Username on server: ')
|
53
|
+
Dokkufy::Plugin.new(hostname, username).uninstall(id_or_name)
|
56
54
|
end
|
55
|
+
end
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
end
|
57
|
+
command :'app' do |c|
|
58
|
+
c.syntax = 'dokkufy app <git_repo> [OR <hostname> <dokku_username>]'
|
59
|
+
c.description = "Binds this app to a Dokku instance through git and a config file"
|
60
|
+
c.action do |args, options|
|
61
|
+
if args.empty?
|
62
|
+
git = Dokkufy::Git.new
|
63
|
+
if git.dokku_remote_present?
|
64
|
+
args = [git.dokku_remote]
|
65
|
+
else
|
66
|
+
hostname = ask('Server hostname or IP: ')
|
67
|
+
username = ask('Dokku username on server [dokku]: ')
|
68
|
+
username = "dokku" if username.strip == ""
|
69
|
+
args = [hostname, username]
|
72
70
|
end
|
73
|
-
Dokkufy::App.new(args).dokkufy
|
74
71
|
end
|
72
|
+
Dokkufy::App.new(args).dokkufy
|
75
73
|
end
|
74
|
+
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
end
|
76
|
+
command :'app:clear' do |c|
|
77
|
+
c.syntax = 'dokkufy app:clear'
|
78
|
+
c.description = "Undokkufies this app"
|
79
|
+
c.action do |args, options|
|
80
|
+
Dokkufy::Git.new.clear
|
83
81
|
end
|
84
|
-
|
85
|
-
default_command :help
|
86
82
|
end
|
83
|
+
|
84
|
+
default_command :help
|
data/lib/dokkufy/info.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokkufy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cristiano Betta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|