appd 0.5.1 → 0.6.0

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
  SHA1:
3
- metadata.gz: dfde514840abf3ced575c0a6e2f6cb3470150290
4
- data.tar.gz: 87e2bdf442b99a9465a0f2a69d64ec051db10698
3
+ metadata.gz: a5963e0ac1ab04a116cf9b5811892b9119573201
4
+ data.tar.gz: c4c0f266776a42a515a6dc03db4b900b12609f16
5
5
  SHA512:
6
- metadata.gz: 2fcc059df173e05c84f6ce6a2f1aab340a209377ada1c3a151b9d8f3702b2b0855faa91483cdaa6c2977503d58e7c4de677b34f260ccd01ee942d7d18f54d080
7
- data.tar.gz: 149efeb8e3d49db78c5ea70c247254adf435104eaed5a0d335656ad95c292d07eb713c803d565f5673d4282cb5c6ec4a18102c3154d66c6b19d323df316b1c4b
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 $APP_PATH
30
- export APP_PATH /path/to/your/apps
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 $APP_PATH
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 $APP_PATH directory.
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
@@ -8,10 +8,10 @@ require "appd/cli"
8
8
 
9
9
  if ARGV[0] != "help" && app = ARGV.shift
10
10
  if app == "."
11
- ARGV << "--app-path"
11
+ ARGV << "-p"
12
12
  ARGV << Dir.pwd
13
13
  else
14
- ARGV << "--app"
14
+ ARGV << "-a"
15
15
  ARGV << app
16
16
  end
17
17
  end
data/lib/appd/app.rb CHANGED
@@ -32,12 +32,12 @@ module Appd
32
32
 
33
33
  private
34
34
 
35
- def app_path
36
- "#{options.app_path || ENV["APP_PATH"]}/#{options.app}"
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 "direnv exec #{app_path} docker-compose -f #{app_path}/#{options.file} #{command}", server: options.server
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 :app_path, type: :string, aliases: "-p", desc: "Override $APP_PATH"
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 $APP_PATH directory."
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
@@ -1,3 +1,3 @@
1
1
  module Appd
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
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.exec(command, **options)
6
- super "#{"source ~/.appd/#{options[:server]} && " if options[:server]}#{command}"
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.5.1
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-18 00:00:00.000000000 Z
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.4.5.1
113
+ rubygems_version: 2.5.1
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Docker compose wrapper for managing containers.