aptible-cli 0.5.5 → 0.5.6
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/lib/aptible/cli/helpers/app.rb +8 -2
- data/lib/aptible/cli/subcommands/config.rb +5 -0
- data/lib/aptible/cli/subcommands/logs.rb +1 -0
- data/lib/aptible/cli/subcommands/rebuild.rb +1 -0
- data/lib/aptible/cli/subcommands/restart.rb +1 -0
- data/lib/aptible/cli/subcommands/ssh.rb +1 -0
- data/lib/aptible/cli/version.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: bbbf530fdaf8664cb41c7e111db5836f1bf72e52
|
4
|
+
data.tar.gz: 14d31623a79f90fd6710129c178901ca16696250
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b1ef1659f168a36c81e1f303ca82e5f57864390000d7914c44cf9ec1aca4f89065bfc3055ae6ecf17aeb8060d21c54203ff6ddb16cfe0644e74d162ed88b386
|
7
|
+
data.tar.gz: 9042bef71b48be89978ea9def3a6026a0d5e4e3322644cc374669b72da7a7bee0caa35b6d46eba3a82722f1e2a7adf4329b9d7411ce6fa5d0caaea65d16e7092
|
data/README.md
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
[![Build Status](https://travis-ci.org/aptible/aptible-cli.png?branch=master)](https://travis-ci.org/aptible/aptible-cli)
|
5
5
|
[![Dependency Status](https://gemnasium.com/aptible/aptible-cli.png)](https://gemnasium.com/aptible/aptible-cli)
|
6
6
|
|
7
|
+
[![Roadmap](https://badge.waffle.io/aptible/aptible-cli.svg?label=ready&title=roadmap)](http://waffle.io/aptible/aptible-cli)
|
8
|
+
|
7
9
|
Command-line interface for Aptible services.
|
8
10
|
|
9
11
|
## Installation
|
@@ -8,7 +8,9 @@ module Aptible
|
|
8
8
|
include Helpers::Token
|
9
9
|
|
10
10
|
def ensure_app(options = {})
|
11
|
-
handle = options[:app] ||
|
11
|
+
handle = options[:app] ||
|
12
|
+
handle_from_remote(options[:remote]) ||
|
13
|
+
ensure_default_handle
|
12
14
|
app = app_from_handle(handle)
|
13
15
|
return app if app
|
14
16
|
fail Thor::Error, "Could not find app #{handle}"
|
@@ -29,8 +31,12 @@ module Aptible
|
|
29
31
|
end
|
30
32
|
|
31
33
|
def default_handle
|
34
|
+
handle_from_remote(:aptible)
|
35
|
+
end
|
36
|
+
|
37
|
+
def handle_from_remote(remote_name)
|
32
38
|
git = Git.open(Dir.pwd)
|
33
|
-
aptible_remote = git.remote(
|
39
|
+
aptible_remote = git.remote(remote_name).url || ''
|
34
40
|
aptible_remote[/:(?<name>.+)\.git/, :name]
|
35
41
|
rescue
|
36
42
|
nil
|
@@ -11,6 +11,7 @@ module Aptible
|
|
11
11
|
|
12
12
|
desc 'config', "Print an app's current configuration"
|
13
13
|
option :app
|
14
|
+
option :remote, aliases: '-r'
|
14
15
|
def config
|
15
16
|
app = ensure_app(options)
|
16
17
|
config = app.current_configuration
|
@@ -20,6 +21,7 @@ module Aptible
|
|
20
21
|
|
21
22
|
desc 'config:add', 'Add an ENV variable to an app'
|
22
23
|
option :app
|
24
|
+
option :remote, aliases: '-r'
|
23
25
|
define_method 'config:add' do |*args|
|
24
26
|
# FIXME: define_method - ?! Seriously, WTF Thor.
|
25
27
|
app = ensure_app(options)
|
@@ -31,12 +33,14 @@ module Aptible
|
|
31
33
|
|
32
34
|
desc 'config:set', 'Alias for config:add'
|
33
35
|
option :app
|
36
|
+
option :remote, aliases: '-r'
|
34
37
|
define_method 'config:set' do |*args|
|
35
38
|
send('config:add', *args)
|
36
39
|
end
|
37
40
|
|
38
41
|
desc 'config:rm', 'Remove an ENV variable from an app'
|
39
42
|
option :app
|
43
|
+
option :remote, aliases: '-r'
|
40
44
|
define_method 'config:rm' do |*args|
|
41
45
|
# FIXME: define_method - ?! Seriously, WTF Thor.
|
42
46
|
app = ensure_app(options)
|
@@ -48,6 +52,7 @@ module Aptible
|
|
48
52
|
|
49
53
|
desc 'config:unset', 'Alias for config:rm'
|
50
54
|
option :app
|
55
|
+
option :remote, aliases: '-r'
|
51
56
|
define_method 'config:unset' do |*args|
|
52
57
|
send('config:add', *args)
|
53
58
|
end
|
data/lib/aptible/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-api
|