sparkle_formation 1.1.10 → 1.1.12

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
2
  SHA1:
3
- metadata.gz: ef4f6f158ed4355b25821d57ad5a5ce55a2ca02b
4
- data.tar.gz: e8e8bf70d1aa0e00f4cd0a8276f4e56f710dc85c
3
+ metadata.gz: 834c8c3a8e7fce26c9dc7ab423e1aaf3824f4c0b
4
+ data.tar.gz: ac2dc9b8d0d03d3df50b58f78ea67e4993dba391
5
5
  SHA512:
6
- metadata.gz: c6a6fb065872b62d1e3cb5706f243ad96ca28b5c4d5ccc123fa25dd8c86f95e45cfd04774d07e061e477a418ec43f17fd969a2ab5f56f33ab1eaef4a16aab95e
7
- data.tar.gz: cf1fbb2ca90637d667720139d2c13aad6ff1fe38eb2f84d23a529a70eb044db967e2a7936f6102dacd8780697b32acc5a7b3cb26153697379b751649d2c94440
6
+ metadata.gz: 1c33d9b0a56e7e67833a0e69503d89adb441770d4d88cd36206ff3c8a7696d9d72187f53a22d6bb87fb67d84e1d05be3675e182d12ca2a62cec413cf51fd0700
7
+ data.tar.gz: 7b928c6d9b629c684272d97305f0c76100d26095acd896b20d1eed8f64ef344a0689214d64248f968ee52dd2a676b52e9a44e765da1247a21e4bf4c2075c63b0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.1.12
2
+ * New helper methods added `raise!` and `puts!` (#109)
3
+ * Fix for registry usage within components (#115)
4
+
1
5
  ## v1.1.10
2
6
  * Join nesting arguments to template name. Allow optional replace.
3
7
 
@@ -11,6 +11,10 @@ anchors:
11
11
  url: "#nests"
12
12
  - title: "Local System Call"
13
13
  url: "#local-system-call"
14
+ - title: "Output to STDOUT"
15
+ url: "#output-to-stdout"
16
+ - title: "Raise Exceptions"
17
+ url: "#raise-exceptions"
14
18
  - title: "AWS Helpers"
15
19
  url: "#aws-helpers"
16
20
  ---
@@ -96,6 +100,27 @@ SparkleFormation.new(:test) do
96
100
  end
97
101
  ~~~
98
102
 
103
+ ##### Output to STDOUT
104
+
105
+ Use the `puts!` helper method to print content to the console:
106
+
107
+ ~~~ruby
108
+ SparkleFormation.new(:test) do
109
+ puts! 'Hi everybody!'
110
+ ...
111
+ end
112
+ ~~~
113
+
114
+ ##### Raise Exceptions
115
+
116
+ Use the `raise!` helper method to raise exceptions:
117
+
118
+ ~~~ruby
119
+ SparkleFormation.new(:test) do
120
+ raise! 'ERROR'
121
+ end
122
+ ~~~
123
+
99
124
  ### Generation Helpers
100
125
 
101
126
  #### AWS Helpers
@@ -285,6 +285,21 @@ class SparkleFormation
285
285
  end
286
286
  alias_method :system!, :_system
287
287
 
288
+ # Print to stdout
289
+ #
290
+ # @param args
291
+ # @return [NilClass]
292
+ def _puts(*args)
293
+ $stdout.puts(*args)
294
+ end
295
+ alias_method :puts!, :_puts
296
+
297
+ # Raise an exception
298
+ def _raise(*args)
299
+ ::Kernel.raise(*args)
300
+ end
301
+ alias_method :raise!, :_raise
302
+
288
303
  # @return [TrueClass, FalseClass] resource can be tagged
289
304
  def taggable?
290
305
  if(defined?(SfnAws))
@@ -44,6 +44,15 @@ class SparkleFormation
44
44
  ::SparkleFormation::SparkleStruct
45
45
  end
46
46
 
47
+ # Instantiation override properly set origin template
48
+ #
49
+ # @return [SparkleStruct]
50
+ def _klass_new(*args, &block)
51
+ inst = super
52
+ inst._set_self(_self)
53
+ inst
54
+ end
55
+
47
56
  # Override the state to force helpful error when no value has been
48
57
  # provided
49
58
  #
@@ -253,7 +253,7 @@ class SparkleFormation
253
253
  # @param hash [Hash]
254
254
  # @param names [Array<Symbol>] enable renaming (:ref, :fn)
255
255
  # @return [Hash]
256
- # @note remapping references two constants:
256
+ # @note remapping references to constants:
257
257
  # REF_MAPPING for Ref maps
258
258
  # FN_MAPPING for Fn maps
259
259
  def apply_rename(hash, names=[])
@@ -1,4 +1,4 @@
1
1
  class SparkleFormation
2
2
  # Current library version
3
- VERSION = Gem::Version.new('1.1.10')
3
+ VERSION = Gem::Version.new('1.1.12')
4
4
  end
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.add_dependency 'multi_json'
15
15
  s.add_dependency 'bogo'
16
16
  s.add_development_dependency 'minitest'
17
+ s.add_development_dependency 'rake'
17
18
  s.executables << 'generate_sparkle_docs'
18
19
  s.files = Dir['{lib,docs}/**/*'] + %w(sparkle_formation.gemspec README.md CHANGELOG.md LICENSE)
19
20
  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: 1.1.10
4
+ version: 1.1.12
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-11-24 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attribute_struct
@@ -72,6 +72,20 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rake
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
75
89
  description: Ruby DSL for programmatic orchestration API template generation
76
90
  email: chrisroberts.code@gmail.com
77
91
  executables: