mux_tf 0.4.0 → 0.4.6

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: 00bb3571502743499452f7444772ce2eb2b83fec4ed88152f9badde93946bf0c
4
- data.tar.gz: 37310310f729f91745266f0a21dd86c0db0af95b04525b1e871746b81479b752
3
+ metadata.gz: 72095840d17350f49c8cd49b97dc28db32948d51f17c572b5addaa51e6f01d6f
4
+ data.tar.gz: 51a4a8c094983a7d0c09b4fb61ace1c23a387cd24e4f13cd7b55653ec98fbacb
5
5
  SHA512:
6
- metadata.gz: 3363c54464747c089dbdbea6f0fdffa1ba73a83bba8c5af3679206b2e8a4a8e906dc93426a596ca870219750808e4f9c1810826d11539d8aa32e1a0826c2b2db
7
- data.tar.gz: 65f7838f5431964c253b59f1d7d3564c5498a43a39deb534797ba1a20ecd3731940956572aa1354171f84d8ccf2eef992c8e59e7b898a85bd55eccdf324e6a21
6
+ metadata.gz: 7855009e15efa1a70256b9afc2cfa64452feff27a95aad28e2eb6171a70ad69ceee864b92d4e1cd41ee5cc296e68739c6d64fa86c599c8dde996bed4aef44a08
7
+ data.tar.gz: 6a27ffa3d8305525f5e1f7861f448253a3f81d1e5b4c5af82f255abc2232a476e91cd589f747c9a5e8858a9ec880bcf8c4d2911265e81228337fe10f4514a46a
@@ -12,6 +12,7 @@ require "open3"
12
12
  require "piotrb_cli_utils"
13
13
  require "stateful_parser"
14
14
 
15
+ require "active_support/dependencies/autoload"
15
16
  require "active_support/core_ext"
16
17
 
17
18
  require "paint"
@@ -178,7 +178,8 @@ module MuxTf
178
178
  define_cmd("apply", summary: "Apply the current plan") do |_opts, _args, _cmd|
179
179
  status = tf_apply(filename: PLAN_FILENAME)
180
180
  if status.success?
181
- throw :stop, :done
181
+ plan_status = run_plan
182
+ throw :stop, :done if plan_status == :ok
182
183
  else
183
184
  log "Apply Failed!"
184
185
  end
@@ -289,6 +290,7 @@ module MuxTf
289
290
  when :unknown
290
291
  # nothing
291
292
  end
293
+ plan_status
292
294
  end
293
295
 
294
296
  def run_upgrade
@@ -16,8 +16,10 @@ module MuxTf
16
16
  parser = StatefulParser.new(normalizer: pastel.method(:strip))
17
17
  parser.state(:info, /^Acquiring state lock/)
18
18
  parser.state(:error, /Error locking state/, %i[none blank info])
19
+ parser.state(:refreshing, /^.+: Refreshing state... \[id=/, %i[none])
19
20
  parser.state(:refreshing, /Refreshing Terraform state in-memory prior to plan.../, %i[none blank info])
20
21
  parser.state(:refresh_done, /^----------+$/, [:refreshing])
22
+ parser.state(:refresh_done, /^$/, [:refreshing])
21
23
  parser.state(:plan_info, /Terraform will perform the following actions:/, [:refresh_done])
22
24
  parser.state(:plan_summary, /^Plan:/, [:plan_info])
23
25
 
@@ -75,7 +77,7 @@ module MuxTf
75
77
  when :plan_summary
76
78
  log line, depth: 2
77
79
  else
78
- p [state, line]
80
+ p [state, pastel.strip(line)]
79
81
  end
80
82
  end
81
83
  }
@@ -3,6 +3,8 @@
3
3
  module MuxTf
4
4
  class PlanSummaryHandler
5
5
  extend TerraformHelpers
6
+ include TerraformHelpers
7
+ include PiotrbCliUtils::Util
6
8
 
7
9
  def self.from_file(file)
8
10
  data = data_from_file(file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuxTf
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.6"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mux_tf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Banasik
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email:
127
127
  - piotr@jane.app
128
128
  executables:
@@ -155,7 +155,7 @@ licenses:
155
155
  metadata:
156
156
  homepage_uri: https://github.com/piotrb/mux_tf
157
157
  source_code_uri: https://github.com/piotrb/mux_tf
158
- post_install_message:
158
+ post_install_message:
159
159
  rdoc_options: []
160
160
  require_paths:
161
161
  - lib
@@ -170,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
- rubygems_version: 3.1.3
174
- signing_key:
173
+ rubygems_version: 3.0.3
174
+ signing_key:
175
175
  specification_version: 4
176
176
  summary: Terraform Multiplexing Scripts
177
177
  test_files: []