aptible-cli 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +39 -0
- data/lib/aptible/cli/helpers/token.rb +0 -2
- data/lib/aptible/cli/subcommands/apps.rb +0 -2
- data/lib/aptible/cli/subcommands/config.rb +0 -4
- data/lib/aptible/cli/subcommands/db.rb +1 -5
- data/lib/aptible/cli/subcommands/rebuild.rb +0 -2
- data/lib/aptible/cli/subcommands/restart.rb +0 -2
- data/lib/aptible/cli/subcommands/ssh.rb +4 -4
- data/lib/aptible/cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16cc464ac59b8a2270e1342aa7bd73b693c1b86e
|
4
|
+
data.tar.gz: 74fb681627d28106de355b8937248a5b9f390ba2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5cf4fbcf87a640a7d3d5a1fc8cab354032cb7478269dfe6f3cc64ca8f1088dd23ae5c924e08d620cee0d8d7ac0bf868c82e9b5cbff47f6ce4bba87222fd13ef
|
7
|
+
data.tar.gz: 1cd98b110b8d7ebbf92d83f91dcda78c0597eaad0300a63d36c0b69610162ef8aef6812e2d4b32c590a47fe6254f94a44b042d024da74af1c3860eed43e1bdde
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
GuardClause:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Documentation:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Encoding:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
DoubleNegation:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
NumericLiterals:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
FileName:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
MethodLength:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
CyclomaticComplexity:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
PerceivedComplexity:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
AllCops:
|
29
|
+
Include:
|
30
|
+
- !ruby/regexp /\.rb$/
|
31
|
+
- !ruby/regexp /\.rake$/
|
32
|
+
- !ruby/regexp /\.gemspec$/
|
33
|
+
- !ruby/regexp /Rakefile$/
|
34
|
+
Exclude:
|
35
|
+
# Exclude line length check from autogenerated files
|
36
|
+
- !ruby/regexp /\/db\/schema\.rb$/
|
37
|
+
- !ruby/regexp /node_modules\//
|
38
|
+
- !ruby/regexp /tmp\//
|
39
|
+
- !ruby/regexp /vendor\//
|
@@ -10,7 +10,6 @@ module Aptible
|
|
10
10
|
fail Thor::Error, 'Could not read token: please run aptible login'
|
11
11
|
end
|
12
12
|
|
13
|
-
# rubocop:disable MethodLength
|
14
13
|
def save_token(token)
|
15
14
|
hash = current_token_hash.merge(
|
16
15
|
Aptible::Auth.configuration.root_url => token
|
@@ -26,7 +25,6 @@ module Aptible
|
|
26
25
|
permissions
|
27
26
|
ERR
|
28
27
|
end
|
29
|
-
# rubocop:enable MethodLength
|
30
28
|
|
31
29
|
def current_token_hash
|
32
30
|
JSON.parse(File.read(token_file))
|
@@ -2,7 +2,6 @@ module Aptible
|
|
2
2
|
module CLI
|
3
3
|
module Subcommands
|
4
4
|
module Apps
|
5
|
-
# rubocop:disable MethodLength
|
6
5
|
def self.included(thor)
|
7
6
|
thor.class_eval do
|
8
7
|
include Helpers::Account
|
@@ -40,7 +39,6 @@ module Aptible
|
|
40
39
|
end
|
41
40
|
end
|
42
41
|
end
|
43
|
-
# rubocop:enable MethodLength
|
44
42
|
end
|
45
43
|
end
|
46
44
|
end
|
@@ -4,8 +4,6 @@ module Aptible
|
|
4
4
|
module CLI
|
5
5
|
module Subcommands
|
6
6
|
module Config
|
7
|
-
# rubocop:disable MethodLength
|
8
|
-
# rubocop:disable CyclomaticComplexity
|
9
7
|
def self.included(thor)
|
10
8
|
thor.class_eval do
|
11
9
|
include Helpers::Operation
|
@@ -61,8 +59,6 @@ module Aptible
|
|
61
59
|
end
|
62
60
|
end
|
63
61
|
end
|
64
|
-
# rubocop:enable CyclomaticComplexity
|
65
|
-
# rubocop:enable MethodLength
|
66
62
|
end
|
67
63
|
end
|
68
64
|
end
|
@@ -2,8 +2,6 @@ module Aptible
|
|
2
2
|
module CLI
|
3
3
|
module Subcommands
|
4
4
|
module DB
|
5
|
-
# rubocop:disable MethodLength
|
6
|
-
# rubocop:disable CyclomaticComplexity
|
7
5
|
def self.included(thor)
|
8
6
|
thor.class_eval do
|
9
7
|
include Helpers::Operation
|
@@ -36,7 +34,7 @@ module Aptible
|
|
36
34
|
fail Thor::Error, "Could not find database #{source_handle}"
|
37
35
|
end
|
38
36
|
|
39
|
-
op =
|
37
|
+
op = source.create_operation(type: 'clone', handle: dest_handle)
|
40
38
|
poll_for_success(op)
|
41
39
|
dest = database_from_handle(dest_handle)
|
42
40
|
say dest.connection_url
|
@@ -116,8 +114,6 @@ module Aptible
|
|
116
114
|
end
|
117
115
|
end
|
118
116
|
end
|
119
|
-
# rubocop:enable CyclomaticComplexity
|
120
|
-
# rubocop:enable MethodLength
|
121
117
|
end
|
122
118
|
end
|
123
119
|
end
|
@@ -2,7 +2,6 @@ module Aptible
|
|
2
2
|
module CLI
|
3
3
|
module Subcommands
|
4
4
|
module Rebuild
|
5
|
-
# rubocop:disable MethodLength
|
6
5
|
def self.included(thor)
|
7
6
|
thor.class_eval do
|
8
7
|
include Helpers::Operation
|
@@ -18,7 +17,6 @@ module Aptible
|
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
21
|
-
# rubocop:enable MethodLength
|
22
20
|
end
|
23
21
|
end
|
24
22
|
end
|
@@ -2,7 +2,6 @@ module Aptible
|
|
2
2
|
module CLI
|
3
3
|
module Subcommands
|
4
4
|
module Restart
|
5
|
-
# rubocop:disable MethodLength
|
6
5
|
def self.included(thor)
|
7
6
|
thor.class_eval do
|
8
7
|
include Helpers::Operation
|
@@ -18,7 +17,6 @@ module Aptible
|
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
21
|
-
# rubocop:enable MethodLength
|
22
20
|
end
|
23
21
|
end
|
24
22
|
end
|
@@ -4,7 +4,6 @@ module Aptible
|
|
4
4
|
module CLI
|
5
5
|
module Subcommands
|
6
6
|
module SSH
|
7
|
-
# rubocop:disable MethodLength
|
8
7
|
def self.included(thor)
|
9
8
|
thor.class_eval do
|
10
9
|
include Helpers::Operation
|
@@ -17,6 +16,7 @@ module Aptible
|
|
17
16
|
If specifying an app, invoke via: aptible ssh [--app=APP] COMMAND
|
18
17
|
LONGDESC
|
19
18
|
option :app
|
19
|
+
option :force_tty, type: :boolean
|
20
20
|
def ssh(*args)
|
21
21
|
app = ensure_app(options)
|
22
22
|
host = app.account.bastion_host
|
@@ -26,8 +26,9 @@ module Aptible
|
|
26
26
|
ENV['APTIBLE_COMMAND'] = command_from_args(*args)
|
27
27
|
ENV['APTIBLE_APP'] = app.handle
|
28
28
|
|
29
|
-
opts =
|
30
|
-
|
29
|
+
opts = options[:force_tty] ? '-t -t' : ''
|
30
|
+
opts << " -o 'SendEnv=*' -o StrictHostKeyChecking=no " \
|
31
|
+
'-o UserKnownHostsFile=/dev/null'
|
31
32
|
Kernel.exec "ssh #{opts} -p #{port} root@#{host}"
|
32
33
|
end
|
33
34
|
|
@@ -38,7 +39,6 @@ module Aptible
|
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
41
|
-
# rubocop:enable MethodLength
|
42
42
|
end
|
43
43
|
end
|
44
44
|
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.4.
|
4
|
+
version: 0.4.2
|
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-
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-api
|
@@ -132,6 +132,7 @@ extra_rdoc_files: []
|
|
132
132
|
files:
|
133
133
|
- .gitignore
|
134
134
|
- .rspec
|
135
|
+
- .rubocop.yml
|
135
136
|
- .travis.yml
|
136
137
|
- Gemfile
|
137
138
|
- LICENSE.md
|