lono 7.5.2 → 8.0.0.pre.rc3

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.
Files changed (517) hide show
  1. checksums.yaml +4 -4
  2. data/.cody/README.md +5 -15
  3. data/.cody/acceptance/bin/build.sh +52 -0
  4. data/.cody/acceptance/buildspec.yml +10 -0
  5. data/.cody/acceptance/project.rb +6 -0
  6. data/.cody/{role.rb → acceptance/role.rb} +0 -0
  7. data/.cody/shared/script/install/lono.sh +40 -0
  8. data/.cody/shared/script/install.sh +5 -0
  9. data/CHANGELOG.md +46 -5
  10. data/CONTRIBUTING.md +2 -2
  11. data/Gemfile +3 -1
  12. data/LICENSE.txt +201 -1
  13. data/README.md +6 -11
  14. data/lib/lono/api/client.rb +3 -2
  15. data/lib/lono/app/callable_option/concern.rb +12 -0
  16. data/lib/lono/app/callable_option.rb +56 -0
  17. data/lib/lono/app/inits.rb +13 -0
  18. data/lib/lono/app.rb +73 -0
  19. data/lib/lono/autoloader.rb +3 -2
  20. data/lib/lono/aws_services/helper.rb +41 -6
  21. data/lib/lono/aws_services.rb +37 -6
  22. data/lib/lono/blueprint.rb +3 -11
  23. data/lib/lono/booter.rb +28 -0
  24. data/lib/lono/builder/allow/base.rb +54 -0
  25. data/lib/lono/builder/allow/env.rb +17 -0
  26. data/lib/lono/builder/allow/region.rb +20 -0
  27. data/lib/lono/builder/allow.rb +8 -0
  28. data/lib/lono/builder/configset/combiner.rb +145 -0
  29. data/lib/lono/builder/configset/definition/base.rb +47 -0
  30. data/lib/lono/builder/configset/definition/context.rb +29 -0
  31. data/lib/lono/{configset/strategy/helpers/dsl → builder/configset/definition/dsl/syntax}/auth.rb +1 -1
  32. data/lib/lono/{configset/strategy/helpers/dsl/core.rb → builder/configset/definition/dsl/syntax/content.rb} +11 -3
  33. data/lib/lono/{configset/strategy/helpers/dsl/syntax.rb → builder/configset/definition/dsl/syntax/core.rb} +15 -9
  34. data/lib/lono/{configset/strategy/helpers/dsl → builder/configset/definition/dsl/syntax}/package.rb +1 -1
  35. data/lib/lono/builder/configset/definition/dsl/syntax.rb +5 -0
  36. data/lib/lono/{configset/strategy → builder/configset/definition}/dsl.rb +10 -14
  37. data/lib/lono/{configset/strategy → builder/configset/definition}/erb.rb +13 -16
  38. data/lib/lono/builder/configset/definition.rb +18 -0
  39. data/lib/lono/builder/configset/evaluator.rb +10 -0
  40. data/lib/lono/builder/configset/registration.rb +35 -0
  41. data/lib/lono/builder/context.rb +40 -0
  42. data/lib/lono/builder/dsl/evaluator.rb +45 -0
  43. data/lib/lono/builder/dsl/finalizer/base.rb +8 -0
  44. data/lib/lono/builder/dsl/finalizer/configsets.rb +20 -0
  45. data/lib/lono/builder/dsl/finalizer/files/base.rb +4 -0
  46. data/lib/lono/builder/dsl/finalizer/files/build.rb +58 -0
  47. data/lib/lono/builder/dsl/finalizer/files/replace.rb +31 -0
  48. data/lib/lono/builder/dsl/finalizer/files.rb +9 -0
  49. data/lib/lono/{template/strategy → builder}/dsl/finalizer/parameter_groups.rb +6 -5
  50. data/lib/lono/builder/dsl/finalizer.rb +15 -0
  51. data/lib/lono/{template/strategy/dsl/builder/helpers/ec2_helper.rb → builder/dsl/helpers/ec2.rb} +3 -3
  52. data/lib/lono/builder/dsl/helpers/files.rb +7 -0
  53. data/lib/lono/builder/dsl/helpers/partials.rb +140 -0
  54. data/lib/lono/{template/strategy/dsl/builder/helpers/s3_helper.rb → builder/dsl/helpers/s3.rb} +3 -3
  55. data/lib/lono/{template/context/ssm_fetcher.rb → builder/dsl/helpers/ssm/fetcher.rb} +5 -3
  56. data/lib/lono/{template/context/helpers.rb → builder/dsl/helpers/ssm.rb} +3 -3
  57. data/lib/lono/{template/strategy/dsl/builder/helpers/stack_helper.rb → builder/dsl/helpers/stack.rb} +14 -9
  58. data/lib/lono/{template/strategy/dsl/builder/helpers/tags_helper.rb → builder/dsl/helpers/tags.rb} +2 -2
  59. data/lib/lono/builder/dsl/helpers/template_file.rb +66 -0
  60. data/lib/lono/builder/dsl/helpers.rb +5 -0
  61. data/lib/lono/builder/dsl/syntax/core/base.rb +22 -0
  62. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/condition.rb +1 -1
  63. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/mapping.rb +1 -1
  64. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/output.rb +1 -1
  65. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/parameter.rb +1 -1
  66. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource/property_mover.rb +12 -2
  67. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource.rb +1 -1
  68. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/section.rb +1 -1
  69. data/lib/lono/builder/dsl/syntax/core/squeezer.rb +38 -0
  70. data/lib/lono/{template/strategy/dsl/builder/section/methods.rb → builder/dsl/syntax/core.rb} +8 -8
  71. data/lib/lono/{template/strategy/dsl/builder → builder/dsl/syntax}/fn.rb +2 -2
  72. data/lib/lono/{template/strategy/dsl/builder → builder/dsl}/syntax/parameter_group.rb +1 -1
  73. data/lib/lono/builder/dsl/syntax.rb +9 -0
  74. data/lib/lono/builder/dsl.rb +14 -0
  75. data/lib/lono/{param/generator.rb → builder/param.rb} +24 -22
  76. data/lib/lono/builder/template/aws_service.rb +15 -0
  77. data/lib/lono/builder/template/bashify.rb +43 -0
  78. data/lib/lono/{output/template.rb → builder/template/output.rb} +14 -7
  79. data/lib/lono/{template → builder/template}/post_processor.rb +4 -4
  80. data/lib/lono/builder/template/upload.rb +8 -0
  81. data/lib/lono/builder/template.rb +55 -0
  82. data/lib/lono/{template/strategy/dsl/builder → builder/util}/stringify.rb +1 -1
  83. data/lib/lono/bundler/cli/base.rb +10 -0
  84. data/lib/lono/bundler/cli/bundle.rb +44 -0
  85. data/lib/lono/bundler/cli/clean.rb +27 -0
  86. data/lib/lono/bundler/cli/help/bundle.md +3 -0
  87. data/lib/lono/bundler/cli/help.rb +11 -0
  88. data/lib/lono/bundler/cli.rb +7 -0
  89. data/lib/lono/bundler/component/concerns/local_concern.rb +10 -0
  90. data/lib/lono/bundler/component/concerns/notation_concern.rb +59 -0
  91. data/lib/lono/bundler/component/concerns/path_concern.rb +68 -0
  92. data/lib/lono/bundler/component/concerns/stack_concern.rb +60 -0
  93. data/lib/lono/bundler/component/fetcher/base.rb +27 -0
  94. data/lib/lono/bundler/component/fetcher/gcs.rb +69 -0
  95. data/lib/lono/bundler/component/fetcher/git.rb +69 -0
  96. data/lib/lono/bundler/component/fetcher/local.rb +15 -0
  97. data/lib/lono/bundler/component/fetcher/s3.rb +66 -0
  98. data/lib/lono/bundler/component/fetcher.rb +18 -0
  99. data/lib/lono/bundler/component/http/concern.rb +45 -0
  100. data/lib/lono/bundler/component/http/source.rb +19 -0
  101. data/lib/lono/bundler/component/org_repo.rb +65 -0
  102. data/lib/lono/bundler/component/props/extension.rb +18 -0
  103. data/lib/lono/bundler/component/props/typer.rb +41 -0
  104. data/lib/lono/bundler/component/props.rb +122 -0
  105. data/lib/lono/bundler/component/registry.rb +136 -0
  106. data/lib/lono/bundler/component.rb +52 -0
  107. data/lib/lono/bundler/config.rb +18 -0
  108. data/lib/lono/bundler/dsl/syntax.rb +46 -0
  109. data/lib/lono/bundler/dsl.rb +21 -0
  110. data/lib/lono/bundler/exporter/base.rb +6 -0
  111. data/lib/lono/bundler/exporter/copy.rb +22 -0
  112. data/lib/lono/bundler/exporter.rb +50 -0
  113. data/lib/lono/bundler/extract/tar.rb +33 -0
  114. data/lib/lono/bundler/extract/zip.rb +16 -0
  115. data/lib/lono/bundler/info.rb +39 -0
  116. data/lib/lono/bundler/list.rb +26 -0
  117. data/lib/lono/bundler/lockfile/version_comparer.rb +56 -0
  118. data/lib/lono/bundler/lockfile/yamler.rb +36 -0
  119. data/lib/lono/bundler/lockfile.rb +66 -0
  120. data/lib/lono/bundler/lonofile.rb +32 -0
  121. data/lib/lono/bundler/runner.rb +27 -0
  122. data/lib/lono/bundler/syncer.rb +70 -0
  123. data/lib/lono/bundler/util/git.rb +37 -0
  124. data/lib/lono/bundler/util/logging.rb +7 -0
  125. data/lib/lono/bundler/util/sure.rb +5 -0
  126. data/lib/lono/{bundle.rb → bundler.rb} +38 -4
  127. data/lib/lono/cfn/base.rb +9 -195
  128. data/lib/lono/cfn/cancel.rb +12 -29
  129. data/lib/lono/cfn/concerns/build.rb +10 -0
  130. data/lib/lono/cfn/concerns/template_output.rb +10 -0
  131. data/lib/lono/cfn/concerns.rb +43 -0
  132. data/lib/lono/cfn/delete.rb +8 -32
  133. data/lib/lono/cfn/deploy/base.rb +4 -0
  134. data/lib/lono/cfn/deploy/iam.rb +48 -0
  135. data/lib/lono/cfn/deploy/notification.rb +8 -0
  136. data/lib/lono/cfn/deploy/operable.rb +18 -0
  137. data/lib/lono/cfn/deploy/opts.rb +49 -0
  138. data/lib/lono/cfn/deploy/rollback.rb +46 -0
  139. data/lib/lono/cfn/deploy/tags.rb +18 -0
  140. data/lib/lono/cfn/deploy.rb +100 -5
  141. data/lib/lono/cfn/download.rb +4 -7
  142. data/lib/lono/cfn/output.rb +49 -0
  143. data/lib/lono/cfn/plan/base.rb +19 -0
  144. data/lib/lono/cfn/plan/changeset/base.rb +19 -0
  145. data/lib/lono/cfn/plan/changeset/notifications.rb +24 -0
  146. data/lib/lono/cfn/plan/changeset/outputs.rb +25 -0
  147. data/lib/lono/cfn/plan/changeset/resources.rb +48 -0
  148. data/lib/lono/cfn/plan/changeset/tags.rb +16 -0
  149. data/lib/lono/cfn/plan/changeset.rb +136 -0
  150. data/lib/lono/cfn/plan/concerns.rb +10 -0
  151. data/lib/lono/cfn/plan/delete.rb +16 -0
  152. data/lib/lono/cfn/plan/diff/base.rb +10 -0
  153. data/lib/lono/cfn/plan/diff/data.rb +62 -0
  154. data/lib/lono/cfn/plan/diff/file.rb +57 -0
  155. data/lib/lono/cfn/plan/new.rb +26 -0
  156. data/lib/lono/cfn/{preview → plan}/param.rb +26 -34
  157. data/lib/lono/cfn/plan/summary.rb +16 -0
  158. data/lib/lono/cfn/plan/template.rb +28 -0
  159. data/lib/lono/cfn/plan.rb +34 -0
  160. data/lib/lono/cfn/show.rb +30 -0
  161. data/lib/lono/cfn/status.rb +1 -1
  162. data/lib/lono/cli/abstract.rb +11 -0
  163. data/lib/lono/cli/base.rb +11 -0
  164. data/lib/lono/cli/build.rb +47 -0
  165. data/lib/lono/cli/bundle.rb +21 -0
  166. data/lib/lono/cli/cfn/opts.rb +59 -0
  167. data/lib/lono/cli/cfn.rb +19 -0
  168. data/lib/lono/cli/clean.rb +23 -0
  169. data/lib/lono/cli/code.rb +22 -0
  170. data/lib/lono/{completion.rb → cli/completion.rb} +2 -2
  171. data/lib/lono/{help → cli/help}/blueprint/new.md +4 -4
  172. data/lib/lono/{help/generate.md → cli/help/build.md} +6 -6
  173. data/lib/lono/{help → cli/help}/cfn/cancel.md +0 -0
  174. data/lib/lono/cli/help/cfn/download.md +3 -0
  175. data/lib/lono/{help → cli/help}/cfn/preview.md +9 -8
  176. data/lib/lono/{help → cli/help}/cfn/status.md +0 -1
  177. data/lib/lono/cli/help/cfn.md +4 -0
  178. data/lib/lono/{help → cli/help}/code/convert.md +0 -0
  179. data/lib/lono/{help → cli/help}/code/import.md +2 -2
  180. data/lib/lono/{help → cli/help}/completion.md +3 -3
  181. data/lib/lono/{help → cli/help}/completion_script.md +0 -0
  182. data/lib/lono/{help → cli/help}/configsets.md +0 -0
  183. data/lib/lono/cli/help/down.md +13 -0
  184. data/lib/lono/cli/help/new/helper/blueprint.md +17 -0
  185. data/lib/lono/cli/help/new/helper/project.md +16 -0
  186. data/lib/lono/cli/help/new/project.md +34 -0
  187. data/lib/lono/{help → cli/help}/param/generate.md +0 -0
  188. data/lib/lono/cli/help/param.md +6 -0
  189. data/lib/lono/{help → cli/help}/pro/blueprints.md +0 -0
  190. data/lib/lono/{help → cli/help}/pro/configsets.md +0 -0
  191. data/lib/lono/{help → cli/help}/script/build.md +0 -0
  192. data/lib/lono/{help → cli/help}/script/upload.md +0 -0
  193. data/lib/lono/cli/help/seed.md +24 -0
  194. data/lib/lono/cli/help/summary.md +33 -0
  195. data/lib/lono/{help → cli/help}/template/bashify.md +0 -0
  196. data/lib/lono/cli/help/template/generate.md +7 -0
  197. data/lib/lono/{help → cli/help}/template.md +0 -0
  198. data/lib/lono/cli/help/up.md +30 -0
  199. data/lib/lono/{help → cli/help}/user_data.md +3 -3
  200. data/lib/lono/cli/help.rb +56 -0
  201. data/lib/lono/cli/list.rb +25 -0
  202. data/lib/lono/cli/new/blueprint.rb +29 -0
  203. data/lib/lono/cli/new/concerns.rb +16 -0
  204. data/lib/lono/cli/new/configset.rb +37 -0
  205. data/lib/lono/{extension/new.rb → cli/new/extension.rb} +2 -10
  206. data/lib/lono/cli/new/helper/blueprint.rb +26 -0
  207. data/lib/lono/cli/new/helper/project.rb +24 -0
  208. data/lib/lono/cli/new/helper.rb +13 -0
  209. data/lib/lono/cli/new/project.rb +77 -0
  210. data/lib/lono/cli/new/sequence.rb +56 -0
  211. data/lib/lono/cli/new/shim.rb +59 -0
  212. data/lib/lono/cli/new/test/blueprint.rb +23 -0
  213. data/lib/lono/cli/new/test/sequence.rb +10 -0
  214. data/lib/lono/cli/new/test.rb +8 -0
  215. data/lib/lono/cli/new.rb +27 -0
  216. data/lib/lono/{opts.rb → cli/opts.rb} +9 -12
  217. data/lib/lono/{s3.rb → cli/s3.rb} +9 -7
  218. data/lib/lono/cli/script/base.rb +5 -0
  219. data/lib/lono/cli/script/build.rb +72 -0
  220. data/lib/lono/cli/script/upload.rb +49 -0
  221. data/lib/lono/{script.rb → cli/script.rb} +2 -2
  222. data/lib/lono/cli/seed.rb +9 -0
  223. data/lib/lono/cli/status.rb +18 -0
  224. data/lib/lono/cli/test.rb +35 -0
  225. data/lib/lono/cli.rb +78 -109
  226. data/lib/lono/command.rb +27 -1
  227. data/lib/lono/component.rb +29 -0
  228. data/lib/lono/concerns/aws_info.rb +14 -0
  229. data/lib/lono/concerns/names.rb +9 -0
  230. data/lib/lono/configset.rb +11 -10
  231. data/lib/lono/core.rb +25 -54
  232. data/lib/lono/ext/core/module.rb +31 -0
  233. data/lib/lono/ext/core/object.rb +32 -0
  234. data/lib/lono/ext/core/string.rb +9 -0
  235. data/lib/lono/ext.rb +4 -0
  236. data/lib/lono/files/base.rb +12 -0
  237. data/lib/lono/files/builder.rb +37 -0
  238. data/lib/lono/files/compressor.rb +53 -0
  239. data/lib/lono/files/concerns/post_processing.rb +35 -0
  240. data/lib/lono/files/concerns/registration.rb +13 -0
  241. data/lib/lono/files/registry.rb +6 -0
  242. data/lib/lono/files.rb +37 -0
  243. data/lib/lono/importer/base.rb +6 -6
  244. data/lib/lono/importer/download.rb +7 -7
  245. data/lib/lono/importer/dsl.rb +3 -3
  246. data/lib/lono/importer/service/coder.rb +67 -63
  247. data/lib/lono/importer.rb +1 -10
  248. data/lib/lono/inspector/base.rb +7 -7
  249. data/lib/lono/inspector/summary.rb +18 -19
  250. data/lib/lono/layering/layer.rb +112 -0
  251. data/lib/lono/layering.rb +13 -55
  252. data/lib/lono/logger/formatter.rb +13 -0
  253. data/lib/lono/logger.rb +32 -0
  254. data/lib/lono/names.rb +50 -0
  255. data/lib/lono/plugin/meta.rb +30 -0
  256. data/lib/lono/plugin/tester.rb +13 -0
  257. data/lib/lono/plugin.rb +10 -0
  258. data/lib/lono/s3/aws_setup.rb +4 -3
  259. data/lib/lono/s3/bucket.rb +42 -42
  260. data/lib/lono/s3/rollback.rb +8 -0
  261. data/lib/lono/s3/uploader.rb +33 -34
  262. data/lib/lono/script/base.rb +3 -3
  263. data/lib/lono/script/build.rb +11 -12
  264. data/lib/lono/script/upload.rb +7 -7
  265. data/lib/lono/seeder.rb +110 -0
  266. data/lib/lono/user_data.rb +10 -13
  267. data/lib/lono/utils/logging.rb +7 -0
  268. data/lib/lono/utils/{pretty_time.rb → pretty.rb} +6 -2
  269. data/lib/lono/utils/quit.rb +7 -0
  270. data/lib/lono/utils/rsync.rb +4 -2
  271. data/lib/lono/utils/sure.rb +4 -4
  272. data/lib/lono/version.rb +1 -1
  273. data/lib/lono/yamler/validator.rb +7 -22
  274. data/lib/lono.rb +15 -12
  275. data/lib/templates/blueprint/template.rb +2 -0
  276. data/lib/templates/configset/configset.rb +2 -0
  277. data/lib/templates/examples/blueprint/template.rb +9 -0
  278. data/lib/templates/{configset/lib → examples/configset}/configset.rb +0 -0
  279. data/lib/templates/helper/%underscore_name%_helper.rb.tt +6 -0
  280. data/lib/templates/{skeleton → project}/.gitignore +1 -2
  281. data/lib/templates/project/Gemfile.tt +11 -0
  282. data/lib/templates/project/README.md +9 -0
  283. data/lib/templates/project/config/app.rb +3 -0
  284. data/lib/templates/shim/lono +7 -0
  285. data/lono.gemspec +51 -44
  286. metadata +282 -296
  287. data/.circleci/README.md +0 -3
  288. data/.circleci/config.yml +0 -58
  289. data/.cody/acceptance.sh +0 -49
  290. data/.cody/buildspec.yml +0 -9
  291. data/.cody/demo.rb +0 -38
  292. data/.cody/project.rb +0 -6
  293. data/.gitmodules +0 -3
  294. data/lib/lono/abstract_base.rb +0 -25
  295. data/lib/lono/app_file/base.rb +0 -28
  296. data/lib/lono/app_file/build/lambda_layer/ruby_packager.rb +0 -153
  297. data/lib/lono/app_file/build/lambda_layer.rb +0 -20
  298. data/lib/lono/app_file/build.rb +0 -84
  299. data/lib/lono/app_file/registry/item.rb +0 -24
  300. data/lib/lono/app_file/registry.rb +0 -16
  301. data/lib/lono/app_file/upload.rb +0 -12
  302. data/lib/lono/aws_services/stack.rb +0 -41
  303. data/lib/lono/aws_services/stack_set.rb +0 -41
  304. data/lib/lono/blueprint/configset/loader.rb +0 -7
  305. data/lib/lono/blueprint/helper.rb +0 -24
  306. data/lib/lono/blueprint/meta.rb +0 -30
  307. data/lib/lono/blueprint/new.rb +0 -127
  308. data/lib/lono/blueprint/root.rb +0 -25
  309. data/lib/lono/cfn/create.rb +0 -41
  310. data/lib/lono/cfn/opts.rb +0 -88
  311. data/lib/lono/cfn/preview/changeset.rb +0 -168
  312. data/lib/lono/cfn/preview/codediff.rb +0 -41
  313. data/lib/lono/cfn/preview/diff_viewer.rb +0 -23
  314. data/lib/lono/cfn/rollback.rb +0 -26
  315. data/lib/lono/cfn/update.rb +0 -71
  316. data/lib/lono/cfn.rb +0 -75
  317. data/lib/lono/clean.rb +0 -14
  318. data/lib/lono/code.rb +0 -22
  319. data/lib/lono/configset/combiner.rb +0 -162
  320. data/lib/lono/configset/evaluate_file.rb +0 -8
  321. data/lib/lono/configset/generator.rb +0 -57
  322. data/lib/lono/configset/list.rb +0 -67
  323. data/lib/lono/configset/meta/dsl.rb +0 -12
  324. data/lib/lono/configset/meta.rb +0 -19
  325. data/lib/lono/configset/new.rb +0 -77
  326. data/lib/lono/configset/preparer.rb +0 -44
  327. data/lib/lono/configset/register/base.rb +0 -122
  328. data/lib/lono/configset/register/blueprint.rb +0 -16
  329. data/lib/lono/configset/register/dsl.rb +0 -14
  330. data/lib/lono/configset/register/project.rb +0 -13
  331. data/lib/lono/configset/resolver.rb +0 -47
  332. data/lib/lono/configset/s3_file/build.rb +0 -33
  333. data/lib/lono/configset/s3_file/item.rb +0 -38
  334. data/lib/lono/configset/s3_file/registry.rb +0 -12
  335. data/lib/lono/configset/s3_file/upload.rb +0 -12
  336. data/lib/lono/configset/strategy/base.rb +0 -83
  337. data/lib/lono/configset/strategy/helpers/dsl.rb +0 -8
  338. data/lib/lono/configset/strategy/helpers/erb.rb +0 -9
  339. data/lib/lono/conventions.rb +0 -23
  340. data/lib/lono/core/config.rb +0 -22
  341. data/lib/lono/default/settings.yml +0 -21
  342. data/lib/lono/extension/helper.rb +0 -13
  343. data/lib/lono/extension/list.rb +0 -40
  344. data/lib/lono/extension.rb +0 -9
  345. data/lib/lono/extensions/dsl.rb +0 -11
  346. data/lib/lono/extensions/loader.rb +0 -30
  347. data/lib/lono/extensions/preparer.rb +0 -26
  348. data/lib/lono/extensions/register.rb +0 -15
  349. data/lib/lono/extensions.rb +0 -18
  350. data/lib/lono/file_uploader.rb +0 -21
  351. data/lib/lono/finder/base.rb +0 -152
  352. data/lib/lono/finder/blueprint/configset.rb +0 -17
  353. data/lib/lono/finder/blueprint.rb +0 -11
  354. data/lib/lono/finder/configset.rb +0 -11
  355. data/lib/lono/finder/extension.rb +0 -11
  356. data/lib/lono/generate.rb +0 -111
  357. data/lib/lono/help/cfn/create.md +0 -26
  358. data/lib/lono/help/cfn/delete.md +0 -13
  359. data/lib/lono/help/cfn/deploy.md +0 -21
  360. data/lib/lono/help/cfn/download.md +0 -3
  361. data/lib/lono/help/cfn/update.md +0 -49
  362. data/lib/lono/help/cfn.md +0 -7
  363. data/lib/lono/help/new.md +0 -57
  364. data/lib/lono/help/param.md +0 -6
  365. data/lib/lono/help/seed.md +0 -23
  366. data/lib/lono/help/set_instances/delete.md +0 -21
  367. data/lib/lono/help/set_instances/deploy.md +0 -31
  368. data/lib/lono/help/set_instances/list.md +0 -14
  369. data/lib/lono/help/set_instances/status.md +0 -15
  370. data/lib/lono/help/set_instances/sync.md +0 -92
  371. data/lib/lono/help/sets/delete.md +0 -8
  372. data/lib/lono/help/sets/deploy.md +0 -76
  373. data/lib/lono/help/sets/status.md +0 -23
  374. data/lib/lono/help/summary.md +0 -33
  375. data/lib/lono/help/template/generate.md +0 -7
  376. data/lib/lono/help/upgrade.md +0 -1
  377. data/lib/lono/help/xgraph.md +0 -16
  378. data/lib/lono/help.rb +0 -15
  379. data/lib/lono/importer/erb.rb +0 -31
  380. data/lib/lono/inspector/graph.rb +0 -125
  381. data/lib/lono/jade/circular.rb +0 -26
  382. data/lib/lono/jade/materializer/final.rb +0 -10
  383. data/lib/lono/jade/materializer/gems_builder.rb +0 -81
  384. data/lib/lono/jade/materializer/source.rb +0 -54
  385. data/lib/lono/jade/materializer.rb +0 -15
  386. data/lib/lono/jade/registry.rb +0 -64
  387. data/lib/lono/jade.rb +0 -110
  388. data/lib/lono/jadespec.rb +0 -68
  389. data/lib/lono/new/helper.rb +0 -15
  390. data/lib/lono/new.rb +0 -95
  391. data/lib/lono/param.rb +0 -14
  392. data/lib/lono/pro/base.rb +0 -16
  393. data/lib/lono/pro/repo.rb +0 -28
  394. data/lib/lono/pro.rb +0 -15
  395. data/lib/lono/project_checker.rb +0 -35
  396. data/lib/lono/registration/base.rb +0 -37
  397. data/lib/lono/registration/check.rb +0 -15
  398. data/lib/lono/registration/temp.rb +0 -53
  399. data/lib/lono/registration/user.rb +0 -60
  400. data/lib/lono/seed/base.rb +0 -116
  401. data/lib/lono/seed/service_role.rb +0 -11
  402. data/lib/lono/seed.rb +0 -39
  403. data/lib/lono/sequence.rb +0 -35
  404. data/lib/lono/set_instances/base.rb +0 -30
  405. data/lib/lono/set_instances/changeable.rb +0 -53
  406. data/lib/lono/set_instances/create.rb +0 -7
  407. data/lib/lono/set_instances/delete.rb +0 -47
  408. data/lib/lono/set_instances/deploy.rb +0 -52
  409. data/lib/lono/set_instances/list.rb +0 -13
  410. data/lib/lono/set_instances/opts.rb +0 -37
  411. data/lib/lono/set_instances/status.rb +0 -12
  412. data/lib/lono/set_instances/sync.rb +0 -181
  413. data/lib/lono/set_instances/update.rb +0 -15
  414. data/lib/lono/set_instances.rb +0 -54
  415. data/lib/lono/sets/base.rb +0 -50
  416. data/lib/lono/sets/create.rb +0 -27
  417. data/lib/lono/sets/delete.rb +0 -43
  418. data/lib/lono/sets/deploy.rb +0 -11
  419. data/lib/lono/sets/list.rb +0 -35
  420. data/lib/lono/sets/opts.rb +0 -18
  421. data/lib/lono/sets/preview/codediff.rb +0 -35
  422. data/lib/lono/sets/preview/param.rb +0 -32
  423. data/lib/lono/sets/status/instance/base.rb +0 -120
  424. data/lib/lono/sets/status/instance/completed.rb +0 -35
  425. data/lib/lono/sets/status/instance/deleted.rb +0 -32
  426. data/lib/lono/sets/status/instance/show.rb +0 -7
  427. data/lib/lono/sets/status/instance.rb +0 -20
  428. data/lib/lono/sets/status/instances.rb +0 -136
  429. data/lib/lono/sets/status.rb +0 -128
  430. data/lib/lono/sets/summarize.rb +0 -22
  431. data/lib/lono/sets/time_spent.rb +0 -11
  432. data/lib/lono/sets/update.rb +0 -74
  433. data/lib/lono/sets/waiter.rb +0 -23
  434. data/lib/lono/sets.rb +0 -34
  435. data/lib/lono/setting.rb +0 -75
  436. data/lib/lono/template/aws_service.rb +0 -20
  437. data/lib/lono/template/bashify.rb +0 -39
  438. data/lib/lono/template/configset_injector.rb +0 -52
  439. data/lib/lono/template/context/loader/load_files.rb +0 -24
  440. data/lib/lono/template/context/loader.rb +0 -52
  441. data/lib/lono/template/context.rb +0 -29
  442. data/lib/lono/template/evaluate.rb +0 -40
  443. data/lib/lono/template/generator.rb +0 -23
  444. data/lib/lono/template/helper.rb +0 -152
  445. data/lib/lono/template/strategy/base.rb +0 -4
  446. data/lib/lono/template/strategy/common/helpers.rb +0 -44
  447. data/lib/lono/template/strategy/dsl/builder/helpers/core_helper.rb +0 -14
  448. data/lib/lono/template/strategy/dsl/builder/helpers/file_helper.rb +0 -48
  449. data/lib/lono/template/strategy/dsl/builder/helpers.rb +0 -16
  450. data/lib/lono/template/strategy/dsl/builder/section/base.rb +0 -30
  451. data/lib/lono/template/strategy/dsl/builder/squeezer.rb +0 -24
  452. data/lib/lono/template/strategy/dsl/builder/syntax/extend_with.rb +0 -9
  453. data/lib/lono/template/strategy/dsl/builder/syntax.rb +0 -11
  454. data/lib/lono/template/strategy/dsl/builder.rb +0 -59
  455. data/lib/lono/template/strategy/dsl/finalizer.rb +0 -12
  456. data/lib/lono/template/strategy/dsl.rb +0 -14
  457. data/lib/lono/template/strategy/erb.rb +0 -82
  458. data/lib/lono/template/strategy/source.rb +0 -8
  459. data/lib/lono/template/template.rb +0 -54
  460. data/lib/lono/template/upload.rb +0 -23
  461. data/lib/lono/template/util.rb +0 -8
  462. data/lib/lono/template.rb +0 -24
  463. data/lib/lono/upgrade.rb +0 -20
  464. data/lib/lono/utils/generators/tree.rb +0 -18
  465. data/lib/lono/utils/item/file_methods.rb +0 -29
  466. data/lib/lono/utils/item/zip.rb +0 -42
  467. data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +0 -45
  468. data/lib/templates/blueprint/.gitignore +0 -11
  469. data/lib/templates/blueprint/CHANGELOG.md +0 -7
  470. data/lib/templates/blueprint/Gemfile +0 -4
  471. data/lib/templates/blueprint/README.md.tt +0 -33
  472. data/lib/templates/blueprint/Rakefile.tt +0 -9
  473. data/lib/templates/blueprint/seed/configs.rb +0 -28
  474. data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +0 -36
  475. data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +0 -2
  476. data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +0 -1
  477. data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +0 -67
  478. data/lib/templates/configset/%configset_name%.gemspec.tt +0 -42
  479. data/lib/templates/configset/.gitignore +0 -10
  480. data/lib/templates/configset/CHANGELOG.md +0 -7
  481. data/lib/templates/configset/Gemfile +0 -4
  482. data/lib/templates/configset/README.md.tt +0 -3
  483. data/lib/templates/configset/Rakefile.tt +0 -9
  484. data/lib/templates/extension/%extension_name%.gemspec.tt +0 -46
  485. data/lib/templates/extension/.gitignore +0 -11
  486. data/lib/templates/extension/.rspec +0 -3
  487. data/lib/templates/extension/CHANGELOG.md +0 -7
  488. data/lib/templates/extension/Gemfile.tt +0 -4
  489. data/lib/templates/extension/Rakefile.tt +0 -9
  490. data/lib/templates/extension/spec/spec_helper.rb.tt +0 -29
  491. data/lib/templates/skeleton/Gemfile +0 -3
  492. data/lib/templates/skeleton/README.md +0 -58
  493. data/lib/templates/skeleton/configs/settings.yml +0 -13
  494. data/vendor/cfn-status/CHANGELOG.md +0 -14
  495. data/vendor/cfn-status/Gemfile +0 -4
  496. data/vendor/cfn-status/Gemfile.lock +0 -49
  497. data/vendor/cfn-status/LICENSE.txt +0 -21
  498. data/vendor/cfn-status/README.md +0 -58
  499. data/vendor/cfn-status/Rakefile +0 -6
  500. data/vendor/cfn-status/bin/console +0 -14
  501. data/vendor/cfn-status/bin/setup +0 -8
  502. data/vendor/cfn-status/cfn-status.gemspec +0 -30
  503. data/vendor/cfn-status/lib/cfn-status.rb +0 -1
  504. data/vendor/cfn-status/lib/cfn_status/aws_service.rb +0 -51
  505. data/vendor/cfn-status/lib/cfn_status/version.rb +0 -3
  506. data/vendor/cfn-status/lib/cfn_status.rb +0 -245
  507. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-1.json +0 -1103
  508. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-2.json +0 -1104
  509. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-3.json +0 -1103
  510. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-1.json +0 -1103
  511. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-2.json +0 -1104
  512. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-3.json +0 -1103
  513. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +0 -1080
  514. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +0 -1080
  515. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +0 -1086
  516. data/vendor/cfn-status/spec/lib/cfn_status_spec.rb +0 -153
  517. data/vendor/cfn-status/spec/spec_helper.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9bb488fbda283f04107b4e461bf641727b5235d748a3a417bc6dced426fe67f1
4
- data.tar.gz: 90530c32b44d161ac7a0b5bdd546a15bb37b04946ed8a4de6ce39f9b968ad4a6
3
+ metadata.gz: 99ed66c36726e513ebe394291384f039d6dbbc7beef5a376b28b3b84121f1a42
4
+ data.tar.gz: ec1902278f840c29539d54fffa9167565a27f1837a4ee2795d8db86badf0030d
5
5
  SHA512:
6
- metadata.gz: cf60e6101ecad062a69f04ec343e7cb7e73d5b07252cf9546fbe71f5bae3a39a13b2b09faaa5213b44f86309e9bf7907022c337ad4f14cb57af3afacc1be3658
7
- data.tar.gz: a3ddbafb4524a7f885e680021cd5fb07e8dc228e28b7a1c13dac73ebc475233f57e1ec93c35eecbe4eb155182cf807947791d875ac055042fa43c12a856462cf
6
+ metadata.gz: 522056fb098c360c2ad59d99dfabaa723aeec157ca5012938c36efcb130e1bf6c2974d158e3c2f864e258c5d4b065d8e949667291f6af7d779bad91d2b451a0f
7
+ data.tar.gz: 18d17bbf1fcdd0f9d7c59f87b83e463f277958fb34cfb07d5918904b76ae44ecd2995f7e36f09d0a99c15d01070b469abf44bcfc95ec8f413aa54fdb0058fc6c
data/.cody/README.md CHANGED
@@ -2,28 +2,18 @@
2
2
 
3
3
  CodeBuild is used to run **acceptance-level tests**.
4
4
 
5
- ## Cody Files
6
-
7
- The files in folder are used by cody to build AWS CodeBuild projects. For more info, check out the [cody docs](https://cody.run). Here's a quick start.
8
-
9
- ## Install Tool
10
-
11
- gem install cody
12
-
13
- This installs the `cody` command to manage the AWS CodeBuild project.
14
-
15
- ## Update Project
5
+ ## Deploy Project
16
6
 
17
7
  To update the CodeBuild project that handles deployment:
18
8
 
19
- cody deploy lono
9
+ cody deploy lono -t acceptance
20
10
 
21
- ## Start a Deploy
11
+ ## Start Build
22
12
 
23
13
  To start a CodeBuild build:
24
14
 
25
- cody start lono
15
+ cody start lono -t acceptance
26
16
 
27
17
  To specify a branch:
28
18
 
29
- cody start lono -b feature
19
+ cody start lono -t acceptance -b feature
@@ -0,0 +1,52 @@
1
+ #!/bin/bash
2
+
3
+ final_status=0
4
+ function capture_status {
5
+ if [ "$?" -ne "0" ] && [ $final_status -ne 1 ] ; then
6
+ final_status=1
7
+ fi
8
+ }
9
+
10
+ set -eu
11
+ # will build from /tmp because terraspace/Gemfile may interfere
12
+ cd /tmp
13
+ export PATH=~/bin:$PATH # ~/bin/lono wrapper
14
+
15
+ lono new project infra
16
+ cd infra
17
+
18
+ # Rewrite the Gemfile to use the local lono gem for testing
19
+ cat << EOF > Gemfile
20
+ source "https://rubygems.org"
21
+ gem "lono", path: "$CODEBUILD_SRC_DIR", submodules: true
22
+ gem "rspec-lono", git: "https://github.com/boltops-tools/rspec-lono", branch: "master"
23
+ EOF
24
+ cat Gemfile
25
+
26
+ bundle # install lono gem in the infra project
27
+
28
+ export LONO_ENV="test-$(date +%Y%m%d%H%M%S)"
29
+ lono new blueprint demo --examples
30
+
31
+ # Continue on error and capture final exit status so lono down always and cleans up stack
32
+ set +e
33
+ # Test new stack creation
34
+ lono up demo -y
35
+ capture_status
36
+
37
+ lono seed demo # just to test it. will overwrite file
38
+ capture_status
39
+
40
+ # Test stack update
41
+ cat << EOF > config/blueprints/demo/params/$LONO_ENV.txt
42
+ AccessControl=PublicRead
43
+ EOF
44
+ lono up demo -y
45
+ capture_status
46
+
47
+ # Clean up resources
48
+ lono down demo -y
49
+ capture_status
50
+ set -e
51
+
52
+ exit $final_status
@@ -0,0 +1,10 @@
1
+ version: 0.2
2
+
3
+ phases:
4
+ install:
5
+ runtime-versions:
6
+ ruby: latest
7
+ build:
8
+ commands:
9
+ - .cody/shared/script/install.sh
10
+ - .cody/acceptance/bin/build.sh
@@ -0,0 +1,6 @@
1
+ github_url("https://github.com/boltops-tools/lono")
2
+ linux_image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
3
+ # triggers(
4
+ # webhook: true,
5
+ # filter_groups: [[{type: "EVENT", pattern: "PUSH"}]]
6
+ # )
File without changes
@@ -0,0 +1,40 @@
1
+ #!/bin/bash
2
+
3
+ set -eux
4
+
5
+ export PATH=~/bin:$PATH
6
+
7
+ cat << 'EOF' > ~/.gemrc
8
+ ---
9
+ :backtrace: false
10
+ :bulk_threshold: 1000
11
+ :sources:
12
+ - https://rubygems.org
13
+ :update_sources: true
14
+ :verbose: true
15
+ benchmark: false
16
+ install: "--no-ri --no-rdoc --no-document"
17
+ update: "--no-ri --no-rdoc --no-document"
18
+ EOF
19
+
20
+ gem install bundler # upgrade bundler
21
+
22
+ # In original lono source and install lono
23
+ cd $CODEBUILD_SRC_DIR # lono folder - in case code is added later above this that uses cd
24
+ bundle install
25
+ bundle exec rake install
26
+
27
+ mkdir -p ~/bin
28
+ cat << EOF > ~/bin/lono
29
+ #!/bin/bash
30
+ # If there's a Gemfile, assume we're in a lono project with a Gemfile for lono
31
+ if [ -f Gemfile ]; then
32
+ exec bundle exec $CODEBUILD_SRC_DIR/exe/lono "\$@"
33
+ else
34
+ exec $CODEBUILD_SRC_DIR/exe/lono "\$@"
35
+ fi
36
+ EOF
37
+
38
+ cat ~/bin/lono
39
+
40
+ chmod a+x ~/bin/lono
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ set -eu
4
+
5
+ .cody/shared/script/install/lono.sh
data/CHANGELOG.md CHANGED
@@ -1,7 +1,48 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
3
+ ## [8.0.0.rc3] - 2022-03-06
4
+
5
+ * lono files support for lambda functions
6
+ * new structure: remove Appfile
7
+ * allow regions and envs support
8
+ * print friend message with exact line of yaml code in case of aws
9
+ * cloudformation yaml validation error
10
+ * improve cli help
11
+ * configsets new structure
12
+ * lono new helper blueprint and project commands
13
+ * project helpers support
14
+ * include_modules improvements
15
+ * support vendor level helpers
16
+ * improve plan params diff
17
+ * lono plan build all first
18
+
19
+ ## [8.0.0.rc2] - 2022-02-23
20
+
21
+ * restructure builder and helpers
22
+ * improve template_evaluation_error
23
+ * lono seed --where option and config.seed.where
24
+ * return nil when output not found
25
+ * setup configsets finalizer
26
+ * template_file helper
27
+ * fix coder
28
+ * lono s3 bucket auto-creation
29
+
30
+ ## [8.0.0.rc1] - 2022-02-21
31
+
32
+ * v8 cleaner and simplier interface
33
+ * commands: lono up, down, bundle, list, new, output, plan
34
+ * conventional stack name
35
+ * lono new generators
36
+ * improve lono plan previews
37
+ * improve layering
38
+ * boot hooks
39
+ * change default env to dev
40
+ * app config support: config.names.stack, etc
41
+ * change --sure to --yes option
42
+ * remove core settings in favor of config/app.rb
43
+ * logger support
44
+ * remove docs. move to separate repo
45
+ * plugin system and test framework
5
46
 
6
47
  ## [7.5.2] - 2022-02-08
7
48
  - [#74](https://github.com/boltops-tools/lono/pull/74) activesupport require fix
@@ -137,7 +178,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
137
178
  ## [6.1.9]
138
179
  - #30 fix md5 sum calcuation for single file
139
180
  - #31 Add app files ERB support docs
140
- - options `--sure` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
181
+ - options `-y` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
141
182
 
142
183
  ## [6.1.8]
143
184
  - #28 add user_data_script helper
@@ -243,7 +284,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
243
284
 
244
285
  ## [5.2.2]
245
286
  - seed only support params for main conventional template in blueprint
246
- - set --iam with --sure option also
287
+ - set --iam with -y option also
247
288
 
248
289
  ## [5.2.1]
249
290
  - improve param lookup
@@ -265,7 +306,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
265
306
  ## [5.0.1]
266
307
  - Introduce lono DSL and set as default mode
267
308
  - Introduce blueprints concept
268
- - Introduce lono cfn deploy command
309
+ - Introduce lono up command
269
310
  - Auto-create lono managed s3 bucket
270
311
  - Zeitwerk autoloader
271
312
  - Restructure project structure
data/CONTRIBUTING.md CHANGED
@@ -13,7 +13,7 @@ Here are some ways *you* can contribute:
13
13
  * by closing [issues][]
14
14
  * by reviewing patches
15
15
 
16
- [issues]: https://github.com/tongueroo/lono/issues
16
+ [issues]: https://github.com/boltops-tools/lono/issues
17
17
 
18
18
  ## Submitting an Issue
19
19
 
@@ -48,7 +48,7 @@ already been submitted.
48
48
  asking for help. We love helping!
49
49
  * Please don't update the Gem version.
50
50
 
51
- [repo]: https://github.com/tongueroo/lono/tree/master
51
+ [repo]: https://github.com/boltops-tools/lono/tree/master
52
52
  [fork]: https://help.github.com/articles/fork-a-repo/
53
53
  [branch]: https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/
54
54
  [pr]: https://help.github.com/articles/using-pull-requests/
data/Gemfile CHANGED
@@ -3,4 +3,6 @@ source "https://rubygems.org"
3
3
  # Specify your gem dependencies in lono.gemspec
4
4
  gemspec
5
5
 
6
- gem "codeclimate-test-reporter", group: :test, require: nil
6
+ group :test do
7
+ gem "rspec-lono", git: "https://github.com/boltops-tools/rspec-lono", branch: "master"
8
+ end
data/LICENSE.txt CHANGED
@@ -1 +1,201 @@
1
- https://www.boltops.com/boltops-community-license
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md CHANGED
@@ -18,7 +18,7 @@ Lono is a CloudFormation framework. It builds, manages, and deploys CloudFormati
18
18
  * Simple CLI interface to launch CloudFormation stacks.
19
19
  * Ability to use [Existing CloudFormation Templates](https://lono.cloud/docs/existing-templates/).
20
20
  * [The Lono DSL](https://lono.cloud/docs/dsl/) - Generate templates from beautiful code.
21
- * Write your CloudFormation parameters with [simple env-like values](https://lono.cloud/docs/configs/params/).
21
+ * Write your CloudFormation parameters with [simple env-like values](https://lono.cloud/docs/config/params/).
22
22
  * Preview CloudFormation changes before pressing the big red button.
23
23
  * [Layering](https://lono.cloud/docs/core/layering/) - Allows you to build multiple environments like development and production with the same template.
24
24
  * [Variables](https://lono.cloud/docs/layering/variables/) - Allows you to construct templates where runtime Parameters do not suffice.
@@ -27,19 +27,14 @@ Lono is a CloudFormation framework. It builds, manages, and deploys CloudFormati
27
27
 
28
28
  See [lono.cloud](http://lono.cloud) for full lono documentation.
29
29
 
30
- ## Upgrading
31
-
32
- If you are on version 6 and upgrading to 7. You can run [lono upgrade](https://lono.cloud/reference/lono-upgrade/) within your project. Refer to the [Upgrading Guide](https://lono.cloud/docs/extras/upgrading/).
33
-
34
30
  ## Quick Usage
35
31
 
36
32
  It only takes a couple of commands to start using lono.
37
33
 
38
- gem install lono
39
- lono new infra
34
+ gem install lono --prerelease
35
+ lono new project infra --examples
40
36
  cd infra
41
- lono blueprint new demo
42
- lono cfn deploy demo
37
+ lono up demo
43
38
 
44
39
  ![Lono flowchart](https://lono.cloud/img/tutorial/lono-flowchart.png "Lono flowchart")
45
40
 
@@ -73,9 +68,9 @@ output("SecurityGroup", get_att("SecurityGroup.GroupId"))
73
68
 
74
69
  ### Lono Cfn Deploy
75
70
 
76
- Lono provides a `lono cfn` lifecycle command that allows you to launch stacks quickly. The `lono cfn deploy` generates and launches the CloudFormation stack. If you are in a lono project and have a `demo` lono blueprint. To create a stack run:
71
+ Lono provides a `lono cfn` lifecycle command that allows you to launch stacks quickly. The `lono up` generates and launches the CloudFormation stack. If you are in a lono project and have a `demo` lono blueprint. To create a stack run:
77
72
 
78
- $ lono cfn deploy demo
73
+ $ lono up demo
79
74
 
80
75
  ## Contributing
81
76
 
@@ -3,6 +3,7 @@ module Lono::Api
3
3
  extend Memoist
4
4
  include Verify
5
5
  include Repos
6
+ include Lono::Utils::Logging
6
7
 
7
8
  def http
8
9
  Proxy.new
@@ -20,8 +21,8 @@ module Lono::Api
20
21
  end
21
22
  else
22
23
  if ENV['LONO_DEBUG_API']
23
- puts "Error: Non-successful http response status code: #{res.code}"
24
- puts "headers: #{res.each_header.to_h.inspect}"
24
+ logger.info "Error: Non-successful http response status code: #{res.code}"
25
+ logger.info "headers: #{res.each_header.to_h.inspect}"
25
26
  end
26
27
  nil
27
28
  end
@@ -0,0 +1,12 @@
1
+ class Lono::App::CallableOption
2
+ module Concern
3
+ def callable_option(options={})
4
+ callable_option = Lono::App::CallableOption.new(
5
+ config_name: options[:config_name],
6
+ config_value: options[:config_value],
7
+ passed_args: options[:passed_args],
8
+ )
9
+ callable_option.object
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,56 @@
1
+ # Class represents a lono option that is possibly callable. Examples:
2
+ #
3
+ # config.allow.envs
4
+ # config.allow.regions
5
+ # config.deny.envs
6
+ # config.deny.regions
7
+ #
8
+ # Abstraction is definitely obtuse. Using it to get rid of duplication.
9
+ #
10
+ class Lono::App
11
+ class CallableOption
12
+ include Lono::Utils::Logging
13
+
14
+ def initialize(options={})
15
+ @options = options
16
+ # Example:
17
+ # config_name: config.allow.envs
18
+ # config_value: ["dev"]
19
+ # args: [@stack_name] # passed to object.call
20
+ @config_name = options[:config_name]
21
+ @config_value = options[:config_value]
22
+ @passed_args = options[:passed_args]
23
+ end
24
+
25
+ # Returns either an Array or nil
26
+ def object
27
+ case @config_value
28
+ when nil
29
+ return nil
30
+ when Array
31
+ return @config_value
32
+ when -> (c) { c.respond_to?(:public_instance_methods) && c.public_instance_methods.include?(:call) }
33
+ object= @config_value.new
34
+ when -> (c) { c.respond_to?(:call) }
35
+ object = @config_value
36
+ else
37
+ raise "Invalid option for #{@config_name}"
38
+ end
39
+
40
+ if object
41
+ result = @passed_args.empty? ? object.call : object.call(*@passed_args)
42
+ unless result.is_a?(Array) || result.is_a?(NilClass)
43
+ message = "ERROR: The #{@config_name} needs to return an Array or nil"
44
+ logger.info message.color(:yellow)
45
+ logger.info <<~EOL
46
+ The #{@config_name} when assigned a class, object, or proc must implement
47
+ the call method and return an Array or nil.
48
+ The current return value is a #{result.class}
49
+ EOL
50
+ raise message
51
+ end
52
+ end
53
+ result
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,13 @@
1
+ class Lono::App
2
+ class Inits
3
+ class << self
4
+ include DslEvaluator
5
+
6
+ def run_all
7
+ Dir.glob("#{Lono.root}/config/inits/*.rb").each do |path|
8
+ evaluate_file(path)
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end