lono 4.2.1 → 4.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/lib/lono/version.rb +1 -1
  4. data/lono.gemspec +5 -3
  5. metadata +3 -79
  6. data/spec/fixtures/cfn.json +0 -369
  7. data/spec/fixtures/cfn/stack-events-complete.json +0 -1080
  8. data/spec/fixtures/cfn/stack-events-in-progress.json +0 -1080
  9. data/spec/fixtures/cfn/stack-events-update-rollback-complete.json +0 -1086
  10. data/spec/fixtures/lono_project/.gitignore +0 -1
  11. data/spec/fixtures/lono_project/Gemfile +0 -3
  12. data/spec/fixtures/lono_project/Guardfile +0 -12
  13. data/spec/fixtures/lono_project/app/definitions/base.rb +0 -10
  14. data/spec/fixtures/lono_project/app/definitions/base/more.rb +0 -7
  15. data/spec/fixtures/lono_project/app/definitions/development.rb +0 -1
  16. data/spec/fixtures/lono_project/app/definitions/production.rb +0 -1
  17. data/spec/fixtures/lono_project/app/helpers/custom_helper.rb +0 -5
  18. data/spec/fixtures/lono_project/app/partials/security_group.yml +0 -10
  19. data/spec/fixtures/lono_project/app/partials/user_data/bootstrap.sh +0 -11
  20. data/spec/fixtures/lono_project/app/templates/example.yml +0 -50
  21. data/spec/fixtures/lono_project/config/params/base/example.txt +0 -3
  22. data/spec/fixtures/lono_project/config/params/development/example.txt +0 -1
  23. data/spec/fixtures/lono_project/config/params/production/example.txt +0 -1
  24. data/spec/fixtures/lono_project/config/settings.yml +0 -31
  25. data/spec/fixtures/lono_project/config/variables/base.rb +0 -3
  26. data/spec/fixtures/lono_project/config/variables/development.rb +0 -1
  27. data/spec/fixtures/lono_project/config/variables/production.rb +0 -1
  28. data/spec/fixtures/params/baseonly/params/base/network.txt +0 -1
  29. data/spec/fixtures/params/envonly/params/development/network.txt +0 -1
  30. data/spec/fixtures/params/overlay/params/base/network.txt +0 -1
  31. data/spec/fixtures/params/overlay/params/development/network.txt +0 -1
  32. data/spec/fixtures/raw_templates/aws-waf-security-automations.template +0 -1575
  33. data/spec/lib/lono/cfn/status_spec.rb +0 -77
  34. data/spec/lib/lono/cfn_spec.rb +0 -38
  35. data/spec/lib/lono/cli_spec.rb +0 -44
  36. data/spec/lib/lono/completion_spec.rb +0 -17
  37. data/spec/lib/lono/inspect_spec.rb +0 -11
  38. data/spec/lib/lono/param/generator_spec.rb +0 -56
  39. data/spec/lib/lono/param_spec.rb +0 -13
  40. data/spec/lib/lono/setting_spec.rb +0 -47
  41. data/spec/lib/lono/template/dsl_spec.rb +0 -59
  42. data/spec/lib/lono/template_spec.rb +0 -21
  43. data/spec/spec_helper.rb +0 -62
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2eb24011faa90b0f517e0479e85ff3512c620909ca4367689a8ff1f8935bb728
4
- data.tar.gz: d53f7e9b7ff7731f07f0c24e8b86122880a3f406acd5243c0a8d22b6378990ec
3
+ metadata.gz: d40e14df3f46aff527692d6c702b59d8825ec7ed183d53dfc4a0083766d8a6a7
4
+ data.tar.gz: b99aac84e55dbbdbb4ba3be8a554573a8d2d2224c7a75a23820ccedadc660ecb
5
5
  SHA512:
6
- metadata.gz: aa752099e7861248cde849d88654ffe35fcd2dc14d711f17a1014bf54039d61ea9de4e375ea14ca8b184c290fcde733420439eb70527402bfe52c406cd0e5176
7
- data.tar.gz: 95f96569e1c3ea60579f476c095fdbe447d93b504e7f0d9d489eb51bc2e585306d9c7b51dbb6b20b0b04038caca7101f8228efd9473d9706542cf75cb29b648c
6
+ metadata.gz: f17f7fc32304644ea9afdcb3de0010b05cd50f6bf38a9f2d7bb64bd3d7b5e32465defa75b0b16600099856255d4d5829a75c23a8635c7f6b6f260bdb6928dbf3
7
+ data.tar.gz: cfff9c588b3e2989c812c7ca26929aace499fbc7626554b74af99bf4361b705fdb5d3d574dc9dca4a2c4dbf8ed59963ecf1f4402807b864a6d4d4b743d6efb13
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [4.2.2]
7
+ - add vendor files to gem package
8
+
6
9
  ## [4.2.1]
7
10
  - update docs
8
11
  - fix status tailing check for nested stacks
@@ -1,3 +1,3 @@
1
1
  module Lono
2
- VERSION = "4.2.1"
2
+ VERSION = "4.2.2"
3
3
  end
@@ -7,9 +7,11 @@ Gem::Specification.new do |gem|
7
7
  gem.summary = %q{Lono is a CloudFormation Template ruby generator. Lono generates CloudFormation templates based on ERB templates.}
8
8
  gem.homepage = "http://github.com/tongueroo/lono"
9
9
 
10
- files = `git ls-files`.split($\) + Dir.glob("vendor/**/*")
11
- files = files.reject { |p| p =~ /^docs/ }
12
- gem.files = files
10
+ vendor_files = Dir.glob("vendor/**/*")
11
+ gem_files = `git ls-files -z`.split("\x0").reject do |f|
12
+ f.match(%r{^(test|spec|features|docs)/})
13
+ end
14
+ gem.files = gem_files + vendor_files
13
15
  gem.bindir = "exe"
14
16
  gem.executables = gem.files.grep(%r{^exe/}).map{ |f| File.basename(f) }
15
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features|docs)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lono
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-18 00:00:00.000000000 Z
11
+ date: 2018-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -439,44 +439,6 @@ files:
439
439
  - lib/starter_projects/skeleton/config/settings.yml
440
440
  - lib/starter_projects/skeleton/welcome.txt
441
441
  - lono.gemspec
442
- - spec/fixtures/cfn.json
443
- - spec/fixtures/cfn/stack-events-complete.json
444
- - spec/fixtures/cfn/stack-events-in-progress.json
445
- - spec/fixtures/cfn/stack-events-update-rollback-complete.json
446
- - spec/fixtures/lono_project/.gitignore
447
- - spec/fixtures/lono_project/Gemfile
448
- - spec/fixtures/lono_project/Guardfile
449
- - spec/fixtures/lono_project/app/definitions/base.rb
450
- - spec/fixtures/lono_project/app/definitions/base/more.rb
451
- - spec/fixtures/lono_project/app/definitions/development.rb
452
- - spec/fixtures/lono_project/app/definitions/production.rb
453
- - spec/fixtures/lono_project/app/helpers/custom_helper.rb
454
- - spec/fixtures/lono_project/app/partials/security_group.yml
455
- - spec/fixtures/lono_project/app/partials/user_data/bootstrap.sh
456
- - spec/fixtures/lono_project/app/templates/example.yml
457
- - spec/fixtures/lono_project/config/params/base/example.txt
458
- - spec/fixtures/lono_project/config/params/development/example.txt
459
- - spec/fixtures/lono_project/config/params/production/example.txt
460
- - spec/fixtures/lono_project/config/settings.yml
461
- - spec/fixtures/lono_project/config/variables/base.rb
462
- - spec/fixtures/lono_project/config/variables/development.rb
463
- - spec/fixtures/lono_project/config/variables/production.rb
464
- - spec/fixtures/params/baseonly/params/base/network.txt
465
- - spec/fixtures/params/envonly/params/development/network.txt
466
- - spec/fixtures/params/overlay/params/base/network.txt
467
- - spec/fixtures/params/overlay/params/development/network.txt
468
- - spec/fixtures/raw_templates/aws-waf-security-automations.template
469
- - spec/lib/lono/cfn/status_spec.rb
470
- - spec/lib/lono/cfn_spec.rb
471
- - spec/lib/lono/cli_spec.rb
472
- - spec/lib/lono/completion_spec.rb
473
- - spec/lib/lono/inspect_spec.rb
474
- - spec/lib/lono/param/generator_spec.rb
475
- - spec/lib/lono/param_spec.rb
476
- - spec/lib/lono/setting_spec.rb
477
- - spec/lib/lono/template/dsl_spec.rb
478
- - spec/lib/lono/template_spec.rb
479
- - spec/spec_helper.rb
480
442
  homepage: http://github.com/tongueroo/lono
481
443
  licenses:
482
444
  - MIT
@@ -502,42 +464,4 @@ signing_key:
502
464
  specification_version: 4
503
465
  summary: Lono is a CloudFormation Template ruby generator. Lono generates CloudFormation
504
466
  templates based on ERB templates.
505
- test_files:
506
- - spec/fixtures/cfn.json
507
- - spec/fixtures/cfn/stack-events-complete.json
508
- - spec/fixtures/cfn/stack-events-in-progress.json
509
- - spec/fixtures/cfn/stack-events-update-rollback-complete.json
510
- - spec/fixtures/lono_project/.gitignore
511
- - spec/fixtures/lono_project/Gemfile
512
- - spec/fixtures/lono_project/Guardfile
513
- - spec/fixtures/lono_project/app/definitions/base.rb
514
- - spec/fixtures/lono_project/app/definitions/base/more.rb
515
- - spec/fixtures/lono_project/app/definitions/development.rb
516
- - spec/fixtures/lono_project/app/definitions/production.rb
517
- - spec/fixtures/lono_project/app/helpers/custom_helper.rb
518
- - spec/fixtures/lono_project/app/partials/security_group.yml
519
- - spec/fixtures/lono_project/app/partials/user_data/bootstrap.sh
520
- - spec/fixtures/lono_project/app/templates/example.yml
521
- - spec/fixtures/lono_project/config/params/base/example.txt
522
- - spec/fixtures/lono_project/config/params/development/example.txt
523
- - spec/fixtures/lono_project/config/params/production/example.txt
524
- - spec/fixtures/lono_project/config/settings.yml
525
- - spec/fixtures/lono_project/config/variables/base.rb
526
- - spec/fixtures/lono_project/config/variables/development.rb
527
- - spec/fixtures/lono_project/config/variables/production.rb
528
- - spec/fixtures/params/baseonly/params/base/network.txt
529
- - spec/fixtures/params/envonly/params/development/network.txt
530
- - spec/fixtures/params/overlay/params/base/network.txt
531
- - spec/fixtures/params/overlay/params/development/network.txt
532
- - spec/fixtures/raw_templates/aws-waf-security-automations.template
533
- - spec/lib/lono/cfn/status_spec.rb
534
- - spec/lib/lono/cfn_spec.rb
535
- - spec/lib/lono/cli_spec.rb
536
- - spec/lib/lono/completion_spec.rb
537
- - spec/lib/lono/inspect_spec.rb
538
- - spec/lib/lono/param/generator_spec.rb
539
- - spec/lib/lono/param_spec.rb
540
- - spec/lib/lono/setting_spec.rb
541
- - spec/lib/lono/template/dsl_spec.rb
542
- - spec/lib/lono/template_spec.rb
543
- - spec/spec_helper.rb
467
+ test_files: []
@@ -1,369 +0,0 @@
1
- {
2
- "AWSTemplateFormatVersion": "2010-09-09",
3
- "Description": "Api redis",
4
- "Outputs": {
5
- "DBHostname": {
6
- "Description": "Hostname for Redis",
7
- "Value": {
8
- "Fn::Join": [
9
- "",
10
- [
11
- "",
12
- {
13
- "Fn::GetAtt": [
14
- "server",
15
- "PublicDnsName"
16
- ]
17
- }
18
- ]
19
- ]
20
- }
21
- }
22
- },
23
- "Parameters": {
24
- "Ami": {
25
- "Default": "ami-456",
26
- "Description": "deploy ami",
27
- "Type": "String"
28
- },
29
- "Application": {
30
- "Default": "api",
31
- "Description": "foo, bar, etc",
32
- "Type": "String"
33
- },
34
- "Environment": {
35
- "Default": "prod",
36
- "Description": "stag, prod etc",
37
- "Type": "String"
38
- },
39
- "InstanceType": {
40
- "AllowedValues": [
41
- "t1.micro",
42
- "m1.small",
43
- "m1.medium",
44
- "m1.large",
45
- "m1.xlarge",
46
- "m2.xlarge",
47
- "m2.2xlarge",
48
- "m2.4xlarge",
49
- "c1.medium",
50
- "c1.xlarge",
51
- "cc1.4xlarge",
52
- "cc2.8xlarge",
53
- "cg1.4xlarge"
54
- ],
55
- "ConstraintDescription": "must be a valid EC2 instance type.",
56
- "Default": "m1.small",
57
- "Description": "server EC2 instance type",
58
- "Type": "String"
59
- },
60
- "KeyName": {
61
- "AllowedPattern": "[-_ a-zA-Z0-9]*",
62
- "ConstraintDescription": "can contain only alphanumeric characters, spaces, dashes and underscores.",
63
- "Default": "default",
64
- "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
65
- "MaxLength": "64",
66
- "MinLength": "1",
67
- "Type": "String"
68
- },
69
- "Role": {
70
- "Default": "redis",
71
- "Description": "redis, psql, app, etc",
72
- "Type": "String"
73
- },
74
- "StackNumber": {
75
- "Default": "",
76
- "Description": "s1, s2, s3, etc",
77
- "Type": "String"
78
- },
79
- "VolumeSize": {
80
- "ConstraintDescription": "must be between 5 and 1024 Gb.",
81
- "Default": "20",
82
- "Description": "Size of Volume",
83
- "MaxValue": "1024",
84
- "MinValue": "5",
85
- "Type": "Number"
86
- }
87
- },
88
- "Resources": {
89
- "CfnUser": {
90
- "Properties": {
91
- "Path": "/",
92
- "Policies": [
93
- {
94
- "PolicyDocument": {
95
- "Statement": [
96
- {
97
- "Action": "cloudformation:DescribeStackResource",
98
- "Effect": "Allow",
99
- "Resource": "*"
100
- }
101
- ]
102
- },
103
- "PolicyName": "root"
104
- }
105
- ]
106
- },
107
- "Type": "AWS::IAM::User"
108
- },
109
- "DataVolume": {
110
- "DeletionPolicy": "Snapshot",
111
- "Properties": {
112
- "AvailabilityZone": {
113
- "Fn::GetAtt": [
114
- "server",
115
- "AvailabilityZone"
116
- ]
117
- },
118
- "Size": {
119
- "Ref": "VolumeSize"
120
- },
121
- "Tags": [
122
- {
123
- "Key": "Usage",
124
- "Value": "Data Volume"
125
- }
126
- ]
127
- },
128
- "Type": "AWS::EC2::Volume"
129
- },
130
- "HostKeys": {
131
- "Properties": {
132
- "UserName": {
133
- "Ref": "CfnUser"
134
- }
135
- },
136
- "Type": "AWS::IAM::AccessKey"
137
- },
138
- "HostRecord": {
139
- "Properties": {
140
- "Comment": "DNS name for my stack.",
141
- "HostedZoneName": ".mydomain.net.",
142
- "Name": {
143
- "Fn::Join": [
144
- "",
145
- [
146
- {
147
- "Ref": "AWS::StackName"
148
- },
149
- ".mydomain.net."
150
- ]
151
- ]
152
- },
153
- "ResourceRecords": [
154
- {
155
- "Fn::GetAtt": [
156
- "server",
157
- "PublicDnsName"
158
- ]
159
- }
160
- ],
161
- "TTL": "60",
162
- "Type": "CNAME"
163
- },
164
- "Type": "AWS::Route53::RecordSet"
165
- },
166
- "MountPoint": {
167
- "Properties": {
168
- "Device": "/dev/sdf",
169
- "InstanceId": {
170
- "Ref": "server"
171
- },
172
- "VolumeId": {
173
- "Ref": "DataVolume"
174
- }
175
- },
176
- "Type": "AWS::EC2::VolumeAttachment"
177
- },
178
- "ServiceSecurityGroup": {
179
- "Properties": {
180
- "GroupDescription": "Enable SSH access.",
181
- "SecurityGroupIngress": [
182
- {
183
- "CidrIp": "0.0.0.0/0",
184
- "FromPort": "22",
185
- "IpProtocol": "tcp",
186
- "ToPort": "22"
187
- }
188
- ]
189
- },
190
- "Type": "AWS::EC2::SecurityGroup"
191
- },
192
- "WaitCondition": {
193
- "DependsOn": "MountPoint",
194
- "Metadata": {
195
- "Comment1": "Note that the WaitCondition is dependent on the volume mount point allowing the volume to be created and attached to the EC2 instance",
196
- "Comment2": "The instance bootstrap script waits for the volume to be attached to the instance prior to signalling completion."
197
- },
198
- "Properties": {
199
- "Handle": {
200
- "Ref": "WaitHandle"
201
- },
202
- "Timeout": "3000"
203
- },
204
- "Type": "AWS::CloudFormation::WaitCondition"
205
- },
206
- "WaitHandle": {
207
- "Type": "AWS::CloudFormation::WaitConditionHandle"
208
- },
209
- "server": {
210
- "Properties": {
211
- "AvailabilityZone": "us-east-1e",
212
- "ImageId": {
213
- "Ref": "Ami"
214
- },
215
- "InstanceType": {
216
- "Ref": "InstanceType"
217
- },
218
- "KeyName": {
219
- "Ref": "KeyName"
220
- },
221
- "SecurityGroups": [
222
- "global",
223
- {
224
- "Fn::Join": [
225
- "-",
226
- [
227
- {
228
- "Ref": "Environment"
229
- },
230
- {
231
- "Ref": "Application"
232
- }
233
- ]
234
- ]
235
- },
236
- {
237
- "Ref": "ServiceSecurityGroup"
238
- }
239
- ],
240
- "UserData": {
241
- "Fn::Base64": {
242
- "Fn::Join": [
243
- "",
244
- [
245
- "#!/bin/bash -lexv\n",
246
- "exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1\n",
247
- "\n",
248
- "FIND_IN_MAP=",
249
- {
250
- "Fn::FindInMap": [
251
- "MapName",
252
- "TopLevelKey",
253
- "SecondLevelKey"
254
- ]
255
- },
256
- "\n",
257
- "HOSTNAME_PREFIX=",
258
- {
259
- "Fn::FindInMap": [
260
- "EnvironmentMapping",
261
- "HostnamePrefix",
262
- {
263
- "Ref": "Environment"
264
- }
265
- ]
266
- },
267
- "\n",
268
- "BAR=",
269
- {
270
- "Ref": "DRINK"
271
- },
272
- " ; MORE=",
273
- {
274
- "Fn::FindInMap": [
275
- "MapName",
276
- "TopLevelKey",
277
- "SecondLevelKey"
278
- ]
279
- },
280
- "\n",
281
- "\n",
282
- "BASE64=",
283
- {
284
- "Fn::Base64": "value to encode"
285
- },
286
- "\n",
287
- "GET_ATT=",
288
- {
289
- "Fn::GetAtt": [
290
- "server",
291
- "PublicDnsName"
292
- ]
293
- },
294
- "\n",
295
- "GET_AZS=",
296
- {
297
- "Fn::GetAZs": "AWS::Region"
298
- },
299
- "\n",
300
- "JOIN=",
301
- {
302
- "Fn::Join": [
303
- ":",
304
- [
305
- "a",
306
- "b",
307
- "c"
308
- ]
309
- ]
310
- },
311
- "\n",
312
- "SELECT=",
313
- {
314
- "Fn::Select": [
315
- "1",
316
- [
317
- "a",
318
- "b",
319
- "c"
320
- ]
321
- ]
322
- },
323
- "\n",
324
- "\n",
325
- "echo ",
326
- {
327
- "Ref": "AWS::StackName"
328
- },
329
- " > /tmp/stack_name\n",
330
- "# Helper function\n",
331
- "function error_exit\n",
332
- "{\n",
333
- " /usr/local/bin/cfn-signal -e 1 -r \"$1\" '",
334
- {
335
- "Ref": "WaitHandle"
336
- },
337
- "'\n",
338
- "exit 1\n",
339
- "}\n",
340
- "# Wait for the EBS volume to show up\n",
341
- "while [ ! -e /dev/xvdf ]; do echo Waiting for EBS volume to attach; sleep 1; done\n",
342
- "/bin/mkdir /media/redis\n",
343
- "/sbin/mkfs -t ext4 /dev/xvdf\n",
344
- "echo \"/dev/xvdf /media/redis auto defaults 0 0\" >> /etc/fstab\n",
345
- "/bin/mount /media/redis\n",
346
- "/usr/bin/redis-cli shutdown\n",
347
- "sleep 10\n",
348
- "mv /var/lib/redis/* /media/redis/\n",
349
- "rm -r /var/lib/redis\n",
350
- "ln -s /media/redis /var/lib/redis\n",
351
- "chown -R redis:redis /var/lib/redis\n",
352
- "chown -R redis:redis /media/redis\n",
353
- "/usr/bin/redis-server\n",
354
- "# If all is well so signal success\n",
355
- "/usr/local/bin/cfn-signal -e $? -r \"Ready to rock\" '",
356
- {
357
- "Ref": "WaitHandle"
358
- },
359
- "'\n",
360
- "cat /proc/uptime | cut -f1 -d'.' > /tmp/time-to-boot\n"
361
- ]
362
- ]
363
- }
364
- }
365
- },
366
- "Type": "AWS::EC2::Instance"
367
- }
368
- }
369
- }