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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b7b649692524fe76dd9bcb278643cf4227f6dae
4
- data.tar.gz: 15656687281f2f6cc6445f56ba2d6872867b91b5
3
+ metadata.gz: bbbf530fdaf8664cb41c7e111db5836f1bf72e52
4
+ data.tar.gz: 14d31623a79f90fd6710129c178901ca16696250
5
5
  SHA512:
6
- metadata.gz: 506bbbba7707cfeaf31a1fd7809e1d71102f2efecd63b45d3d0604aa5b7f498c1dbbe0353a079434ccbaa00cb79cb1a23c70752a025dd57f4c4b4d1a63354a56
7
- data.tar.gz: c5eb749d12630e9c23451a764e5a03b405097972ff942ef8a394829ec51bb5097b2009053f7b8948217bde9a3e1e1a3b7b1bb8f1bdcf149a5754fda43a51ace0
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] || ensure_default_handle
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(:aptible).url || ''
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
@@ -11,6 +11,7 @@ module Aptible
11
11
 
12
12
  desc 'logs', 'Follows logs from a running app'
13
13
  option :app
14
+ option :remote, aliases: '-r'
14
15
  def logs
15
16
  app = ensure_app(options)
16
17
  host = app.account.bastion_host
@@ -9,6 +9,7 @@ module Aptible
9
9
 
10
10
  desc 'rebuild', 'Rebuild an app, and restart its services'
11
11
  option :app
12
+ option :remote, aliases: '-r'
12
13
  def rebuild
13
14
  app = ensure_app(options)
14
15
  operation = app.create_operation(type: 'rebuild')
@@ -9,6 +9,7 @@ module Aptible
9
9
 
10
10
  desc 'restart', 'Restart all services associated with an app'
11
11
  option :app
12
+ option :remote, aliases: '-r'
12
13
  def restart
13
14
  app = ensure_app(options)
14
15
  operation = app.create_operation(type: 'restart')
@@ -16,6 +16,7 @@ module Aptible
16
16
  If specifying an app, invoke via: aptible ssh [--app=APP] COMMAND
17
17
  LONGDESC
18
18
  option :app
19
+ option :remote, aliases: '-r'
19
20
  option :force_tty, type: :boolean
20
21
  def ssh(*args)
21
22
  app = ensure_app(options)
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.5.5'
3
+ VERSION = '0.5.6'
4
4
  end
5
5
  end
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.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-01-31 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-api