sfn 1.1.0 → 1.1.2

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
  SHA1:
3
- metadata.gz: 4b1f3461b27bf1c87ba2df3efdab30924e49c223
4
- data.tar.gz: cfa6e7d5956057c6057829cbe4b14c34556c45e8
3
+ metadata.gz: 57c0b106d6e595a6ccae1b8242e1b57dbf1418db
4
+ data.tar.gz: b5aaa5b140fc279e39edcaa83bfd3a004e3b3208
5
5
  SHA512:
6
- metadata.gz: 46e00694b00f305fcce7e91611150fd7c4238386d72f91faca0c94d3e69825087b06b25aa174e6a7e23433bbe20882e86135bbcd8e7e252392875616fdd4b18b
7
- data.tar.gz: fd89743647dd0fcd317e9141d9b63e65b9d6e4c29488be71f6c87edf622e46f4d6c762dc56081c963178b18fa5566240f6b11f6efb086bec4e8c70fcd1146dfb
6
+ metadata.gz: 8d8e5a5bd254e7112df68538b644663b678797ca64dc78f971b252ae42fb7599a0207050d45f97ee333a18dd739e0ead80e58bd466b6f7794d7793826417acc7
7
+ data.tar.gz: 63983740fed1f8fb70317410da8a1e844181de88115f2c745ce8be1091636ec8310ca44099125fe8af52cf4d7339706e7b46d37b5a65ca5d9efa5caaa5f15ffd
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.1.2
2
+ * [fix] stack update when extracting compile time state
3
+ * [fix] remove use of `root_path` method when shallow nesting is in use
4
+
1
5
  ## v1.1.0
2
6
  * Add support for compile time parameters
3
7
  * Fix valid stack type check on child stack connections
data/lib/sfn/cache.rb CHANGED
@@ -265,7 +265,7 @@ module Sfn
265
265
  yield
266
266
  end
267
267
  rescue => e
268
- if(e.class.to_s == 'Redis::Lock::LockTimeout')
268
+ if(e.class.to_s.end_with?('Timeout'))
269
269
  raise if raise_on_locked
270
270
  else
271
271
  raise
@@ -285,6 +285,9 @@ module Sfn
285
285
  # Simple lock for memory cache
286
286
  class LocalLock
287
287
 
288
+ class LocalLockTimeout < RuntimeError
289
+ end
290
+
288
291
  # @return [Symbol] key name
289
292
  attr_reader :_key
290
293
  # @return [Numeric] timeout
@@ -320,7 +323,11 @@ module Sfn
320
323
  _lock.unlock if _lock.locked?
321
324
  end
322
325
  else
323
- raise Redis::Lock::LockTimeout.new "Timeout on lock #{_key} exceeded #{_timeout} sec"
326
+ if(defined?(Redis))
327
+ raise Redis::Lock::LockTimeout.new "Timeout on lock #{_key} exceeded #{_timeout} sec"
328
+ else
329
+ raise LocalLockTimeout.new "Timeout on lock #{_key} exceeded #{_timeout} sec"
330
+ end
324
331
  end
325
332
  end
326
333
 
@@ -35,7 +35,7 @@ module Sfn
35
35
  c_current = config[:compile_parameters].fetch(s_name.join('_'), Smash.new)
36
36
  config[:compile_parameters][s_name.join('_')] = compile_params.merge(c_current)
37
37
  end
38
- stack.nested_stacks(false).each do |n_stack|
38
+ c_stack.nested_stacks(false).each do |n_stack|
39
39
  s_name.push(n_stack.name)
40
40
  c_setter.call(n_stack)
41
41
  s_name.pop
@@ -123,7 +123,11 @@ module Sfn
123
123
  stack_parameters = sparkle.fetch('Parameters', Smash.new)
124
124
  end
125
125
  unless(stack_parameters.empty?)
126
- ui.info "#{ui.color('Stack runtime parameters:', :bold)} - template: #{ui.color(sparkle.root_path.map(&:name).map(&:to_s).join(' > '), :green, :bold)}"
126
+ if(sparkle.is_a?(SparkleFormation))
127
+ ui.info "#{ui.color('Stack runtime parameters:', :bold)} - template: #{ui.color(sparkle.root_path.map(&:name).map(&:to_s).join(' > '), :green, :bold)}"
128
+ else
129
+ ui.info ui.color('Stack runtime parameters:', :bold)
130
+ end
127
131
  if(config.get(:parameter).is_a?(Array))
128
132
  config[:parameter] = Smash[
129
133
  *config.get(:parameter).map(&:to_a).flatten
data/lib/sfn/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Sfn
2
2
  # Current library version
3
- VERSION = Gem::Version.new('1.1.0')
3
+ VERSION = Gem::Version.new('1.1.2')
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sfn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bogo-cli