opswalrus 1.0.28 → 1.0.30

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: 0ed3ebf666e1e12461a109ace60e4429008e5016fde3c4f0605e1b1f0e8c3a01
4
- data.tar.gz: 88a949890ddb41d16d69e667e6440e4894a4d1ef369b0e4db301ce5f751c5570
3
+ metadata.gz: 312fb5f2541ced41eeec5b3b7eb1cc6774d0884dfc02487675dfe974d10504fa
4
+ data.tar.gz: 40658c9a4515ab5d5d5652e301991163136a339399c21f2acc37ea3546716e80
5
5
  SHA512:
6
- metadata.gz: 8625724d93eea350e367d57468b8c4072a3f1e4946469afba2e950305b93d564e056afd368ee5af5c44483364ed41b3aa003bedeabb6e40281c0d65c6a10f8be
7
- data.tar.gz: c75cfe115140ec4bcb09059e9f3ce96ea2b51bca4c60552221a53f4415c91b3da55ad1acef2f61fcf08cb93cfb20580390317862fa9f288f56a8787959189324
6
+ metadata.gz: a24a2a3dc3e0287c0ed1cae15284dc45943dd209c18a5c9698cd8632c3a07d5da68e3abd4af468ff79511f42eb40fd17a72e1508ebe9358a492b288a51b0faa3
7
+ data.tar.gz: b240ef837c47d9b942c3c61c88e3ffbf73db88016374c037e012e8d5c901a1e6d07774591a9d91b14080232c04dc6e4c210cf9334bb8d6adc3988de637c48573
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opswalrus (1.0.28)
4
+ opswalrus (1.0.30)
5
5
  amazing_print (~> 1.5)
6
6
  bcrypt_pbkdf (~> 1.1)
7
7
  citrus (~> 3.0)
data/build.ops CHANGED
@@ -33,6 +33,9 @@ puts "Write version.rb for version #{version}"
33
33
  core.template.write(path: "./lib/opswalrus/version.rb", template: template, variables: {version: version})
34
34
 
35
35
  sh("Build gem") { 'gem build opswalrus.gemspec' }
36
+
37
+ sh("Commit Gemfile.lock and version.rb and git push changes") { 'git commit -am "gem {{ version }}" && git push' }
38
+
36
39
  bw_status_output = sh("Check whether Bitwarden is locked or not") { 'bw status' }
37
40
  # the status command currently exhibits an error in which it emits 'mac failed.' some number of times, so we need to filter that out
38
41
  # see:
@@ -75,6 +75,13 @@ module OpsWalrus
75
75
  end
76
76
  end
77
77
 
78
+ class EnvParams < InvocationParams
79
+ # params : Hash | ArrayOrHashNavigationProxy
80
+ def initialize(hashlike_params = ENV)
81
+ super(hashlike_params)
82
+ end
83
+ end
84
+
78
85
  class OpsFileScript
79
86
 
80
87
  def self.define_for(ops_file, ruby_script)
@@ -175,9 +175,9 @@ module OpsWalrus
175
175
  def env(*keys)
176
176
  keys = keys.map(&:to_s)
177
177
  if keys.empty?
178
- @env
178
+ @runtime_env.env
179
179
  else
180
- @env.dig(*keys)
180
+ @runtime_env.env.dig(*keys)
181
181
  end
182
182
  end
183
183
 
@@ -234,9 +234,11 @@ module OpsWalrus
234
234
 
235
235
  attr_accessor :app
236
236
  attr_accessor :pty
237
+ attr_reader :env
237
238
 
238
239
  def initialize(app)
239
240
  @app = app
241
+ @env = EnvParams.new(ENV)
240
242
  @bundle_load_path = LoadPath.new(self, @app.bundle_dir)
241
243
  @app_load_path = LoadPath.new(self, @app.pwd)
242
244
 
@@ -1,3 +1,3 @@
1
1
  module OpsWalrus
2
- VERSION = "1.0.28"
2
+ VERSION = "1.0.30"
3
3
  end
@@ -63,6 +63,12 @@ module WalrusLang
63
63
  end
64
64
  end
65
65
 
66
+ class String
67
+ def render_template(hash)
68
+ WalrusLang.render(self, hash)
69
+ end
70
+ end
71
+
66
72
  class Hash
67
73
  def to_binding
68
74
  OpenStruct.new(self).instance_eval { binding }
@@ -77,7 +83,7 @@ end
77
83
 
78
84
  def mustache(&block)
79
85
  template_string = block.call
80
- template_string =~ /{{.*}}/ ? WalrusLang.render(block.call, block.binding) : template_string
86
+ template_string =~ /{{.*}}/ ? WalrusLang.render(template_string, block.binding) : template_string
81
87
  end
82
88
 
83
89
 
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.28
4
+ version: 1.0.30
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-08-25 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: amazing_print