lono 7.5.1 → 8.0.0.pre.rc2

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 (465) 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 +36 -4
  10. data/CONTRIBUTING.md +2 -2
  11. data/Gemfile +5 -1
  12. data/LICENSE.txt +201 -1
  13. data/README.md +6 -12
  14. data/lib/lono/api/client.rb +3 -2
  15. data/lib/lono/app/inits.rb +13 -0
  16. data/lib/lono/app.rb +74 -0
  17. data/lib/lono/app_file/base.rb +1 -1
  18. data/lib/lono/app_file/build/lambda_layer/ruby_packager.rb +9 -9
  19. data/lib/lono/app_file/build/lambda_layer.rb +3 -3
  20. data/lib/lono/app_file/build.rb +10 -15
  21. data/lib/lono/app_file/registry/item.rb +4 -4
  22. data/lib/lono/app_file/upload.rb +1 -1
  23. data/lib/lono/autoloader.rb +2 -2
  24. data/lib/lono/aws_services/helper.rb +43 -6
  25. data/lib/lono/aws_services.rb +37 -6
  26. data/lib/lono/blueprint.rb +18 -9
  27. data/lib/lono/booter.rb +28 -0
  28. data/lib/lono/builder/context/generic.rb +11 -0
  29. data/lib/lono/{template/context/loader → builder/context/loaders}/load_files.rb +5 -6
  30. data/lib/lono/builder/context/loaders.rb +35 -0
  31. data/lib/lono/builder/context/params.rb +6 -0
  32. data/lib/lono/builder/context/template.rb +4 -0
  33. data/lib/lono/builder/dsl/evaluator.rb +94 -0
  34. data/lib/lono/builder/dsl/finalizer/configsets.rb +41 -0
  35. data/lib/lono/{template/strategy → builder}/dsl/finalizer/parameter_groups.rb +2 -2
  36. data/lib/lono/{template/strategy → builder}/dsl/finalizer.rb +2 -1
  37. data/lib/lono/{template/strategy/dsl/builder/helpers/ec2_helper.rb → builder/dsl/helpers/ec2.rb} +3 -3
  38. data/lib/lono/builder/dsl/helpers/partials.rb +145 -0
  39. data/lib/lono/{template/strategy/dsl/builder/helpers/s3_helper.rb → builder/dsl/helpers/s3.rb} +3 -3
  40. data/lib/lono/{template/context/ssm_fetcher.rb → builder/dsl/helpers/ssm/fetcher.rb} +2 -2
  41. data/lib/lono/{template/context/helpers.rb → builder/dsl/helpers/ssm.rb} +3 -3
  42. data/lib/lono/{template/strategy/dsl/builder/helpers/stack_helper.rb → builder/dsl/helpers/stack.rb} +14 -9
  43. data/lib/lono/{template/strategy/dsl/builder/helpers/tags_helper.rb → builder/dsl/helpers/tags.rb} +2 -2
  44. data/lib/lono/builder/dsl/helpers/template_file.rb +54 -0
  45. data/lib/lono/{template/strategy/dsl/builder → builder/dsl}/helpers.rb +3 -4
  46. data/lib/lono/builder/dsl/syntax/core/base.rb +22 -0
  47. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/condition.rb +1 -1
  48. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/mapping.rb +1 -1
  49. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/output.rb +1 -1
  50. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/parameter.rb +1 -1
  51. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource/property_mover.rb +1 -1
  52. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/resource.rb +1 -1
  53. data/lib/lono/{template/strategy/dsl/builder/section → builder/dsl/syntax/core}/section.rb +1 -1
  54. data/lib/lono/{template/strategy/dsl/builder → builder/dsl/syntax/core}/squeezer.rb +1 -1
  55. data/lib/lono/{template/strategy/dsl/builder/section/methods.rb → builder/dsl/syntax/core.rb} +8 -8
  56. data/lib/lono/{template/strategy/dsl/builder → builder/dsl/syntax}/fn.rb +2 -2
  57. data/lib/lono/{template/strategy/dsl/builder → builder/dsl}/syntax/parameter_group.rb +1 -1
  58. data/lib/lono/builder/dsl/syntax.rb +9 -0
  59. data/lib/lono/builder/dsl.rb +14 -0
  60. data/lib/lono/{param/generator.rb → builder/param.rb} +21 -22
  61. data/lib/lono/builder/template/aws_service.rb +15 -0
  62. data/lib/lono/builder/template/bashify.rb +43 -0
  63. data/lib/lono/{output/template.rb → builder/template/output.rb} +14 -7
  64. data/lib/lono/{template → builder/template}/post_processor.rb +4 -4
  65. data/lib/lono/{template → builder/template}/upload.rb +3 -5
  66. data/lib/lono/builder/template.rb +55 -0
  67. data/lib/lono/{template/strategy/dsl/builder → builder/util}/stringify.rb +1 -1
  68. data/lib/lono/bundler/cli/base.rb +10 -0
  69. data/lib/lono/bundler/cli/bundle.rb +44 -0
  70. data/lib/lono/bundler/cli/clean.rb +27 -0
  71. data/lib/lono/bundler/cli/help/bundle.md +3 -0
  72. data/lib/lono/bundler/cli/help.rb +11 -0
  73. data/lib/lono/bundler/cli.rb +7 -0
  74. data/lib/lono/bundler/component/concerns/local_concern.rb +10 -0
  75. data/lib/lono/bundler/component/concerns/notation_concern.rb +59 -0
  76. data/lib/lono/bundler/component/concerns/path_concern.rb +68 -0
  77. data/lib/lono/bundler/component/concerns/stack_concern.rb +60 -0
  78. data/lib/lono/bundler/component/fetcher/base.rb +27 -0
  79. data/lib/lono/bundler/component/fetcher/gcs.rb +69 -0
  80. data/lib/lono/bundler/component/fetcher/git.rb +69 -0
  81. data/lib/lono/bundler/component/fetcher/local.rb +15 -0
  82. data/lib/lono/bundler/component/fetcher/s3.rb +66 -0
  83. data/lib/lono/bundler/component/fetcher.rb +18 -0
  84. data/lib/lono/bundler/component/http/concern.rb +45 -0
  85. data/lib/lono/bundler/component/http/source.rb +19 -0
  86. data/lib/lono/bundler/component/org_repo.rb +65 -0
  87. data/lib/lono/bundler/component/props/extension.rb +18 -0
  88. data/lib/lono/bundler/component/props/typer.rb +41 -0
  89. data/lib/lono/bundler/component/props.rb +122 -0
  90. data/lib/lono/bundler/component/registry.rb +136 -0
  91. data/lib/lono/bundler/component.rb +52 -0
  92. data/lib/lono/bundler/config.rb +18 -0
  93. data/lib/lono/bundler/dsl/syntax.rb +46 -0
  94. data/lib/lono/bundler/dsl.rb +21 -0
  95. data/lib/lono/bundler/exporter/base.rb +6 -0
  96. data/lib/lono/bundler/exporter/copy.rb +22 -0
  97. data/lib/lono/bundler/exporter.rb +50 -0
  98. data/lib/lono/bundler/extract/tar.rb +33 -0
  99. data/lib/lono/bundler/extract/zip.rb +16 -0
  100. data/lib/lono/bundler/info.rb +39 -0
  101. data/lib/lono/bundler/list.rb +26 -0
  102. data/lib/lono/bundler/lockfile/version_comparer.rb +56 -0
  103. data/lib/lono/bundler/lockfile/yamler.rb +36 -0
  104. data/lib/lono/bundler/lockfile.rb +66 -0
  105. data/lib/lono/bundler/lonofile.rb +32 -0
  106. data/lib/lono/bundler/runner.rb +27 -0
  107. data/lib/lono/bundler/syncer.rb +70 -0
  108. data/lib/lono/bundler/util/git.rb +37 -0
  109. data/lib/lono/bundler/util/logging.rb +7 -0
  110. data/lib/lono/bundler/util/sure.rb +5 -0
  111. data/lib/lono/{bundle.rb → bundler.rb} +38 -4
  112. data/lib/lono/cfn/base.rb +9 -195
  113. data/lib/lono/cfn/cancel.rb +9 -26
  114. data/lib/lono/cfn/concerns/build.rb +10 -0
  115. data/lib/lono/cfn/concerns/template_output.rb +10 -0
  116. data/lib/lono/cfn/concerns.rb +43 -0
  117. data/lib/lono/cfn/delete.rb +8 -32
  118. data/lib/lono/cfn/deploy/base.rb +4 -0
  119. data/lib/lono/cfn/deploy/iam.rb +48 -0
  120. data/lib/lono/cfn/deploy/notification.rb +8 -0
  121. data/lib/lono/cfn/deploy/operable.rb +18 -0
  122. data/lib/lono/cfn/deploy/opts.rb +49 -0
  123. data/lib/lono/cfn/deploy/rollback.rb +46 -0
  124. data/lib/lono/cfn/deploy/tags.rb +18 -0
  125. data/lib/lono/cfn/deploy.rb +71 -5
  126. data/lib/lono/cfn/download.rb +5 -7
  127. data/lib/lono/cfn/output.rb +49 -0
  128. data/lib/lono/cfn/plan/base.rb +19 -0
  129. data/lib/lono/cfn/plan/changeset/base.rb +19 -0
  130. data/lib/lono/cfn/plan/changeset/notifications.rb +24 -0
  131. data/lib/lono/cfn/plan/changeset/outputs.rb +25 -0
  132. data/lib/lono/cfn/plan/changeset/resources.rb +48 -0
  133. data/lib/lono/cfn/plan/changeset/tags.rb +16 -0
  134. data/lib/lono/cfn/plan/changeset.rb +136 -0
  135. data/lib/lono/cfn/plan/concerns.rb +10 -0
  136. data/lib/lono/cfn/plan/delete.rb +16 -0
  137. data/lib/lono/cfn/plan/diff/base.rb +10 -0
  138. data/lib/lono/cfn/plan/diff/data.rb +52 -0
  139. data/lib/lono/cfn/plan/diff/file.rb +57 -0
  140. data/lib/lono/cfn/plan/new.rb +26 -0
  141. data/lib/lono/cfn/{preview → plan}/param.rb +26 -34
  142. data/lib/lono/cfn/plan/summary.rb +16 -0
  143. data/lib/lono/cfn/plan/template.rb +28 -0
  144. data/lib/lono/cfn/plan.rb +33 -0
  145. data/lib/lono/cfn/show.rb +30 -0
  146. data/lib/lono/cfn/status.rb +1 -1
  147. data/lib/lono/cli/abstract.rb +17 -0
  148. data/lib/lono/cli/base.rb +9 -0
  149. data/lib/lono/cli/build.rb +91 -0
  150. data/lib/lono/cli/bundle.rb +21 -0
  151. data/lib/lono/cli/cfn/opts.rb +59 -0
  152. data/lib/lono/cli/cfn.rb +19 -0
  153. data/lib/lono/cli/clean.rb +22 -0
  154. data/lib/lono/{code.rb → cli/code.rb} +2 -2
  155. data/lib/lono/{completion.rb → cli/completion.rb} +2 -2
  156. data/lib/lono/{help → cli/help}/blueprint/new.md +4 -4
  157. data/lib/lono/{help/generate.md → cli/help/build.md} +6 -6
  158. data/lib/lono/{help → cli/help}/cfn/cancel.md +0 -0
  159. data/lib/lono/cli/help/cfn/download.md +3 -0
  160. data/lib/lono/{help → cli/help}/cfn/preview.md +9 -8
  161. data/lib/lono/{help → cli/help}/cfn/status.md +0 -1
  162. data/lib/lono/cli/help/cfn.md +4 -0
  163. data/lib/lono/{help → cli/help}/code/convert.md +0 -0
  164. data/lib/lono/{help → cli/help}/code/import.md +2 -2
  165. data/lib/lono/{help → cli/help}/completion.md +3 -3
  166. data/lib/lono/{help → cli/help}/completion_script.md +0 -0
  167. data/lib/lono/{help → cli/help}/configsets.md +0 -0
  168. data/lib/lono/cli/help/down.md +13 -0
  169. data/lib/lono/cli/help/new/project.md +34 -0
  170. data/lib/lono/{help → cli/help}/param/generate.md +0 -0
  171. data/lib/lono/cli/help/param.md +6 -0
  172. data/lib/lono/{help → cli/help}/pro/blueprints.md +0 -0
  173. data/lib/lono/{help → cli/help}/pro/configsets.md +0 -0
  174. data/lib/lono/{help → cli/help}/script/build.md +0 -0
  175. data/lib/lono/{help → cli/help}/script/upload.md +0 -0
  176. data/lib/lono/cli/help/seed.md +24 -0
  177. data/lib/lono/cli/help/summary.md +33 -0
  178. data/lib/lono/{help → cli/help}/template/bashify.md +0 -0
  179. data/lib/lono/cli/help/template/generate.md +7 -0
  180. data/lib/lono/{help → cli/help}/template.md +0 -0
  181. data/lib/lono/cli/help/up.md +30 -0
  182. data/lib/lono/{help → cli/help}/user_data.md +3 -3
  183. data/lib/lono/cli/help.rb +56 -0
  184. data/lib/lono/cli/list.rb +28 -0
  185. data/lib/lono/cli/new/blueprint.rb +33 -0
  186. data/lib/lono/cli/new/concerns.rb +16 -0
  187. data/lib/lono/{configset/new.rb → cli/new/configset.rb} +2 -9
  188. data/lib/lono/{extension/new.rb → cli/new/extension.rb} +2 -10
  189. data/lib/lono/cli/new/helper.rb +32 -0
  190. data/lib/lono/cli/new/project.rb +77 -0
  191. data/lib/lono/cli/new/sequence.rb +51 -0
  192. data/lib/lono/cli/new/shim.rb +59 -0
  193. data/lib/lono/cli/new/test/blueprint.rb +23 -0
  194. data/lib/lono/cli/new/test/sequence.rb +10 -0
  195. data/lib/lono/cli/new/test.rb +8 -0
  196. data/lib/lono/cli/new.rb +31 -0
  197. data/lib/lono/{opts.rb → cli/opts.rb} +9 -12
  198. data/lib/lono/{s3.rb → cli/s3.rb} +9 -7
  199. data/lib/lono/cli/script/base.rb +5 -0
  200. data/lib/lono/cli/script/build.rb +72 -0
  201. data/lib/lono/cli/script/upload.rb +49 -0
  202. data/lib/lono/{script.rb → cli/script.rb} +2 -2
  203. data/lib/lono/cli/seed.rb +9 -0
  204. data/lib/lono/cli/test.rb +35 -0
  205. data/lib/lono/cli.rb +81 -109
  206. data/lib/lono/command.rb +27 -0
  207. data/lib/lono/configset/{generator.rb → builder.rb} +9 -7
  208. data/lib/lono/configset/combiner.rb +8 -6
  209. data/lib/lono/configset/evaluate_file.rb +1 -1
  210. data/lib/lono/configset/meta.rb +1 -1
  211. data/lib/lono/configset/s3_file/build.rb +5 -4
  212. data/lib/lono/configset/s3_file/item.rb +1 -1
  213. data/lib/lono/configset/s3_file/upload.rb +2 -2
  214. data/lib/lono/configset/strategy/base.rb +6 -6
  215. data/lib/lono/configset/strategy/helpers/dsl/core.rb +1 -1
  216. data/lib/lono/core.rb +25 -54
  217. data/lib/lono/importer/base.rb +5 -5
  218. data/lib/lono/importer/download.rb +7 -7
  219. data/lib/lono/importer/dsl.rb +3 -3
  220. data/lib/lono/importer/service/coder.rb +67 -63
  221. data/lib/lono/importer.rb +1 -10
  222. data/lib/lono/inspector/base.rb +7 -7
  223. data/lib/lono/inspector/summary.rb +19 -17
  224. data/lib/lono/layering/layer.rb +126 -0
  225. data/lib/lono/layering.rb +13 -55
  226. data/lib/lono/logger/formatter.rb +13 -0
  227. data/lib/lono/logger.rb +34 -0
  228. data/lib/lono/lookup.rb +12 -0
  229. data/lib/lono/names.rb +50 -0
  230. data/lib/lono/plugin/meta.rb +30 -0
  231. data/lib/lono/plugin/tester.rb +13 -0
  232. data/lib/lono/plugin.rb +10 -0
  233. data/lib/lono/s3/aws_setup.rb +4 -3
  234. data/lib/lono/s3/bucket.rb +42 -42
  235. data/lib/lono/s3/rollback.rb +8 -0
  236. data/lib/lono/s3/uploader.rb +10 -12
  237. data/lib/lono/script/base.rb +3 -3
  238. data/lib/lono/script/build.rb +11 -12
  239. data/lib/lono/script/upload.rb +7 -7
  240. data/lib/lono/{seed → seeder}/service_role.rb +1 -1
  241. data/lib/lono/{seed/base.rb → seeder.rb} +38 -35
  242. data/lib/lono/user_data.rb +8 -13
  243. data/lib/lono/utils/contexts.rb +15 -0
  244. data/lib/lono/utils/item/zip.rb +5 -5
  245. data/lib/lono/utils/logging.rb +7 -0
  246. data/lib/lono/utils/{pretty_time.rb → pretty.rb} +6 -2
  247. data/lib/lono/utils/quit.rb +7 -0
  248. data/lib/lono/utils/rsync.rb +4 -2
  249. data/lib/lono/utils/sure.rb +4 -4
  250. data/lib/lono/version.rb +1 -1
  251. data/lib/lono.rb +7 -11
  252. data/lib/templates/blueprint/template.rb +2 -0
  253. data/lib/templates/configset/{lib/configset.rb → configset.rb} +0 -0
  254. data/lib/templates/examples/blueprint/template.rb +9 -0
  255. data/lib/templates/helper/%underscore_name%_helper.rb.tt +6 -0
  256. data/lib/templates/{skeleton → project}/.gitignore +1 -2
  257. data/lib/templates/project/Gemfile.tt +11 -0
  258. data/lib/templates/project/README.md +9 -0
  259. data/lib/templates/project/config/app.rb +3 -0
  260. data/lib/templates/shim/lono +7 -0
  261. data/lono.gemspec +51 -43
  262. metadata +260 -273
  263. data/.circleci/README.md +0 -3
  264. data/.circleci/config.yml +0 -58
  265. data/.cody/acceptance.sh +0 -49
  266. data/.cody/buildspec.yml +0 -9
  267. data/.cody/demo.rb +0 -38
  268. data/.cody/project.rb +0 -6
  269. data/.gitmodules +0 -3
  270. data/lib/lono/abstract_base.rb +0 -25
  271. data/lib/lono/aws_services/stack.rb +0 -41
  272. data/lib/lono/aws_services/stack_set.rb +0 -41
  273. data/lib/lono/blueprint/configset/loader.rb +0 -7
  274. data/lib/lono/blueprint/helper.rb +0 -24
  275. data/lib/lono/blueprint/meta.rb +0 -30
  276. data/lib/lono/blueprint/new.rb +0 -127
  277. data/lib/lono/blueprint/root.rb +0 -25
  278. data/lib/lono/cfn/create.rb +0 -41
  279. data/lib/lono/cfn/opts.rb +0 -88
  280. data/lib/lono/cfn/preview/changeset.rb +0 -168
  281. data/lib/lono/cfn/preview/codediff.rb +0 -41
  282. data/lib/lono/cfn/preview/diff_viewer.rb +0 -23
  283. data/lib/lono/cfn/rollback.rb +0 -26
  284. data/lib/lono/cfn/update.rb +0 -71
  285. data/lib/lono/cfn.rb +0 -75
  286. data/lib/lono/clean.rb +0 -14
  287. data/lib/lono/configset/list.rb +0 -67
  288. data/lib/lono/configset/preparer.rb +0 -44
  289. data/lib/lono/configset/register/base.rb +0 -122
  290. data/lib/lono/configset/register/blueprint.rb +0 -16
  291. data/lib/lono/configset/register/dsl.rb +0 -14
  292. data/lib/lono/configset/register/project.rb +0 -13
  293. data/lib/lono/configset/resolver.rb +0 -47
  294. data/lib/lono/configset.rb +0 -16
  295. data/lib/lono/conventions.rb +0 -23
  296. data/lib/lono/core/config.rb +0 -22
  297. data/lib/lono/default/settings.yml +0 -21
  298. data/lib/lono/ext/bundler.rb +0 -7
  299. data/lib/lono/extension/helper.rb +0 -13
  300. data/lib/lono/extension/list.rb +0 -40
  301. data/lib/lono/extension.rb +0 -9
  302. data/lib/lono/extensions/dsl.rb +0 -11
  303. data/lib/lono/extensions/loader.rb +0 -30
  304. data/lib/lono/extensions/preparer.rb +0 -26
  305. data/lib/lono/extensions/register.rb +0 -15
  306. data/lib/lono/extensions.rb +0 -18
  307. data/lib/lono/file_uploader.rb +0 -21
  308. data/lib/lono/finder/base.rb +0 -152
  309. data/lib/lono/finder/blueprint/configset.rb +0 -17
  310. data/lib/lono/finder/blueprint.rb +0 -11
  311. data/lib/lono/finder/configset.rb +0 -11
  312. data/lib/lono/finder/extension.rb +0 -11
  313. data/lib/lono/generate.rb +0 -107
  314. data/lib/lono/help/cfn/create.md +0 -26
  315. data/lib/lono/help/cfn/delete.md +0 -13
  316. data/lib/lono/help/cfn/deploy.md +0 -21
  317. data/lib/lono/help/cfn/download.md +0 -3
  318. data/lib/lono/help/cfn/update.md +0 -49
  319. data/lib/lono/help/cfn.md +0 -7
  320. data/lib/lono/help/new.md +0 -57
  321. data/lib/lono/help/param.md +0 -6
  322. data/lib/lono/help/seed.md +0 -23
  323. data/lib/lono/help/set_instances/delete.md +0 -21
  324. data/lib/lono/help/set_instances/deploy.md +0 -31
  325. data/lib/lono/help/set_instances/list.md +0 -14
  326. data/lib/lono/help/set_instances/status.md +0 -15
  327. data/lib/lono/help/set_instances/sync.md +0 -92
  328. data/lib/lono/help/sets/delete.md +0 -8
  329. data/lib/lono/help/sets/deploy.md +0 -76
  330. data/lib/lono/help/sets/status.md +0 -23
  331. data/lib/lono/help/summary.md +0 -33
  332. data/lib/lono/help/template/generate.md +0 -7
  333. data/lib/lono/help/upgrade.md +0 -1
  334. data/lib/lono/help/xgraph.md +0 -16
  335. data/lib/lono/help.rb +0 -15
  336. data/lib/lono/importer/erb.rb +0 -31
  337. data/lib/lono/inspector/graph.rb +0 -125
  338. data/lib/lono/jade/circular.rb +0 -26
  339. data/lib/lono/jade/materializer/final.rb +0 -10
  340. data/lib/lono/jade/materializer/gems_builder.rb +0 -81
  341. data/lib/lono/jade/materializer/source.rb +0 -54
  342. data/lib/lono/jade/materializer.rb +0 -15
  343. data/lib/lono/jade/registry.rb +0 -64
  344. data/lib/lono/jade.rb +0 -110
  345. data/lib/lono/jadespec.rb +0 -68
  346. data/lib/lono/new/helper.rb +0 -15
  347. data/lib/lono/new.rb +0 -95
  348. data/lib/lono/param.rb +0 -14
  349. data/lib/lono/pro/base.rb +0 -16
  350. data/lib/lono/pro/repo.rb +0 -28
  351. data/lib/lono/pro.rb +0 -15
  352. data/lib/lono/project_checker.rb +0 -35
  353. data/lib/lono/registration/base.rb +0 -37
  354. data/lib/lono/registration/check.rb +0 -15
  355. data/lib/lono/registration/temp.rb +0 -53
  356. data/lib/lono/registration/user.rb +0 -60
  357. data/lib/lono/seed.rb +0 -39
  358. data/lib/lono/sequence.rb +0 -35
  359. data/lib/lono/set_instances/base.rb +0 -30
  360. data/lib/lono/set_instances/changeable.rb +0 -53
  361. data/lib/lono/set_instances/create.rb +0 -7
  362. data/lib/lono/set_instances/delete.rb +0 -47
  363. data/lib/lono/set_instances/deploy.rb +0 -52
  364. data/lib/lono/set_instances/list.rb +0 -13
  365. data/lib/lono/set_instances/opts.rb +0 -37
  366. data/lib/lono/set_instances/status.rb +0 -12
  367. data/lib/lono/set_instances/sync.rb +0 -181
  368. data/lib/lono/set_instances/update.rb +0 -15
  369. data/lib/lono/set_instances.rb +0 -54
  370. data/lib/lono/sets/base.rb +0 -50
  371. data/lib/lono/sets/create.rb +0 -27
  372. data/lib/lono/sets/delete.rb +0 -43
  373. data/lib/lono/sets/deploy.rb +0 -11
  374. data/lib/lono/sets/list.rb +0 -35
  375. data/lib/lono/sets/opts.rb +0 -18
  376. data/lib/lono/sets/preview/codediff.rb +0 -35
  377. data/lib/lono/sets/preview/param.rb +0 -32
  378. data/lib/lono/sets/status/instance/base.rb +0 -120
  379. data/lib/lono/sets/status/instance/completed.rb +0 -35
  380. data/lib/lono/sets/status/instance/deleted.rb +0 -32
  381. data/lib/lono/sets/status/instance/show.rb +0 -7
  382. data/lib/lono/sets/status/instance.rb +0 -20
  383. data/lib/lono/sets/status/instances.rb +0 -136
  384. data/lib/lono/sets/status.rb +0 -128
  385. data/lib/lono/sets/summarize.rb +0 -22
  386. data/lib/lono/sets/time_spent.rb +0 -11
  387. data/lib/lono/sets/update.rb +0 -74
  388. data/lib/lono/sets/waiter.rb +0 -23
  389. data/lib/lono/sets.rb +0 -34
  390. data/lib/lono/setting.rb +0 -75
  391. data/lib/lono/template/aws_service.rb +0 -20
  392. data/lib/lono/template/bashify.rb +0 -39
  393. data/lib/lono/template/configset_injector.rb +0 -52
  394. data/lib/lono/template/context/loader.rb +0 -52
  395. data/lib/lono/template/context.rb +0 -29
  396. data/lib/lono/template/evaluate.rb +0 -40
  397. data/lib/lono/template/generator.rb +0 -23
  398. data/lib/lono/template/helper.rb +0 -152
  399. data/lib/lono/template/strategy/base.rb +0 -4
  400. data/lib/lono/template/strategy/common/helpers.rb +0 -44
  401. data/lib/lono/template/strategy/dsl/builder/helpers/core_helper.rb +0 -14
  402. data/lib/lono/template/strategy/dsl/builder/helpers/file_helper.rb +0 -48
  403. data/lib/lono/template/strategy/dsl/builder/section/base.rb +0 -30
  404. data/lib/lono/template/strategy/dsl/builder/syntax/extend_with.rb +0 -9
  405. data/lib/lono/template/strategy/dsl/builder/syntax.rb +0 -11
  406. data/lib/lono/template/strategy/dsl/builder.rb +0 -59
  407. data/lib/lono/template/strategy/dsl.rb +0 -14
  408. data/lib/lono/template/strategy/erb.rb +0 -82
  409. data/lib/lono/template/strategy/source.rb +0 -8
  410. data/lib/lono/template/template.rb +0 -54
  411. data/lib/lono/template/util.rb +0 -8
  412. data/lib/lono/template.rb +0 -24
  413. data/lib/lono/upgrade.rb +0 -20
  414. data/lib/lono/utils/generators/tree.rb +0 -18
  415. data/lib/templates/blueprint/%blueprint_name%.gemspec.tt +0 -45
  416. data/lib/templates/blueprint/.gitignore +0 -11
  417. data/lib/templates/blueprint/CHANGELOG.md +0 -7
  418. data/lib/templates/blueprint/Gemfile +0 -4
  419. data/lib/templates/blueprint/README.md.tt +0 -33
  420. data/lib/templates/blueprint/Rakefile.tt +0 -9
  421. data/lib/templates/blueprint/seed/configs.rb +0 -28
  422. data/lib/templates/blueprint_types/dsl/app/templates/%blueprint_name%.rb +0 -36
  423. data/lib/templates/blueprint_types/dsl/app/user_data/bootstrap.sh +0 -2
  424. data/lib/templates/blueprint_types/erb/app/definitions/base.rb.tt +0 -1
  425. data/lib/templates/blueprint_types/erb/app/templates/%blueprint_name%.yml +0 -67
  426. data/lib/templates/configset/%configset_name%.gemspec.tt +0 -42
  427. data/lib/templates/configset/.gitignore +0 -10
  428. data/lib/templates/configset/CHANGELOG.md +0 -7
  429. data/lib/templates/configset/Gemfile +0 -4
  430. data/lib/templates/configset/README.md.tt +0 -3
  431. data/lib/templates/configset/Rakefile.tt +0 -9
  432. data/lib/templates/extension/%extension_name%.gemspec.tt +0 -46
  433. data/lib/templates/extension/.gitignore +0 -11
  434. data/lib/templates/extension/.rspec +0 -3
  435. data/lib/templates/extension/CHANGELOG.md +0 -7
  436. data/lib/templates/extension/Gemfile.tt +0 -4
  437. data/lib/templates/extension/Rakefile.tt +0 -9
  438. data/lib/templates/extension/spec/spec_helper.rb.tt +0 -29
  439. data/lib/templates/skeleton/Gemfile +0 -3
  440. data/lib/templates/skeleton/README.md +0 -58
  441. data/lib/templates/skeleton/configs/settings.yml +0 -13
  442. data/vendor/cfn-status/CHANGELOG.md +0 -14
  443. data/vendor/cfn-status/Gemfile +0 -4
  444. data/vendor/cfn-status/Gemfile.lock +0 -49
  445. data/vendor/cfn-status/LICENSE.txt +0 -21
  446. data/vendor/cfn-status/README.md +0 -58
  447. data/vendor/cfn-status/Rakefile +0 -6
  448. data/vendor/cfn-status/bin/console +0 -14
  449. data/vendor/cfn-status/bin/setup +0 -8
  450. data/vendor/cfn-status/cfn-status.gemspec +0 -30
  451. data/vendor/cfn-status/lib/cfn-status.rb +0 -1
  452. data/vendor/cfn-status/lib/cfn_status/aws_service.rb +0 -51
  453. data/vendor/cfn-status/lib/cfn_status/version.rb +0 -3
  454. data/vendor/cfn-status/lib/cfn_status.rb +0 -245
  455. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-1.json +0 -1103
  456. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-2.json +0 -1104
  457. data/vendor/cfn-status/spec/fixtures/cfn/pages/fresh/describe_stack_events-3.json +0 -1103
  458. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-1.json +0 -1103
  459. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-2.json +0 -1104
  460. data/vendor/cfn-status/spec/fixtures/cfn/pages/updating/describe_stack_events-3.json +0 -1103
  461. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-complete.json +0 -1080
  462. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-in-progress.json +0 -1080
  463. data/vendor/cfn-status/spec/fixtures/cfn/stack-events-update-rollback-complete.json +0 -1086
  464. data/vendor/cfn-status/spec/lib/cfn_status_spec.rb +0 -153
  465. 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: a9747560fd12e2616a4e4087d00767cdf35ab3af81e5749a405f656277236435
4
- data.tar.gz: 58ff9d94ad6c554e74f6c1f10cee69ad47084ab0d3353e7ad4f8fd7f0a79ea73
3
+ metadata.gz: df8edbab23041858e8bea192749b440727066aeff707fa03edf5caf4dd529df9
4
+ data.tar.gz: 22f1143dd996e18bd6801080128605db30957c324136ce277c493497adb1f3bb
5
5
  SHA512:
6
- metadata.gz: 0eb34584e3bd9836e31e45e2328c41d77b3a06ad09cf5454001bb6f22610c97772d5588839297b6115a492d09bb2394cc0fe904e3bc24ff4b4cdcf4467cd9003
7
- data.tar.gz: ee471c17de149878638b407316154a773941ee7642a96118cf03c7c9daf3d56e18fdf9a0cf8af3207be7da05864d803813076917ff0c0654d31701391b144ff0
6
+ metadata.gz: 866583abf80bbf971b345e23e1b54a430542ad4f5b0578e7973761c88065ba8875c3ef6f724a4291e8c16ff35163e461db0ee563eda438b11539b5f7d7fa2409
7
+ data.tar.gz: 68e43613edfaa724c954541b4788a2365a0faa8e32d726ae84610255ad214b0d40c2ff84c830e8f44c73bbb9e00c9ab06708f614796f13738fcb7d2ca5f24056
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,39 @@
1
1
  # Change Log
2
2
 
3
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.
4
+ This project *tries* to adhere to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [8.0.0.rc2] - 2022-02-23
7
+
8
+ * restructure builder and helpers
9
+ * improve template_evaluation_error
10
+ * lono seed --where option and config.seed.where
11
+ * return nil when output not found
12
+ * setup configsets finalizer
13
+ * template_file helper
14
+ * fix coder
15
+ * lono s3 bucket auto-creation
16
+
17
+ ## [8.0.0.rc1] - 2022-02-21
18
+
19
+ * v8 cleaner and simplier interface
20
+ * commands: lono up, down, bundle, list, new, output, plan
21
+ * conventional stack name
22
+ * lono new generators
23
+ * improve lono plan previews
24
+ * improve layering
25
+ * boot hooks
26
+ * change default env to dev
27
+ * app config support: config.names.stack, etc
28
+ * change --sure to --yes option
29
+ * remove core settings in favor of config/app.rb
30
+ * logger support
31
+ * remove docs. move to separate repo
32
+ * plugin system and test framework
33
+
34
+ ## [7.5.2] - 2022-02-08
35
+ - [#74](https://github.com/boltops-tools/lono/pull/74) activesupport require fix
36
+ - fix activesupport require
5
37
 
6
38
  ## [7.5.1] - 2021-05-03
7
39
  - remove registration check
@@ -133,7 +165,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
133
165
  ## [6.1.9]
134
166
  - #30 fix md5 sum calcuation for single file
135
167
  - #31 Add app files ERB support docs
136
- - options `--sure` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
168
+ - options `-y` and `--iam` add `CAPABILITY_AUTO_EXPAND` for serverless transform
137
169
 
138
170
  ## [6.1.8]
139
171
  - #28 add user_data_script helper
@@ -239,7 +271,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
239
271
 
240
272
  ## [5.2.2]
241
273
  - seed only support params for main conventional template in blueprint
242
- - set --iam with --sure option also
274
+ - set --iam with -y option also
243
275
 
244
276
  ## [5.2.1]
245
277
  - improve param lookup
@@ -261,7 +293,7 @@ This project *tries* to adhere to [Semantic Versioning](http://semver.org/), eve
261
293
  ## [5.0.1]
262
294
  - Introduce lono DSL and set as default mode
263
295
  - Introduce blueprints concept
264
- - Introduce lono cfn deploy command
296
+ - Introduce lono up command
265
297
  - Auto-create lono managed s3 bucket
266
298
  - Zeitwerk autoloader
267
299
  - 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,8 @@ 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
+ if ENV['C9_USER']
7
+ gem "rspec-lono", path: "~/boltops-tools/rspec-lono"
8
+ else
9
+ gem "rspec-lono", git: "https://github.com/boltops-tools/rspec-lono", branch: "master"
10
+ 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
@@ -5,7 +5,6 @@
5
5
  # Lono
6
6
 
7
7
  ![CodeBuild](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiYTloZ3dBZkZTYnlTaU1ZZTMvenROM1dmY2lDZzE0MDRVZ2d6NXdqb2JmSXNrQ3pkVGpKRTJMMnhTNDlOYUNOUlZZUmR6TktGcXRWMVFoYzhrSXFZWVZNPSIsIml2UGFyYW1ldGVyU3BlYyI6IkkrSGlFcTBWUjMzbk5xVGYiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
8
- [![CircleCI](https://circleci.com/gh/tongueroo/lono.svg?style=svg)](https://circleci.com/gh/tongueroo/lono)
9
8
  [![Support](https://img.shields.io/badge/get-support-blue.svg)](https://boltops.com?utm_source=badge&utm_medium=badge&utm_campaign=lono)
10
9
 
11
10
  [![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
@@ -19,7 +18,7 @@ Lono is a CloudFormation framework. It builds, manages, and deploys CloudFormati
19
18
  * Simple CLI interface to launch CloudFormation stacks.
20
19
  * Ability to use [Existing CloudFormation Templates](https://lono.cloud/docs/existing-templates/).
21
20
  * [The Lono DSL](https://lono.cloud/docs/dsl/) - Generate templates from beautiful code.
22
- * 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/).
23
22
  * Preview CloudFormation changes before pressing the big red button.
24
23
  * [Layering](https://lono.cloud/docs/core/layering/) - Allows you to build multiple environments like development and production with the same template.
25
24
  * [Variables](https://lono.cloud/docs/layering/variables/) - Allows you to construct templates where runtime Parameters do not suffice.
@@ -28,19 +27,14 @@ Lono is a CloudFormation framework. It builds, manages, and deploys CloudFormati
28
27
 
29
28
  See [lono.cloud](http://lono.cloud) for full lono documentation.
30
29
 
31
- ## Upgrading
32
-
33
- 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/).
34
-
35
30
  ## Quick Usage
36
31
 
37
32
  It only takes a couple of commands to start using lono.
38
33
 
39
- gem install lono
40
- lono new infra
34
+ gem install lono --prerelease
35
+ lono new project infra --examples
41
36
  cd infra
42
- lono blueprint new demo
43
- lono cfn deploy demo
37
+ lono up demo
44
38
 
45
39
  ![Lono flowchart](https://lono.cloud/img/tutorial/lono-flowchart.png "Lono flowchart")
46
40
 
@@ -74,9 +68,9 @@ output("SecurityGroup", get_att("SecurityGroup.GroupId"))
74
68
 
75
69
  ### Lono Cfn Deploy
76
70
 
77
- 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:
78
72
 
79
- $ lono cfn deploy demo
73
+ $ lono up demo
80
74
 
81
75
  ## Contributing
82
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,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
data/lib/lono/app.rb ADDED
@@ -0,0 +1,74 @@
1
+ module Lono
2
+ class App
3
+ extend Memoist
4
+ include DslEvaluator
5
+ include Singleton
6
+ include Lono::Utils::Logging
7
+
8
+ attr_reader :config
9
+ def initialize
10
+ @config = defaults
11
+ end
12
+
13
+ def defaults
14
+ config = ActiveSupport::OrderedOptions.new
15
+
16
+ config.log = ActiveSupport::OrderedOptions.new
17
+ config.log.root = Lono.log_root
18
+ config.logger = lono_logger
19
+ config.logger.formatter = Logger::Formatter.new
20
+ config.logger.level = ENV['LONO_LOG_LEVEL'] || :info
21
+
22
+ config.names = ActiveSupport::OrderedOptions.new
23
+ config.names.stack = ":APP-:BLUEPRINT-:ENV"
24
+ config.names.output = ActiveSupport::OrderedOptions.new
25
+ config.names.output.stack = ":BLUEPRINT-:ENV" # does not include APP by default. Think this is more common
26
+ config.names.output.expand = true
27
+
28
+ config.paths = ActiveSupport::OrderedOptions.new
29
+ config.paths.scripts = "scripts"
30
+ config.paths.content = "content"
31
+ config.paths.helpers = "helpers"
32
+ config.paths.user_data = "user_data"
33
+
34
+ config.up = ActiveSupport::OrderedOptions.new
35
+ config.up.capabilities = nil
36
+ config.up.notification_arns = nil
37
+ config.up.rollback = true
38
+ config.up.tags = nil
39
+
40
+ config.diff = ActiveSupport::OrderedOptions.new
41
+ config.diff.changeset = true
42
+ config.diff.params = "full"
43
+ config.diff.template = "summary" # summary is same as true
44
+
45
+ config.extract_scripts = {}
46
+
47
+ config.test = ActiveSupport::OrderedOptions.new
48
+ config.test.framework = "rspec"
49
+
50
+ config.layering = ActiveSupport::OrderedOptions.new
51
+ config.layering.names = {}
52
+
53
+ config.seed = ActiveSupport::OrderedOptions.new
54
+ config.seed.where = "config"
55
+
56
+ config
57
+ end
58
+
59
+ def lono_logger
60
+ Logger.new(ENV['LONO_LOG_PATH'] || $stderr)
61
+ end
62
+ memoize :lono_logger
63
+
64
+ def configure
65
+ yield(@config)
66
+ end
67
+
68
+ def load_project_config
69
+ evaluate_file("#{Lono.root}/config/app.rb")
70
+ path = "#{Lono.root}/config/envs/#{Lono.env}.rb"
71
+ evaluate_file(path)
72
+ end
73
+ end
74
+ end
@@ -1,6 +1,6 @@
1
1
  # Naming AppFile instead of File so we dont to use ::File for normal regular File class
2
2
  module Lono::AppFile
3
- class Base < Lono::AbstractBase
3
+ class Base < Lono::CLI::Base
4
4
  # What's needed for a Thor::Group or "Sequence". Gives us Thor::Actions commands like create_file
5
5
  # Must be included before `def initialize` as we override the Thor initialize
6
6
  include Thor::Actions