dokku-cli 0.3.1 → 0.3.2
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/README.md +3 -2
- data/lib/dokku_cli.rb +4 -11
- data/lib/dokku_cli/certs.rb +7 -1
- data/lib/dokku_cli/config.rb +5 -0
- data/lib/dokku_cli/domains.rb +4 -0
- data/lib/dokku_cli/events.rb +4 -0
- data/lib/dokku_cli/keys.rb +2 -0
- data/lib/dokku_cli/nginx.rb +4 -0
- data/lib/dokku_cli/ps.rb +4 -0
- data/lib/dokku_cli/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07155d395cd58a6d539e395cca7d1c9ee5073e0f
|
4
|
+
data.tar.gz: ce5969e65a0812916f52092639ad0b40a61b0814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac2064cd05cd8a054f65f7b3c7603c6d4ffaf2476f2d7ffa2d74d761b4e0b698488bb84b0c51ab9917e522075abdcddb520bb79e4cf9d3b80fbe405ae2e04c6b
|
7
|
+
data.tar.gz: 209ba971a42cf2784a70f2dfa9e013e3968aa9a5fb81030c7b1ddae414d43cd2f94f0109866159438abd9d0893fdd1f35981280193e6ae622ac6fbf093393518
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Dokku CLI is a zero config command line tool for the official version of [Dokku](https://github.com/progrium/dokku).
|
7
7
|
|
8
|
-
The newest version of Dokku CLI is fully compatible with ```Dokku 0.
|
8
|
+
The newest version of Dokku CLI is fully compatible with ```Dokku 0.5.x```
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
```
|
@@ -52,7 +52,8 @@ dokku keys:add .ssh/id_rsa.pub Description
|
|
52
52
|
You can use the global option ``--remote`` to run commands on a different server/app from a remote branch. For more details see [heroku's guide](https://devcenter.heroku.com/articles/multiple-environments) for multiple environments for an app.
|
53
53
|
|
54
54
|
```
|
55
|
-
dokku run rails c --remote
|
55
|
+
dokku run rails c --remote=staging
|
56
|
+
dokku config --remote=staging
|
56
57
|
```
|
57
58
|
|
58
59
|
## All commands
|
data/lib/dokku_cli.rb
CHANGED
@@ -27,6 +27,8 @@ module DokkuCli
|
|
27
27
|
if args.empty?
|
28
28
|
run_command "logs #{app_name}"
|
29
29
|
else
|
30
|
+
# remove unnecessary mapped remote option
|
31
|
+
args = args.gsub(/-remote [\S]*/, '')
|
30
32
|
command = "ssh -p #{port} dokku@#{domain} logs #{app_name} #{args}"
|
31
33
|
puts "Running #{command}..."
|
32
34
|
exec(command)
|
@@ -35,7 +37,7 @@ module DokkuCli
|
|
35
37
|
|
36
38
|
desc "open", "Open the app in your default browser"
|
37
39
|
def open
|
38
|
-
url = %x[dokku urls].split("\r").first
|
40
|
+
url = %x[dokku urls --remote #{app_name}].split("\r").first
|
39
41
|
exec("open #{url}")
|
40
42
|
end
|
41
43
|
|
@@ -51,6 +53,7 @@ module DokkuCli
|
|
51
53
|
run_command "run #{app_name} #{command}"
|
52
54
|
end
|
53
55
|
end
|
56
|
+
map "run" => "walk"
|
54
57
|
|
55
58
|
desc "ssh", "Start an SSH session as root user"
|
56
59
|
def ssh
|
@@ -74,16 +77,6 @@ module DokkuCli
|
|
74
77
|
super
|
75
78
|
end
|
76
79
|
|
77
|
-
def method_missing(method, *args, &block)
|
78
|
-
if method.to_s.split(":").length >= 2
|
79
|
-
self.send(method.to_s.gsub(":", "_").gsub("-", "_"), *args)
|
80
|
-
elsif method == :run
|
81
|
-
self.walk(*args)
|
82
|
-
else
|
83
|
-
super
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
80
|
private
|
88
81
|
|
89
82
|
def app_name
|
data/lib/dokku_cli/certs.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
module DokkuCli
|
2
2
|
class Cli < Thor
|
3
3
|
|
4
|
+
map "certs:add" => "certs_add",
|
5
|
+
"certs:generate" => "certs_generate",
|
6
|
+
"certs:info" => "certs_info",
|
7
|
+
"certs:remove" => "certs_remove",
|
8
|
+
"certs:update" => "certs_update"
|
9
|
+
|
4
10
|
desc "certs:add CRT KEY", "Add an ssl endpoint to an app. Can also import from a tarball on stdin."
|
5
11
|
def certs_add(crt, key)
|
6
12
|
run_command "certs:add #{app_name} #{crt} #{key}"
|
@@ -22,7 +28,7 @@ module DokkuCli
|
|
22
28
|
end
|
23
29
|
|
24
30
|
desc "certs:update CRT KEY", "Update an SSL Endpoint on an app. Can also import from a tarball on stdin"
|
25
|
-
def
|
31
|
+
def certs_update(crt, key)
|
26
32
|
run_command "certs:update #{app_name} #{crt} #{key}"
|
27
33
|
end
|
28
34
|
end
|
data/lib/dokku_cli/config.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
module DokkuCli
|
2
2
|
class Cli < Thor
|
3
3
|
|
4
|
+
map "config:get" => "config_get",
|
5
|
+
"config:set" => "config_set",
|
6
|
+
"config:unset" => "config_unset",
|
7
|
+
"config:set:file" => "config_set_file"
|
8
|
+
|
4
9
|
desc "config", "Display the app's environment variables"
|
5
10
|
def config
|
6
11
|
run_command "config #{app_name}"
|
data/lib/dokku_cli/domains.rb
CHANGED
data/lib/dokku_cli/events.rb
CHANGED
data/lib/dokku_cli/keys.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module DokkuCli
|
2
2
|
class Cli < Thor
|
3
3
|
|
4
|
+
map "keys:add" => "keys_add"
|
5
|
+
|
4
6
|
desc "keys:add PATH DESCRIPTION", "Add the ssh key to your dokku machine."
|
5
7
|
def keys_add(path, description)
|
6
8
|
command = "cat #{path} | ssh -p #{port} root@#{domain} 'sudo sshcommand acl-add dokku #{description}'"
|
data/lib/dokku_cli/nginx.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module DokkuCli
|
2
2
|
class Cli < Thor
|
3
3
|
|
4
|
+
map "nginx:build" => "nginx_build",
|
5
|
+
"nginx:access-logs" => "nginx_access_logs",
|
6
|
+
"nginx:error-logs" => "nginx_error_logs"
|
7
|
+
|
4
8
|
desc "nginx:build", "(Re)builds nginx config for the app"
|
5
9
|
def nginx_build
|
6
10
|
run_command "nginx:build-config #{app_name}"
|
data/lib/dokku_cli/ps.rb
CHANGED
data/lib/dokku_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokku-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Szturo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.19'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.19'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.7'
|
41
41
|
description: Command line tool for Dokku.
|
@@ -46,7 +46,7 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
-
|
49
|
+
- .gitignore
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE.txt
|
52
52
|
- README.md
|
@@ -72,17 +72,17 @@ require_paths:
|
|
72
72
|
- lib
|
73
73
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.0.14.1
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Command line tool for Dokku.
|