rubycfn 0.1.5 → 0.1.6

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: f8bbfd96b52e5c94ad29c4e89bf7ed14d750fead
4
- data.tar.gz: a7c90de723006295102a0d6bd755c1ffb60c4885
3
+ metadata.gz: 9fe3ee2069e907977b8b170664d94fbc98c5f623
4
+ data.tar.gz: a662a1aa55c0fc18c22dc43ac8dab07e306a9a5c
5
5
  SHA512:
6
- metadata.gz: 0eee75a312c81532c472a584f2cb6f25f44311f1a483ffa4e84ad466bbea90d0ac06eb89a0489b736d270b4c7faafd7014d96466e4a7dcb68c1ef4ebf6bb9df9
7
- data.tar.gz: 4443807ba18bc1a96abc4fcac72c683f617de62de29a700cf740b970d9e1ef9855493ac60f0a56f21614a2ea521da275cd7a40d1f866f6e925c2809136d4b8d6
6
+ metadata.gz: 41bb9c6dbe8818ac85427f94f8e64a8ce72178baf59bfb1f076629be4ac17d1c774ff7785edc6c83cce42a59830c9f7e59fb69f88faee6f8c629404c00df9eee
7
+ data.tar.gz: 8ff7a3c7d25a7fb5fbcf0c6a4f20b021c317c4ee5346c75426926adde33d92f3fcceeb05b31d18a5619f7c8b75764da3310de3d301817b3c6a4e676b377dda28
data/CHANGELOG.md CHANGED
@@ -2,7 +2,15 @@
2
2
  All notable changes to Rubycfn will be documented in this file.
3
3
  This project uses [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## 0.1.5 (Next Release)
5
+ ## 0.1.7 (Next Release)
6
+
7
+ ## 0.1.6
8
+ * Fixed bug where variables that were passed a `false` (boolean) value invoked super -- [@dennisvink][@dennisvink]
9
+ * Skip compacting of `false` boolean values in json output -- [@dennisvink][@dennisvink]
10
+ * Fixed layout default rendered project concern
11
+
12
+ ## 0.1.5
13
+ * Fixed bug where properties were not reset when amount was greater than 1 -- [@dennisvink][@dennisvink]
6
14
 
7
15
  ## 0.1.4
8
16
  * Made resource names overridable from within resource block with `_id` resource method. -- [@dennisvink][@dennisvink]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubycfn (0.1.5)
4
+ rubycfn (0.1.6)
5
5
  activesupport (~> 5.1.5)
6
6
  dotenv (~> 2.4.0)
7
7
  json (~> 2.1.0)
@@ -44,7 +44,7 @@ GEM
44
44
  guard-compat (~> 1.1)
45
45
  rspec (>= 2.99.0, < 4.0)
46
46
  hitimes (1.3.0)
47
- i18n (1.0.1)
47
+ i18n (1.1.0)
48
48
  concurrent-ruby (~> 1.0)
49
49
  json (2.1.0)
50
50
  launchy (2.4.3)
@@ -73,25 +73,25 @@ GEM
73
73
  rb-fsevent (0.10.3)
74
74
  rb-inotify (0.9.10)
75
75
  ffi (>= 0.5.0, < 2)
76
- rspec (3.7.0)
77
- rspec-core (~> 3.7.0)
78
- rspec-expectations (~> 3.7.0)
79
- rspec-mocks (~> 3.7.0)
80
- rspec-core (3.7.1)
81
- rspec-support (~> 3.7.0)
82
- rspec-expectations (3.7.0)
76
+ rspec (3.8.0)
77
+ rspec-core (~> 3.8.0)
78
+ rspec-expectations (~> 3.8.0)
79
+ rspec-mocks (~> 3.8.0)
80
+ rspec-core (3.8.0)
81
+ rspec-support (~> 3.8.0)
82
+ rspec-expectations (3.8.1)
83
83
  diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.7.0)
84
+ rspec-support (~> 3.8.0)
85
85
  rspec-given (3.8.0)
86
86
  given_core (= 3.8.0)
87
87
  rspec (>= 2.14.0)
88
88
  rspec-its (1.2.0)
89
89
  rspec-core (>= 3.0.0)
90
90
  rspec-expectations (>= 3.0.0)
91
- rspec-mocks (3.7.0)
91
+ rspec-mocks (3.8.0)
92
92
  diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.7.0)
94
- rspec-support (3.7.1)
93
+ rspec-support (~> 3.8.0)
94
+ rspec-support (3.8.0)
95
95
  rspec_junit_formatter (0.4.1)
96
96
  rspec-core (>= 2, < 4, != 2.12.0)
97
97
  ruby_dep (1.5.0)
@@ -106,7 +106,7 @@ GEM
106
106
  thread_safe (0.3.6)
107
107
  timers (4.1.2)
108
108
  hitimes
109
- tty-color (0.4.2)
109
+ tty-color (0.4.3)
110
110
  tty-cursor (0.5.0)
111
111
  tty-prompt (0.16.1)
112
112
  necromancer (~> 0.4.0)
@@ -118,7 +118,7 @@ GEM
118
118
  tty-cursor (~> 0.5.0)
119
119
  tty-screen (~> 0.6.4)
120
120
  wisper (~> 2.0.0)
121
- tty-screen (0.6.4)
121
+ tty-screen (0.6.5)
122
122
  tzinfo (1.2.5)
123
123
  thread_safe (~> 0.1)
124
124
  wisper (2.0.0)
data/README.md CHANGED
@@ -12,7 +12,7 @@ or, create a Gemfile with this content:
12
12
  ```
13
13
  source "https://rubygems.org"
14
14
 
15
- gem "rubycfn", "~> 0.1.5"
15
+ gem "rubycfn", "~> 0.1.6"
16
16
 
17
17
  ```
18
18
 
data/lib/compound/vpc.rb CHANGED
@@ -21,6 +21,7 @@ module RubyCfn
21
21
  default: true
22
22
  variable :instance_tenancy,
23
23
  filter: :validate_instance_tenancy
24
+
24
25
  # TODO: Move to separate compound resource
25
26
  # variable :ipv6,
26
27
  # default: false
@@ -1,4 +1,4 @@
1
1
  # Rubycfn version
2
2
  module Rubycfn
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
data/lib/rubycfn.rb CHANGED
@@ -106,6 +106,7 @@ class ::Hash
106
106
 
107
107
  def recursive_compact
108
108
  delete_if do |k, v|
109
+ next if v === false
109
110
  (v.respond_to?(:empty?) ? v.empty? : !v) or v.instance_of?(Hash) && v.recursive_compact.empty?
110
111
  end
111
112
  end
@@ -130,7 +131,9 @@ module Rubycfn
130
131
  included do
131
132
  def self.method_missing(name, *args)
132
133
  super unless TOPLEVEL_BINDING.eval("@variables[:#{name}]") || \
133
- TOPLEVEL_BINDING.eval("@global_variables[:#{name}]")
134
+ TOPLEVEL_BINDING.eval("@variables[:#{name}] === false") ||
135
+ TOPLEVEL_BINDING.eval("@global_variables[:#{name}]") ||
136
+ TOPLEVEL_BINDING.eval("@global_variables[:#{name}] === false")
134
137
  if TOPLEVEL_BINDING.eval("@variables[:#{name}]")
135
138
  TOPLEVEL_BINDING.eval("@variables[:#{name}]")
136
139
  else
@@ -158,7 +161,7 @@ module Rubycfn
158
161
  "#{name}": {
159
162
  "#{arguments[:name]}": kv_pairs
160
163
  }
161
- }
164
+ }
162
165
  TOPLEVEL_BINDING.eval("@mappings = @mappings.deep_merge(#{res})")
163
166
  end
164
167
 
@@ -7,12 +7,21 @@ module <%= name %>Stack
7
7
  #parameter :example_stack_parameter_name,
8
8
  # default: "example_value"
9
9
 
10
- # Example variable
10
+ # Example variables
11
11
  variable :example_variable,
12
12
  required: false,
13
13
  value: ENV["SOME_ENV_VAR"],
14
14
  default: "default_value"
15
15
 
16
+ variable :cidr_block,
17
+ default: "10.0.0.0/16"
18
+ variable :enable_dns_support,
19
+ default: true
20
+ variable :enable_dns_hostnames,
21
+ default: true
22
+ variable :instance_tenancy,
23
+ filter: :validate_instance_tenancy
24
+
16
25
  # Example resource, custom name
17
26
  resource :my_example_s3_bucket,
18
27
  type: "AWS::S3::Bucket" do |r|
@@ -30,14 +39,7 @@ module <%= name %>Stack
30
39
  type: RubyCfn::VPC do |r|
31
40
  r.set(:cidr_block) { "10.1.0.0/16" }
32
41
  end
33
- variable :cidr_block,
34
- default: "10.0.0.0/16"
35
- variable :enable_dns_support,
36
- default: true
37
- variable :enable_dns_hostnames,
38
- default: true
39
- variable :instance_tenancy,
40
- filter: :validate_instance_tenancy
42
+
41
43
  # Example resource, dynamically generated name
42
44
  resource :my_example_s3_bucket,
43
45
  type: "AWS::S3::Bucket"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubycfn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Vink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-08 00:00:00.000000000 Z
11
+ date: 2018-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: neatjson