opswalrus 1.0.73 → 1.0.75

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
  SHA256:
3
- metadata.gz: ad2d52c1a9f3f3f041ca0768f62f91fa85c84470de6442e90139aff6cae3944c
4
- data.tar.gz: 9d05add771cd5f6f828bfd051710cef71525a1a562cfb47073993b60b14e5302
3
+ metadata.gz: fae180b8470e18b9df257ddc1b4c48f2f8349db6beb014238829bc403da85231
4
+ data.tar.gz: dda5587a3d6402f3b85924d3a0a82380ed134711a66c500980eb08d9a6335b0a
5
5
  SHA512:
6
- metadata.gz: 15c43c38639432b2c684f9df85545e53bedaaa6c9051d929bbed266bfdce071c0dd2e68d40c643f07996f967714135217eb24029557dcbd7cbdab814c3366663
7
- data.tar.gz: 4eef5d3a3f8c6982308e43ffa1cea08de1e5b141200492c741c4b2988f8d7437efb04b44e2be64d6bd866804da9a7c552bbe0f868945e10f9d96acb2e359d478
6
+ metadata.gz: 72d259ea0cf91071a439c18240acb202f6d3e16133caf541682808b02de2ed1c0b71524d4abc9b47826e2c0cbb5c6ddfe8ae8dcadb9a675ac68f83ee7e0c01c5
7
+ data.tar.gz: 02141df673a6d5ed931847a5cf50f21a230890500fba01dcf746139d2bfdcab1582fe40901663bba4283ddb53f4856c969d389e6506b715e4124f04665987613
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.73)
4
+ opswalrus (1.0.75)
5
5
  activesupport (~> 7.0)
6
6
  bcrypt_pbkdf (~> 1.1)
7
7
  binding_of_caller (~> 1.0)
@@ -18,10 +18,15 @@ PATH
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
- activesupport (7.0.8)
21
+ activesupport (7.1.1)
22
+ base64
23
+ bigdecimal
22
24
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
+ connection_pool (>= 2.2.5)
26
+ drb
23
27
  i18n (>= 1.6, < 2)
24
28
  minitest (>= 5.1)
29
+ mutex_m
25
30
  tzinfo (~> 2.0)
26
31
  addressable (2.8.5)
27
32
  public_suffix (>= 2.0.2, < 6.0)
@@ -30,12 +35,16 @@ GEM
30
35
  base64 (0.1.1)
31
36
  bcrypt_pbkdf (1.1.0)
32
37
  benchmark (0.2.1)
38
+ bigdecimal (3.1.4)
33
39
  binding_of_caller (1.0.0)
34
40
  debug_inspector (>= 0.0.1)
35
41
  citrus (3.0.2)
36
42
  concurrent-ruby (1.2.2)
43
+ connection_pool (2.4.1)
37
44
  debug_inspector (1.1.0)
38
45
  diff-lcs (1.5.0)
46
+ drb (2.1.1)
47
+ ruby2_keywords
39
48
  e2mmap (0.1.0)
40
49
  ed25519 (1.3.0)
41
50
  git (1.18.0)
@@ -52,24 +61,25 @@ GEM
52
61
  kramdown (~> 2.0)
53
62
  language_server-protocol (3.17.0.3)
54
63
  minitest (5.20.0)
64
+ mutex_m (0.1.2)
55
65
  net-scp (4.0.0)
56
66
  net-ssh (>= 2.6.5, < 8.0.0)
57
67
  net-ssh (7.2.0)
58
68
  nokogiri (1.15.4-x86_64-linux)
59
69
  racc (~> 1.4)
60
70
  parallel (1.23.0)
61
- parser (3.2.2.3)
71
+ parser (3.2.2.4)
62
72
  ast (~> 2.4.1)
63
73
  racc
64
74
  pastel (0.8.0)
65
75
  tty-color (~> 0.5)
66
76
  public_suffix (5.0.3)
67
- racc (1.7.1)
77
+ racc (1.7.2)
68
78
  rainbow (3.1.1)
69
- rake (13.0.6)
79
+ rake (13.1.0)
70
80
  rbs (2.8.4)
71
81
  rchardet (1.8.0)
72
- regexp_parser (2.8.1)
82
+ regexp_parser (2.8.2)
73
83
  reverse_markdown (2.1.1)
74
84
  nokogiri
75
85
  rexml (3.2.6)
@@ -86,21 +96,21 @@ GEM
86
96
  diff-lcs (>= 1.2.0, < 2.0)
87
97
  rspec-support (~> 3.12.0)
88
98
  rspec-support (3.12.1)
89
- rubocop (1.56.4)
90
- base64 (~> 0.1.1)
99
+ rubocop (1.57.2)
91
100
  json (~> 2.3)
92
101
  language_server-protocol (>= 3.17.0)
93
102
  parallel (~> 1.10)
94
- parser (>= 3.2.2.3)
103
+ parser (>= 3.2.2.4)
95
104
  rainbow (>= 2.2.2, < 4.0)
96
105
  regexp_parser (>= 1.8, < 3.0)
97
106
  rexml (>= 3.2.5, < 4.0)
98
107
  rubocop-ast (>= 1.28.1, < 2.0)
99
108
  ruby-progressbar (~> 1.7)
100
109
  unicode-display_width (>= 2.4.0, < 3.0)
101
- rubocop-ast (1.29.0)
110
+ rubocop-ast (1.30.0)
102
111
  parser (>= 3.2.1.0)
103
112
  ruby-progressbar (1.13.0)
113
+ ruby2_keywords (0.0.5)
104
114
  rubyzip (2.3.2)
105
115
  semantic_logger (4.14.0)
106
116
  concurrent-ruby (~> 1.0)
@@ -123,7 +133,7 @@ GEM
123
133
  sshkit (1.21.5)
124
134
  net-scp (>= 1.1.2)
125
135
  net-ssh (>= 2.8.0)
126
- thor (1.2.2)
136
+ thor (1.3.0)
127
137
  tilt (2.3.0)
128
138
  tty-color (0.6.0)
129
139
  tty-cursor (0.7.1)
@@ -139,7 +149,7 @@ GEM
139
149
  tty-screen (0.8.1)
140
150
  tzinfo (2.0.6)
141
151
  concurrent-ruby (~> 1.0)
142
- unicode-display_width (2.4.2)
152
+ unicode-display_width (2.5.0)
143
153
  wisper (2.0.1)
144
154
  yard (0.9.34)
145
155
 
@@ -54,7 +54,7 @@ if echo $OS | grep -q 'ubuntu'; then
54
54
  sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq build-essential procps curl file git
55
55
 
56
56
  # restart services that need it
57
- (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || (echo 'Reboot needed. Exiting.'; exit 1;)
57
+ (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || { echo 'Reboot needed. Exiting.'; exit 1; }
58
58
  # sudo needrestart -q -r a
59
59
  elif echo $OS | grep -q 'fedora'; then
60
60
  sudo dnf groupinstall -y 'Development Tools'
@@ -104,7 +104,7 @@ if echo $OS | grep -q 'ubuntu'; then
104
104
  sudo apt update -qy
105
105
 
106
106
  # reboot if needed
107
- (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || (echo 'Reboot needed. Exiting.'; exit 1;)
107
+ (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || { echo 'Reboot needed. Exiting.'; exit 1; }
108
108
 
109
109
  # install ruby dependencies
110
110
  # see https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
@@ -115,7 +115,7 @@ if echo $OS | grep -q 'ubuntu'; then
115
115
  sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm-dev libdb-dev uuid-dev
116
116
 
117
117
  # reboot if needed
118
- (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || (echo 'Reboot needed. Exiting.'; exit 1;)
118
+ (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || { echo 'Reboot needed. Exiting.'; exit 1; }
119
119
  elif echo $OS | grep -q 'fedora'; then
120
120
  # from https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
121
121
  sudo yum install -y gcc patch bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
@@ -141,7 +141,7 @@ if echo $OS | grep -q 'ubuntu'; then
141
141
  sudo apt update -qy
142
142
 
143
143
  # reboot if needed
144
- (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || (echo 'Reboot needed. Exiting.'; exit 1;)
144
+ (sudo needrestart -b | grep -q 'NEEDRESTART-KSTA: 1') || { echo 'Reboot needed. Exiting.'; exit 1; }
145
145
 
146
146
  sudo DEBIAN_FRONTEND=noninteractive apt install -yq age
147
147
 
data/lib/opswalrus/cli.rb CHANGED
@@ -20,12 +20,18 @@ module OpsWalrus
20
20
 
21
21
  # this is invoked on an unhandled exception or a call to exit_now!
22
22
  on_error do |exception|
23
- next(false) if exception.is_a? GLI::CustomExit
24
-
25
- $app.fatal "catchall exception handler:"
26
- $app.fatal exception.message
27
- $app.fatal exception.backtrace.join("\n")
28
- false # disable built-in exception handling
23
+ case exception
24
+ when GLI::CustomExit
25
+ next(false)
26
+ when GLI::BadCommandLine
27
+ true # use GLI's default error handling
28
+ else
29
+ $app.fatal "catchall exception handler:"
30
+ $app.fatal exception.class
31
+ $app.fatal exception.message
32
+ $app.fatal exception.backtrace.join("\n")
33
+ false # disable built-in exception handling
34
+ end
29
35
  end
30
36
 
31
37
  program_desc 'ops is an operation runner'
@@ -61,12 +61,14 @@ module OpsWalrus
61
61
  def parse(script_string)
62
62
  file_halves = script_string.split(/^\.\.\.$/, 2)
63
63
  case file_halves.count
64
+ when 0
65
+ yaml, ruby_script = "", ""
64
66
  when 1
65
67
  yaml, ruby_script = "", file_halves.first
66
68
  when 2
67
69
  yaml, ruby_script = *file_halves
68
70
  else
69
- raise Error, "Unexpected number of file sections: #{file_halves.inspect}"
71
+ raise Error, "Unexpected number of file sections in #{@ops_file_path}: #{file_halves.inspect}"
70
72
  end
71
73
  [yaml, ruby_script]
72
74
  end
@@ -111,7 +111,7 @@ module OpsWalrus
111
111
  end # runtime_env.handle_input
112
112
  end # SSHKit::Coordinator
113
113
  results
114
- end # def ssh
114
+ end # def ssh_noprep
115
115
 
116
116
  # we run the block in the context of the host proxy object, s.t. `self` within the block evaluates to the host proxy object
117
117
  def ssh(*args, **kwargs, &block)
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.73"
2
+ VERSION = "1.0.75"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opswalrus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.73
4
+ version: 1.0.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ellis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-28 00:00:00.000000000 Z
11
+ date: 2023-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport