appd 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/exe/appd +2 -2
- data/lib/appd/app.rb +3 -3
- data/lib/appd/cli.rb +2 -2
- data/lib/appd/version.rb +1 -1
- data/lib/appd.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5963e0ac1ab04a116cf9b5811892b9119573201
|
4
|
+
data.tar.gz: c4c0f266776a42a515a6dc03db4b900b12609f16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcbcd3ce458e1040d885948fa14b8e535d01080f0b7cf951d380ebfd81bf51aaa0a2a6c5aa634da00da3844884d681706b11ab8543a91f6d00fee0410cfd96ba
|
7
|
+
data.tar.gz: 1e740550d3bf6a48a1dcff84112789cec7760fa921de0d9ef922e0078b5205d378988367f1345e81668524f17e3d835b53e11d1506bbbdf3e50afc42b28af1a4
|
data/README.md
CHANGED
@@ -26,8 +26,8 @@ Or install it yourself as:
|
|
26
26
|
## Usage
|
27
27
|
|
28
28
|
```sh
|
29
|
-
# Setup $
|
30
|
-
export
|
29
|
+
# Setup $APPS_PATH
|
30
|
+
export APPS_PATH /path/to/your/apps
|
31
31
|
|
32
32
|
# See help
|
33
33
|
appd help
|
@@ -35,7 +35,7 @@ Usage:
|
|
35
35
|
appd APPNAME command [OPTIONS]
|
36
36
|
|
37
37
|
Options:
|
38
|
-
-p # Override $
|
38
|
+
-p # Override $APPS_PATH
|
39
39
|
-f # Specify a docker-compose.yml file relative to the app
|
40
40
|
# (defaults to: "docker-compose.yml")
|
41
41
|
-s # Specify a docker server env file
|
@@ -49,7 +49,7 @@ Commands:
|
|
49
49
|
restart SERVICES # Restart services
|
50
50
|
exec SERVICE -c "COMMAND" # Execute a command in a running container
|
51
51
|
|
52
|
-
Notes: Appd looks for apps in the $
|
52
|
+
Notes: Appd looks for apps in the $APPS_PATH directory.
|
53
53
|
APPNAME can be . for current app.
|
54
54
|
```
|
55
55
|
|
data/exe/appd
CHANGED
data/lib/appd/app.rb
CHANGED
@@ -32,12 +32,12 @@ module Appd
|
|
32
32
|
|
33
33
|
private
|
34
34
|
|
35
|
-
def
|
36
|
-
"#{options.
|
35
|
+
def docker_compose_file
|
36
|
+
"#{options.apps_path}/#{options.app}/#{options.file}"
|
37
37
|
end
|
38
38
|
|
39
39
|
def docker_compose(command)
|
40
|
-
Appd.exec "
|
40
|
+
Appd.exec "docker-compose -f #{docker_compose_file} #{command}", options
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
data/lib/appd/cli.rb
CHANGED
@@ -2,7 +2,7 @@ require "thor"
|
|
2
2
|
|
3
3
|
module Appd
|
4
4
|
class CLI < Thor
|
5
|
-
class_option :
|
5
|
+
class_option :apps_path, type: :string, aliases: "-p", default: Appd.apps_path, desc: "Override $APPS_PATH"
|
6
6
|
class_option :app, type: :string, hide: true, aliases: "-a", required: ARGV.count > 0 &&
|
7
7
|
ARGV[0] != 'help' &&
|
8
8
|
ARGV[0] != "."
|
@@ -24,7 +24,7 @@ module Appd
|
|
24
24
|
end
|
25
25
|
puts "\nCommands:"
|
26
26
|
self.class.commands.each { |_, command| printf "%-30s %s\n", " #{command.usage} ", "# #{command.description}" }
|
27
|
-
puts "\nNotes: Appd looks for apps in the $
|
27
|
+
puts "\nNotes: Appd looks for apps in the $APPS_PATH directory."
|
28
28
|
puts " APPNAME can be . for current app."
|
29
29
|
end
|
30
30
|
|
data/lib/appd/version.rb
CHANGED
data/lib/appd.rb
CHANGED
@@ -2,7 +2,11 @@ require "appd/app"
|
|
2
2
|
require "appd/version"
|
3
3
|
|
4
4
|
module Appd
|
5
|
-
def self.
|
6
|
-
|
5
|
+
def self.apps_path
|
6
|
+
ENV["APPS_PATH"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.exec(command, options)
|
10
|
+
super "#{"source ~/.appd/#{options.server} && " if options.server}direnv exec #{options.apps_path}/#{options.app} #{command}"
|
7
11
|
end
|
8
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morgan Showman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.1
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: Docker compose wrapper for managing containers.
|