sparkle_formation 3.0.38 → 3.0.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -426,6 +426,26 @@ class SparkleFormation
426
426
 
427
427
  alias_method :_tags, :_cf_tags
428
428
  alias_method :tags!, :_cf_tags
429
+
430
+ # URL suffix generator
431
+ #
432
+ # @return [Hash]
433
+ def _cf_url_suffix
434
+ _ref("AWS::URLSuffix")
435
+ end
436
+
437
+ alias_method :_url_suffix, :_cf_url_suffix
438
+ alias_method :url_suffix!, :_cf_url_suffix
439
+
440
+ # Partition generator
441
+ #
442
+ # @return [Hash]
443
+ def _cf_partition
444
+ _ref("AWS::Partition")
445
+ end
446
+
447
+ alias_method :_partition, :_cf_partition
448
+ alias_method :partition!, :_cf_partition
429
449
  end
430
450
  end
431
451
  end
@@ -362,6 +362,8 @@ class SparkleFormation
362
362
  # provide the context with actual information
363
363
  record.audit_log.list.pop
364
364
  nested_resource.properties.stack nested_template
365
+ # Force compilation to properly record audit log times
366
+ nested_template.compile
365
367
  nested_resource
366
368
  end
367
369
  end
@@ -541,8 +543,11 @@ class SparkleFormation
541
543
  # @return [Object] result of yield
542
544
  def wrapped_audit(record)
543
545
  start_log = audit_log
546
+ start_time = Time.now.to_f
544
547
  @audit_log = record ? record.audit_log : start_log
545
- yield
548
+ result = yield if block_given?
549
+ record.compile_duration = Time.now.to_f - start_time if record
550
+ result
546
551
  ensure
547
552
  @audit_log = start_log
548
553
  end
@@ -815,6 +820,7 @@ class SparkleFormation
815
820
  composition.each do |item|
816
821
  case item
817
822
  when Composition::Component
823
+ record = nil
818
824
  if item.block
819
825
  if item.key == "__base__"
820
826
  if parent.nil?
@@ -830,6 +836,7 @@ class SparkleFormation
830
836
  # at the same level.
831
837
  record.audit_log.list.replace(audit_log.list)
832
838
  record.audit_log.list.delete(record)
839
+
833
840
  audit_log.list.clear
834
841
  audit_log.list << record
835
842
  end
@@ -1,5 +1,5 @@
1
1
  # Unicorns and rainbows
2
2
  class SparkleFormation
3
3
  # Current library version
4
- VERSION = Gem::Version.new("3.0.38")
4
+ VERSION = Gem::Version.new("3.0.40")
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparkle_formation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.38
4
+ version: 3.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-27 00:00:00.000000000 Z
11
+ date: 2019-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attribute_struct
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
341
  - !ruby/object:Gem::Version
342
342
  version: '0'
343
343
  requirements: []
344
- rubygems_version: 3.0.1
344
+ rubygems_version: 3.0.3
345
345
  signing_key:
346
346
  specification_version: 4
347
347
  summary: Orchestration Template Generator