aptible-cli 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aptible/cli/agent.rb +4 -2
- data/lib/aptible/cli/helpers/operation.rb +2 -3
- data/lib/aptible/cli/version.rb +1 -1
- data/spec/aptible/cli/agent_spec.rb +7 -0
- 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: 02cb684565a0efb38b9a81bfe8e528288db946d8
|
4
|
+
data.tar.gz: 5cbc7f790a2a8049c74a44a95761e5d5eb42b68b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77f9d47520ffcdc4c2bec46a6691eda79cd8236f503b5488923217e66b147e8591f6edab81bc174c8ed7681b864a6acee3595344746494ca91acafb55aa5689e
|
7
|
+
data.tar.gz: a3fc0f4e2808a7d7bd96eebb7dcef1805df1a2f4d194116d9dadb14447dd07daba76797cf855301cedeade3fab33c4d1177ee080b949e56596eba8fe59ee8e20
|
data/lib/aptible/cli/agent.rb
CHANGED
@@ -24,9 +24,11 @@ module Aptible
|
|
24
24
|
end
|
25
25
|
|
26
26
|
desc 'login', 'Log in to Aptible'
|
27
|
+
option :email
|
28
|
+
option :password
|
27
29
|
def login
|
28
|
-
email = ask('Email: ')
|
29
|
-
password = ask('Password: ', echo: false)
|
30
|
+
email = options[:email] || ask('Email: ')
|
31
|
+
password = options[:password] || ask('Password: ', echo: false)
|
30
32
|
puts ''
|
31
33
|
|
32
34
|
begin
|
@@ -9,9 +9,8 @@ module Aptible
|
|
9
9
|
def poll_for_success(operation)
|
10
10
|
puts 'Updating configuration and restarting app...'
|
11
11
|
wait_for_completion operation
|
12
|
-
|
13
|
-
|
14
|
-
end
|
12
|
+
return if operation.status == 'succeeded'
|
13
|
+
fail Thor::Error, 'Operation failed: please check logs'
|
15
14
|
end
|
16
15
|
|
17
16
|
def wait_for_completion(operation)
|
data/lib/aptible/cli/version.rb
CHANGED
@@ -29,5 +29,12 @@ describe Aptible::CLI::Agent do
|
|
29
29
|
subject.login
|
30
30
|
end.to raise_error 'Could not authenticate with given credentials'
|
31
31
|
end
|
32
|
+
|
33
|
+
it 'should use command line arguments if passed' do
|
34
|
+
options = { email: 'test@example.com', password: 'password' }
|
35
|
+
subject.stub(:options) { options }
|
36
|
+
expect(Aptible::Auth::Token).to receive(:create).with(options) { token }
|
37
|
+
subject.login
|
38
|
+
end
|
32
39
|
end
|
33
40
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-api
|