ops_team 1.20.2.pre.rc1 → 1.20.3.rc1
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/lib/dependencies/sshkey.rb +1 -5
- data/ops_team.gemspec +2 -2
- metadata +6 -8
- data/bin/ops.orig +0 -42
- data/lib/dependencies/helpers/ssh_key_decryptor.rb +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4dbd026718a0b566adb010491e16d8d6cd2c51e9d014685fdd6f3205f2bfcb3a
|
|
4
|
+
data.tar.gz: b3c7d6085f0036fed0c0b34c65e1d8e5ffca15463c89462c71ae1053e9f9406c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c83871bce7f153801fe3c751335ab43bac817a2ffe466b7c9c8d8813f21f48f67987755c7cd4ba164a0db44b59e39ca7b194f252daaa1816c06148ab7756202
|
|
7
|
+
data.tar.gz: 6977ebb78865764568d2789e94025ca6a1a400cfe5e3051adf55ea81081b5f4da8236011b5a52a731dac21bd30b02893cc3ae60aa71f639e072eaf3b608f5a2d
|
data/lib/dependencies/sshkey.rb
CHANGED
|
@@ -54,11 +54,7 @@ module Dependencies
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def unencrypted_key
|
|
57
|
-
Net::SSH::KeyFactory.
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
def decryptor
|
|
61
|
-
@decryptor ||= Helpers::SshKeyDecryptor.new(priv_key_name, passphrase)
|
|
57
|
+
Net::SSH::KeyFactory.load_private_key(priv_key_name, passphrase.empty? ? nil : passphrase)
|
|
62
58
|
end
|
|
63
59
|
|
|
64
60
|
def key_comment
|
data/ops_team.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'ops_team'
|
|
5
|
-
s.version = '1.20.
|
|
5
|
+
s.version = '1.20.3.rc1'
|
|
6
6
|
s.authors = [
|
|
7
7
|
'nickthecook@gmail.com'
|
|
8
8
|
]
|
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|
|
29
29
|
s.add_runtime_dependency 'concurrent-ruby', '~> 1.1', '>= 1.1.7'
|
|
30
30
|
s.add_runtime_dependency 'ed25519', '~> 1.2', '>= 1.2.4'
|
|
31
31
|
s.add_runtime_dependency 'ejson', '~> 1.2', '>= 1.2.1'
|
|
32
|
-
s.add_runtime_dependency 'net-ssh', '~>
|
|
32
|
+
s.add_runtime_dependency 'net-ssh', '~> 7.1', '>= 7.1.0'
|
|
33
33
|
s.add_runtime_dependency 'require_all', '~> 1.1', '>= 1.1.6'
|
|
34
34
|
s.add_runtime_dependency 'zeitwerk', '~> 2.5', '>= 2.5.3'
|
|
35
35
|
s.license = 'GPL-3.0-only'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ops_team
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.20.
|
|
4
|
+
version: 1.20.3.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nickthecook@gmail.com
|
|
@@ -116,20 +116,20 @@ dependencies:
|
|
|
116
116
|
requirements:
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '
|
|
119
|
+
version: '7.1'
|
|
120
120
|
- - ">="
|
|
121
121
|
- !ruby/object:Gem::Version
|
|
122
|
-
version:
|
|
122
|
+
version: 7.1.0
|
|
123
123
|
type: :runtime
|
|
124
124
|
prerelease: false
|
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
|
127
127
|
- - "~>"
|
|
128
128
|
- !ruby/object:Gem::Version
|
|
129
|
-
version: '
|
|
129
|
+
version: '7.1'
|
|
130
130
|
- - ">="
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version:
|
|
132
|
+
version: 7.1.0
|
|
133
133
|
- !ruby/object:Gem::Dependency
|
|
134
134
|
name: require_all
|
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -180,7 +180,6 @@ files:
|
|
|
180
180
|
- Gemfile
|
|
181
181
|
- bin/benchmark
|
|
182
182
|
- bin/ops
|
|
183
|
-
- bin/ops.orig
|
|
184
183
|
- bin/print_config
|
|
185
184
|
- bin/print_secrets
|
|
186
185
|
- bin/tag
|
|
@@ -215,7 +214,6 @@ files:
|
|
|
215
214
|
- lib/dependencies/docker.rb
|
|
216
215
|
- lib/dependencies/gem.rb
|
|
217
216
|
- lib/dependencies/helpers/apt_cache_policy.rb
|
|
218
|
-
- lib/dependencies/helpers/ssh_key_decryptor.rb
|
|
219
217
|
- lib/dependencies/pip.rb
|
|
220
218
|
- lib/dependencies/snap.rb
|
|
221
219
|
- lib/dependencies/sshkey.rb
|
|
@@ -254,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
254
252
|
- !ruby/object:Gem::Version
|
|
255
253
|
version: 1.3.1
|
|
256
254
|
requirements: []
|
|
257
|
-
rubygems_version: 3.
|
|
255
|
+
rubygems_version: 3.4.6
|
|
258
256
|
signing_key:
|
|
259
257
|
specification_version: 4
|
|
260
258
|
summary: ops_team handles basic automation for your project, driven by self-documenting
|
data/bin/ops.orig
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
5
|
-
|
|
6
|
-
require_relative '../lib/profiler'
|
|
7
|
-
require 'optparse'
|
|
8
|
-
|
|
9
|
-
def usage
|
|
10
|
-
puts "Usage: ops [-f|--file <ops_yml>] action [<action args>"
|
|
11
|
-
puts " ops_yml: the config file to load instead of './ops.yml'"
|
|
12
|
-
puts " action_args: arguments to the action loaded from the config file; depends on the action"
|
|
13
|
-
|
|
14
|
-
exit(1)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
options = {}
|
|
18
|
-
status = -1
|
|
19
|
-
|
|
20
|
-
while ARGV[0]&.match(/^-/)
|
|
21
|
-
opt = ARGV.shift
|
|
22
|
-
case opt
|
|
23
|
-
when '-f', '--file'
|
|
24
|
-
usage unless ARGV.length >= 1
|
|
25
|
-
|
|
26
|
-
options[:file] = ARGV.shift
|
|
27
|
-
else
|
|
28
|
-
usage
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
Profiler.measure("bin:require") do
|
|
33
|
-
require_relative "../loader"
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
Profiler.measure("bin:run") do
|
|
37
|
-
status = Ops.new(ARGV, config_file: options[:file]).run
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
Profiler.add_measurement("bin:all", Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time)
|
|
41
|
-
Output.error(Profiler.summary) if Profiler.summary
|
|
42
|
-
exit status
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "tempfile"
|
|
4
|
-
|
|
5
|
-
module Dependencies
|
|
6
|
-
module Helpers
|
|
7
|
-
class SshKeyDecryptor
|
|
8
|
-
def initialize(source_key_path, passphrase)
|
|
9
|
-
@source_key_path = source_key_path
|
|
10
|
-
@passphrase = passphrase
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def plaintext_key
|
|
14
|
-
@plaintext_key ||= begin
|
|
15
|
-
plaintext = decrypt_key
|
|
16
|
-
|
|
17
|
-
File.delete(temp_key_file.path)
|
|
18
|
-
|
|
19
|
-
plaintext
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
def temp_key_file
|
|
26
|
-
@temp_key_file ||= Tempfile.new("ops")
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def decrypt_key
|
|
30
|
-
FileUtils.cp(@source_key_path, temp_key_file.path)
|
|
31
|
-
`ssh-keygen -f '#{temp_key_file.path}' -p -P '#{@passphrase}' </dev/null`
|
|
32
|
-
|
|
33
|
-
File.read(temp_key_file.path)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|