opswalrus 1.0.64 → 1.0.65

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: '03538d35b647412c40af0d2df5aa214ea53ea1beda900abe6825096e1e102db0'
4
- data.tar.gz: b32414001a3a66a94537ad5fefaa789f24cba8e42da20d47db4c47d9f7834b1b
3
+ metadata.gz: 63fc3b8a4e8f06f774016d99a2bce30efd96ea1b855eb3a0e9e4161497d7a04a
4
+ data.tar.gz: 5da3169682554eb3d37534d1c522e1479c9e76371fb61670a96c540786df334b
5
5
  SHA512:
6
- metadata.gz: ecdbb125b8d658bf841d9ef62ed5ed10ec145a62cf7d82d5182398955df9b0d2cf8a62f2fbd64ebcf52f6974032f9f0658e55236e6e963acf29c718df75a3197
7
- data.tar.gz: c5387283ba8982f5fd6c9a3f29935ed49ea895667c3f4f2ea6db0c39f8fde5a9e2ccfdd873a55cfd2d9b8d680506da4c8f0228fe74fe1da627288f266bdeb13c
6
+ metadata.gz: ba8d018fe2ba343298a1a22b3df163a014a784381b5a6dda7ac7e5c21ec332a7941aac300429456447f6f97a8238fa0a82c439fe85fbcad63b332b57bccaf419
7
+ data.tar.gz: 80709f6efa368371241a19e33c53623b20db978da43a832e3da09477aff5f97b34953549a8d76a7ce9b945e12ed5a520057182218a0d0c91732844f17fe77934
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.64)
4
+ opswalrus (1.0.65)
5
5
  activesupport (~> 7.0)
6
6
  bcrypt_pbkdf (~> 1.1)
7
7
  binding_of_caller (~> 1.0)
data/build.ops CHANGED
@@ -8,7 +8,7 @@ imports:
8
8
 
9
9
  # when you run this script, it should do something like:
10
10
  # ~/sync/projects/ops/opswalrus on  main via 💎 v3.2.2
11
- # ❯ ../ops.sh run build.ops version:1.0.7
11
+ # ❯ ops run build.ops version:1.0.7
12
12
  # Write version.rb for version 1.0.7
13
13
  # [localhost] Build gem: gem build opswalrus.gemspec
14
14
  # [localhost] Check whether Bitwarden is locked or not: bw status
@@ -38,8 +38,10 @@ sh("Build gem") { 'gem build opswalrus.gemspec' }
38
38
 
39
39
  sh("Commit Gemfile.lock and version.rb and git push changes") { 'git commit -am "gem {{ version }}" && git push' }
40
40
 
41
- bw_status_output = sh("Check whether Bitwarden is locked or not") { 'bw status' }
42
- # the status command currently exhibits an error in which it emits 'mac failed.' some number of times, so we need to filter that out
41
+ # bw_status_output = sh("Check whether Bitwarden is locked or not") { 'bw status' }
42
+ is_unlocked = sh? "Check whether Bitwarden is locked or not",
43
+ 'rbw unlocked'
44
+ # the `bw status`` command currently exhibits an error in which it emits 'mac failed.' some number of times, so we need to filter that out
43
45
  # see:
44
46
  # - https://community.bitwarden.com/t/what-does-mac-failed-mean-exactly/29208
45
47
  # - https://github.com/bitwarden/cli/issues/88
@@ -47,14 +49,17 @@ bw_status_output = sh("Check whether Bitwarden is locked or not") { 'bw status'
47
49
  # ❯ bw status
48
50
  # mac failed.
49
51
  # {"serverUrl":"...","lastSync":"2023-08-17T19:14:09.384Z","userEmail":"...","userId":"...","status":"locked"}
50
- bw_status_output = bw_status_output.gsub('mac failed.', '').strip
51
- bw_status_json = bw_status_output.parse_json
52
+ # bw_status_output = bw_status_output.gsub('mac failed.', '').strip
53
+ # bw_status_json = bw_status_output.parse_json
52
54
 
53
- if bw_status_json['status'] != 'unlocked'
54
- exit 1, "Bitwarden is not unlocked. Please unlock bitwarden with: bw unlock"
55
- end
55
+ # if bw_status_json['status'] != 'unlocked'
56
+ # exit 1, "Bitwarden is not unlocked. Please unlock bitwarden with: bw unlock"
57
+ # end
58
+ exit 1, "Bitwarden is not unlocked. Please unlock bitwarden with: bw unlock" unless is_unlocked
56
59
 
57
- totp = sh("Get Rubygems OTP") { 'bw get totp Rubygems' }
60
+ # totp = sh("Get Rubygems OTP") { 'bw get totp Rubygems' }
61
+ totp = sh "Get Rubygems OTP",
62
+ 'rbw get -f totp Rubygems'
58
63
  sh("Push gem", input: {/You have enabled multi-factor authentication. Please enter OTP code./ => "#{totp}\n"}) { 'gem push opswalrus-{{ version }}.gem' }
59
64
  sh("Build docker image") { 'docker build -t ghcr.io/opswalrus/ops:latest -t ghcr.io/opswalrus/ops:{{ version }} -t opswalrus/ops:latest -t opswalrus/ops:{{ version }} .' }
60
65
  sh("Push docker image to ghcr.io/opswalrus/ops") { 'docker push ghcr.io/opswalrus/ops:latest' }
data/lib/opswalrus/app.rb CHANGED
@@ -255,7 +255,7 @@ module OpsWalrus
255
255
 
256
256
  ops_file = load_entry_point_ops_file(ops_file_path, tmp_bundle_root_dir)
257
257
 
258
- bundler.update if update_bundle
258
+ bundler.update(true) if update_bundle
259
259
 
260
260
  debug "Running: #{ops_file.ops_file_path}"
261
261
 
@@ -287,7 +287,7 @@ module OpsWalrus
287
287
 
288
288
  ops_file = load_entry_point_ops_file(ops_file_path, tmp_bundle_root_dir)
289
289
 
290
- bundler.update if update_bundle
290
+ bundler.update(true) if update_bundle
291
291
 
292
292
  debug "Running: #{ops_file.ops_file_path}"
293
293
 
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.64"
2
+ VERSION = "1.0.65"
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.64
4
+ version: 1.0.65
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-09-27 00:00:00.000000000 Z
11
+ date: 2023-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport