sonic-screwdriver 2.1.0 → 2.1.1
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +53 -55
- data/docs/_includes/footer.html +3 -2
- data/lib/sonic.rb +1 -1
- data/lib/sonic/docker.rb +2 -2
- data/lib/sonic/execute.rb +2 -3
- data/lib/sonic/list.rb +1 -1
- data/lib/sonic/ssh.rb +1 -3
- data/lib/sonic/ui.rb +2 -2
- data/lib/sonic/version.rb +1 -1
- data/sonic.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '04708ff866e88a9752050a4928b3109948086ee0fe24594fffbc6ee04de03b8a'
|
|
4
|
+
data.tar.gz: 4f09a1cce6b42c121205b002da04dbe9d56292514ae597ed5ba2921e38ecba86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33433f9fa8025cff559255beb2ec9f107ca7dc1a11643fd3d145f5cc96d2dcc1c7dadbef74d3c4ca689590f3300d200f6c480e75b48dab271c046f751aaa2d19
|
|
7
|
+
data.tar.gz: 1d58617e51a1383af495d763270a79fddaa25f2c28fceb97940bdff5fae3f22cfe94e0eac6cf2ec6cbc25c3af3d0f9a5e16dd5738b91a5d28700000569098515
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
|
5
5
|
|
|
6
|
+
## [2.1.1]
|
|
7
|
+
- use rainbow gem for terminal colors
|
|
8
|
+
|
|
6
9
|
## [2.1.0]
|
|
7
10
|
- change the setting format to ssh.user instead of bastion.user
|
|
8
11
|
|
data/Gemfile.lock
CHANGED
|
@@ -1,63 +1,62 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sonic-screwdriver (2.
|
|
4
|
+
sonic-screwdriver (2.1.1)
|
|
5
5
|
activesupport
|
|
6
6
|
aws-sdk-ec2
|
|
7
7
|
aws-sdk-ecs
|
|
8
8
|
aws-sdk-s3
|
|
9
9
|
aws-sdk-ssm
|
|
10
|
-
colorize
|
|
11
10
|
hashie
|
|
12
11
|
memoist
|
|
12
|
+
rainbow
|
|
13
13
|
thor
|
|
14
14
|
tty-prompt
|
|
15
15
|
|
|
16
16
|
GEM
|
|
17
17
|
remote: https://rubygems.org/
|
|
18
18
|
specs:
|
|
19
|
-
activesupport (5.2.
|
|
19
|
+
activesupport (5.2.2)
|
|
20
20
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
21
21
|
i18n (>= 0.7, < 2)
|
|
22
22
|
minitest (~> 5.1)
|
|
23
23
|
tzinfo (~> 1.1)
|
|
24
|
-
aws-eventstream (1.0.
|
|
25
|
-
aws-partitions (1.
|
|
26
|
-
aws-sdk-core (3.
|
|
24
|
+
aws-eventstream (1.0.1)
|
|
25
|
+
aws-partitions (1.135.0)
|
|
26
|
+
aws-sdk-core (3.46.0)
|
|
27
27
|
aws-eventstream (~> 1.0)
|
|
28
28
|
aws-partitions (~> 1.0)
|
|
29
29
|
aws-sigv4 (~> 1.0)
|
|
30
30
|
jmespath (~> 1.0)
|
|
31
|
-
aws-sdk-ec2 (1.
|
|
32
|
-
aws-sdk-core (~> 3)
|
|
31
|
+
aws-sdk-ec2 (1.67.0)
|
|
32
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
33
33
|
aws-sigv4 (~> 1.0)
|
|
34
|
-
aws-sdk-ecs (1.
|
|
35
|
-
aws-sdk-core (~> 3)
|
|
34
|
+
aws-sdk-ecs (1.28.0)
|
|
35
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
36
36
|
aws-sigv4 (~> 1.0)
|
|
37
|
-
aws-sdk-kms (1.
|
|
38
|
-
aws-sdk-core (~> 3)
|
|
37
|
+
aws-sdk-kms (1.13.0)
|
|
38
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
39
39
|
aws-sigv4 (~> 1.0)
|
|
40
|
-
aws-sdk-s3 (1.
|
|
41
|
-
aws-sdk-core (~> 3, >= 3.
|
|
40
|
+
aws-sdk-s3 (1.30.1)
|
|
41
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
42
42
|
aws-sdk-kms (~> 1)
|
|
43
43
|
aws-sigv4 (~> 1.0)
|
|
44
|
-
aws-sdk-ssm (1.
|
|
45
|
-
aws-sdk-core (~> 3)
|
|
44
|
+
aws-sdk-ssm (1.35.0)
|
|
45
|
+
aws-sdk-core (~> 3, >= 3.39.0)
|
|
46
46
|
aws-sigv4 (~> 1.0)
|
|
47
|
-
aws-sigv4 (1.0.
|
|
47
|
+
aws-sigv4 (1.0.3)
|
|
48
48
|
byebug (10.0.2)
|
|
49
49
|
cli_markdown (0.1.0)
|
|
50
|
-
codeclimate-test-reporter (1.0.
|
|
50
|
+
codeclimate-test-reporter (1.0.9)
|
|
51
51
|
simplecov (<= 0.13)
|
|
52
52
|
coderay (1.1.2)
|
|
53
|
-
|
|
54
|
-
concurrent-ruby (1.0.5)
|
|
53
|
+
concurrent-ruby (1.1.4)
|
|
55
54
|
diff-lcs (1.3)
|
|
56
55
|
docile (1.1.5)
|
|
57
56
|
equatable (0.5.0)
|
|
58
|
-
ffi (1.
|
|
57
|
+
ffi (1.10.0)
|
|
59
58
|
formatador (0.2.5)
|
|
60
|
-
guard (2.
|
|
59
|
+
guard (2.15.0)
|
|
61
60
|
formatador (>= 0.2.4)
|
|
62
61
|
listen (>= 2.7, < 4.0)
|
|
63
62
|
lumberjack (>= 1.0.12, < 2.0)
|
|
@@ -66,8 +65,8 @@ GEM
|
|
|
66
65
|
pry (>= 0.9.12)
|
|
67
66
|
shellany (~> 0.0)
|
|
68
67
|
thor (>= 0.18.1)
|
|
69
|
-
guard-bundler (2.1
|
|
70
|
-
bundler (
|
|
68
|
+
guard-bundler (2.2.1)
|
|
69
|
+
bundler (>= 1.3.0, < 3)
|
|
71
70
|
guard (~> 2.2)
|
|
72
71
|
guard-compat (~> 1.1)
|
|
73
72
|
guard-compat (1.2.1)
|
|
@@ -75,9 +74,8 @@ GEM
|
|
|
75
74
|
guard (~> 2.1)
|
|
76
75
|
guard-compat (~> 1.1)
|
|
77
76
|
rspec (>= 2.99.0, < 4.0)
|
|
78
|
-
hashie (3.
|
|
79
|
-
|
|
80
|
-
i18n (1.0.1)
|
|
77
|
+
hashie (3.6.0)
|
|
78
|
+
i18n (1.5.3)
|
|
81
79
|
concurrent-ruby (~> 1.0)
|
|
82
80
|
jmespath (1.4.0)
|
|
83
81
|
json (2.1.0)
|
|
@@ -87,7 +85,7 @@ GEM
|
|
|
87
85
|
ruby_dep (~> 1.2)
|
|
88
86
|
lumberjack (1.0.13)
|
|
89
87
|
memoist (0.16.0)
|
|
90
|
-
method_source (0.9.
|
|
88
|
+
method_source (0.9.2)
|
|
91
89
|
minitest (5.11.3)
|
|
92
90
|
necromancer (0.4.0)
|
|
93
91
|
nenv (0.3.0)
|
|
@@ -97,26 +95,27 @@ GEM
|
|
|
97
95
|
pastel (0.7.2)
|
|
98
96
|
equatable (~> 0.5.0)
|
|
99
97
|
tty-color (~> 0.4.0)
|
|
100
|
-
pry (0.
|
|
98
|
+
pry (0.12.2)
|
|
101
99
|
coderay (~> 1.1.0)
|
|
102
100
|
method_source (~> 0.9.0)
|
|
103
|
-
|
|
101
|
+
rainbow (3.0.0)
|
|
102
|
+
rake (12.3.2)
|
|
104
103
|
rb-fsevent (0.10.3)
|
|
105
|
-
rb-inotify (0.
|
|
106
|
-
ffi (
|
|
107
|
-
rspec (3.
|
|
108
|
-
rspec-core (~> 3.
|
|
109
|
-
rspec-expectations (~> 3.
|
|
110
|
-
rspec-mocks (~> 3.
|
|
111
|
-
rspec-core (3.
|
|
112
|
-
rspec-support (~> 3.
|
|
113
|
-
rspec-expectations (3.
|
|
104
|
+
rb-inotify (0.10.0)
|
|
105
|
+
ffi (~> 1.0)
|
|
106
|
+
rspec (3.8.0)
|
|
107
|
+
rspec-core (~> 3.8.0)
|
|
108
|
+
rspec-expectations (~> 3.8.0)
|
|
109
|
+
rspec-mocks (~> 3.8.0)
|
|
110
|
+
rspec-core (3.8.0)
|
|
111
|
+
rspec-support (~> 3.8.0)
|
|
112
|
+
rspec-expectations (3.8.2)
|
|
114
113
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
115
|
-
rspec-support (~> 3.
|
|
116
|
-
rspec-mocks (3.
|
|
114
|
+
rspec-support (~> 3.8.0)
|
|
115
|
+
rspec-mocks (3.8.0)
|
|
117
116
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
118
|
-
rspec-support (~> 3.
|
|
119
|
-
rspec-support (3.
|
|
117
|
+
rspec-support (~> 3.8.0)
|
|
118
|
+
rspec-support (3.8.0)
|
|
120
119
|
ruby_dep (1.5.0)
|
|
121
120
|
shellany (0.0.1)
|
|
122
121
|
simplecov (0.13.0)
|
|
@@ -124,23 +123,22 @@ GEM
|
|
|
124
123
|
json (>= 1.8, < 3)
|
|
125
124
|
simplecov-html (~> 0.10.0)
|
|
126
125
|
simplecov-html (0.10.2)
|
|
127
|
-
thor (0.20.
|
|
126
|
+
thor (0.20.3)
|
|
128
127
|
thread_safe (0.3.6)
|
|
129
|
-
timers (4.
|
|
130
|
-
|
|
131
|
-
tty-
|
|
132
|
-
tty-
|
|
133
|
-
tty-prompt (0.16.1)
|
|
128
|
+
timers (4.3.0)
|
|
129
|
+
tty-color (0.4.3)
|
|
130
|
+
tty-cursor (0.6.0)
|
|
131
|
+
tty-prompt (0.18.1)
|
|
134
132
|
necromancer (~> 0.4.0)
|
|
135
133
|
pastel (~> 0.7.0)
|
|
136
134
|
timers (~> 4.0)
|
|
137
|
-
tty-cursor (~> 0.
|
|
138
|
-
tty-reader (~> 0.
|
|
139
|
-
tty-reader (0.
|
|
140
|
-
tty-cursor (~> 0.
|
|
135
|
+
tty-cursor (~> 0.6.0)
|
|
136
|
+
tty-reader (~> 0.5.0)
|
|
137
|
+
tty-reader (0.5.0)
|
|
138
|
+
tty-cursor (~> 0.6.0)
|
|
141
139
|
tty-screen (~> 0.6.4)
|
|
142
140
|
wisper (~> 2.0.0)
|
|
143
|
-
tty-screen (0.6.
|
|
141
|
+
tty-screen (0.6.5)
|
|
144
142
|
tzinfo (1.2.5)
|
|
145
143
|
thread_safe (~> 0.1)
|
|
146
144
|
wisper (2.0.0)
|
|
@@ -160,4 +158,4 @@ DEPENDENCIES
|
|
|
160
158
|
sonic-screwdriver!
|
|
161
159
|
|
|
162
160
|
BUNDLED WITH
|
|
163
|
-
1.
|
|
161
|
+
1.17.1
|
data/docs/_includes/footer.html
CHANGED
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
<div class="footer-col col-md-4">
|
|
7
7
|
<h3>More Tools</h3>
|
|
8
8
|
<ul class="list-unstyled tools">
|
|
9
|
-
<li><a href="http://
|
|
10
|
-
<li><a href="http://lono.cloud">Lono</a></li>
|
|
9
|
+
<li><a href="http://rubyonjets.com">Jets</a></li>
|
|
11
10
|
<li><a href="http://ufoships.com">Ufo</a></li>
|
|
11
|
+
<li><a href="http://lono.cloud">Lono</a></li>
|
|
12
|
+
<li><a href="http://jack-eb.com">Jack</a></li>
|
|
12
13
|
<li><a href="https://boltops.com/toolbelt">Toolbelt</a></li>
|
|
13
14
|
</ul>
|
|
14
15
|
</div>
|
data/lib/sonic.rb
CHANGED
data/lib/sonic/docker.rb
CHANGED
|
@@ -30,7 +30,7 @@ module Sonic
|
|
|
30
30
|
|
|
31
31
|
# command is an Array
|
|
32
32
|
def execute(*command)
|
|
33
|
-
UI.say "=> #{command.join(' ')}".
|
|
33
|
+
UI.say "=> #{command.join(' ')}".color(:green)
|
|
34
34
|
success = system(*command)
|
|
35
35
|
unless success
|
|
36
36
|
UI.error(command.join(' '))
|
|
@@ -59,7 +59,7 @@ module Sonic
|
|
|
59
59
|
|
|
60
60
|
ssh = ["ssh", ssh_options, "-At", host, "uptime", "2>&1"]
|
|
61
61
|
command = ssh.join(' ')
|
|
62
|
-
puts "=> #{command}".
|
|
62
|
+
puts "=> #{command}".color(:green)
|
|
63
63
|
output = `#{command}`
|
|
64
64
|
if output.include?("Permission denied")
|
|
65
65
|
puts output
|
data/lib/sonic/execute.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require 'colorize'
|
|
2
1
|
require 'yaml'
|
|
3
2
|
require 'active_support/core_ext/hash'
|
|
4
3
|
|
|
@@ -104,9 +103,9 @@ module Sonic
|
|
|
104
103
|
def colorized_status(status)
|
|
105
104
|
case status
|
|
106
105
|
when "Success"
|
|
107
|
-
status.
|
|
106
|
+
status.color(:green)
|
|
108
107
|
when "Failed"
|
|
109
|
-
status.
|
|
108
|
+
status.color(:red)
|
|
110
109
|
else
|
|
111
110
|
status
|
|
112
111
|
end
|
data/lib/sonic/list.rb
CHANGED
data/lib/sonic/ssh.rb
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'colorize'
|
|
2
|
-
|
|
3
1
|
module Sonic
|
|
4
2
|
class Ssh
|
|
5
3
|
autoload :IdentifierDetector, 'sonic/ssh/identifier_detector'
|
|
@@ -82,7 +80,7 @@ module Sonic
|
|
|
82
80
|
def kernel_exec(*args)
|
|
83
81
|
# append the optional command that can be provided to the ssh command
|
|
84
82
|
full_command = args + @options[:command]
|
|
85
|
-
puts "=> #{full_command.join(' ')}".
|
|
83
|
+
puts "=> #{full_command.join(' ')}".color(:green)
|
|
86
84
|
# https://ruby-doc.org/core-2.3.1/Kernel.html#method-i-exec
|
|
87
85
|
# Using 2nd form
|
|
88
86
|
Kernel.exec(*full_command) unless @options[:noop]
|
data/lib/sonic/ui.rb
CHANGED
|
@@ -19,10 +19,10 @@ module Sonic
|
|
|
19
19
|
puts msg unless mute
|
|
20
20
|
end
|
|
21
21
|
def error(msg='')
|
|
22
|
-
say "ERROR: #{msg}".
|
|
22
|
+
say "ERROR: #{msg}".color(:red)
|
|
23
23
|
end
|
|
24
24
|
def warn(msg='')
|
|
25
|
-
say "WARN: #{msg}".
|
|
25
|
+
say "WARN: #{msg}".color(:yellow)
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
end
|
data/lib/sonic/version.rb
CHANGED
data/sonic.gemspec
CHANGED
|
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.add_dependency "aws-sdk-ecs"
|
|
24
24
|
spec.add_dependency "aws-sdk-s3"
|
|
25
25
|
spec.add_dependency "aws-sdk-ssm"
|
|
26
|
-
spec.add_dependency "colorize"
|
|
27
26
|
spec.add_dependency "hashie"
|
|
28
27
|
spec.add_dependency "memoist"
|
|
28
|
+
spec.add_dependency "rainbow"
|
|
29
29
|
spec.add_dependency "thor"
|
|
30
30
|
spec.add_dependency "tty-prompt"
|
|
31
31
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sonic-screwdriver
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tung Nguyen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -81,7 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: hashie
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: memoist
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: rainbow
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|