terrafying 1.3.4 → 1.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 79b501b5f9ac84fab8591bdacd4cc5c30e4810b5
4
- data.tar.gz: dbbac5466269c2e01a853c3d92c7e09d05378d43
2
+ SHA256:
3
+ metadata.gz: 24ff5d9ad8706ca0fa7e0fcb41821865b52c80f8ebba9e802e1f23ff482d0517
4
+ data.tar.gz: f282ff3239e54345fbc2d8cd8411012640ce667af72d8f195ed887cd9857246d
5
5
  SHA512:
6
- metadata.gz: 4b00037a9778771192addfab9afd6655ad777c3f12006290ea292a393ba3f7f37db58b023da6550345973b2a18ba57a673e1b6f1ffc8e0cce44863e17af0c0ac
7
- data.tar.gz: 68e0a28098c4e66369a8ef491ecd44cbe82413b3ff98364335d939240a77a01e6e285d4248d50e955c4b7a23925783616a605509cc48162da2f949c2f3f01008
6
+ metadata.gz: e03693b433dbf2e27d51da3771586491cde473fefa2547b5b9f2eb140884354dca9ae3998fd74a0a5d0654e3c441071b5ea0b432c7965ede64a277f154ed4180
7
+ data.tar.gz: e1dceef2f2eefea2eb74c0d2e35c0d4fa787df273360d70acbf0dfa77e5c9470d321765e15dde599f2302037da0150a9dde4fd3f1265a21d36adb7085100f9d4
@@ -129,17 +129,20 @@ module Terrafying
129
129
  end
130
130
 
131
131
  private
132
- def targets(options)
133
- @options[:target].split(",").map {|target| "-target=#{target}"}.join(" ")
132
+ def lock_timeout
133
+ "-lock-timeout=#{@options[:lock_timeout]}" if @options[:lock_timeout]
134
134
  end
135
135
 
136
- def exec_with_optional_target(command)
137
- cmd = if @options[:target]
138
- "terraform #{command} #{targets(@options)}"
139
- else
140
- "terraform #{command}"
141
- end
142
- stream_command(cmd)
136
+ def targets
137
+ @options[:target].split(',').map { |target| "-target=#{target}" }.join(' ') if @options[:target]
138
+ end
139
+
140
+ def exec_with_optional_target(command, *args)
141
+ exec_with_args(command, targets, lock_timeout, *args)
142
+ end
143
+
144
+ def exec_with_args(command, *args)
145
+ stream_command("terraform #{command} #{args.join(' ')}")
143
146
  end
144
147
 
145
148
  def with_config(&block)
@@ -2,6 +2,7 @@ require 'thor'
2
2
 
3
3
  module Terrafying
4
4
  class Cli < Thor
5
+ class_option :lock_timeout, :type => :string, :default => nil
5
6
  class_option :no_lock, :type => :boolean, :default => false
6
7
  class_option :keep, :type => :boolean, :default => false
7
8
  class_option :target, :type => :string, :default => nil
@@ -1,4 +1,4 @@
1
1
  module Terrafying
2
- VERSION = "1.3.4" # will be inserted by Drone
2
+ VERSION = "1.3.5" # will be inserted by Drone
3
3
  CLI_VERSION = "0.11.3"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrafying
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - uSwitch Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.4.5
181
+ rubygems_version: 2.7.6
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: No.