sparkle_formation 1.1.10 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/helper-methods.md +25 -0
- data/lib/sparkle_formation/sparkle_attribute.rb +15 -0
- data/lib/sparkle_formation/sparkle_struct.rb +9 -0
- data/lib/sparkle_formation/translation.rb +1 -1
- data/lib/sparkle_formation/version.rb +1 -1
- data/sparkle_formation.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 834c8c3a8e7fce26c9dc7ab423e1aaf3824f4c0b
|
4
|
+
data.tar.gz: ac2dc9b8d0d03d3df50b58f78ea67e4993dba391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c33d9b0a56e7e67833a0e69503d89adb441770d4d88cd36206ff3c8a7696d9d72187f53a22d6bb87fb67d84e1d05be3675e182d12ca2a62cec413cf51fd0700
|
7
|
+
data.tar.gz: 7b928c6d9b629c684272d97305f0c76100d26095acd896b20d1eed8f64ef344a0689214d64248f968ee52dd2a676b52e9a44e765da1247a21e4bf4c2075c63b0
|
data/CHANGELOG.md
CHANGED
data/docs/helper-methods.md
CHANGED
@@ -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
|
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=[])
|
data/sparkle_formation.gemspec
CHANGED
@@ -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.
|
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
|
+
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:
|