roro 0.3.17 → 0.3.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +108 -70
  3. data/.gitignore +35 -8
  4. data/.ruby-version +1 -0
  5. data/Gemfile +1 -1
  6. data/Guardfile +23 -13
  7. data/README.md +11 -11
  8. data/bin/console +1 -1
  9. data/bin/setup +1 -1
  10. data/docker-compose.yml +3 -3
  11. data/lib/roro/cli/generate/generate.rb +52 -1
  12. data/lib/roro/cli/generate/generate_containers.rb +23 -0
  13. data/lib/roro/cli/generate/generate_environments.rb +25 -0
  14. data/lib/roro/cli/generate/generate_exposed.rb +11 -0
  15. data/lib/roro/cli/generate/generate_keys.rb +15 -0
  16. data/lib/roro/cli/generate/generate_mise.rb +13 -0
  17. data/lib/roro/cli/generate/generate_obfuscated.rb +14 -0
  18. data/lib/roro/cli/roll_your_own.rb +12 -0
  19. data/lib/roro/cli/rollon.rb +16 -16
  20. data/lib/roro/cli.rb +33 -17
  21. data/lib/roro/common/file_reflection.rb +33 -0
  22. data/lib/roro/common/utilities.rb +185 -0
  23. data/lib/roro/configurator.rb +15 -0
  24. data/lib/roro/configurators/adventure_case_builder.rb +65 -0
  25. data/lib/roro/configurators/adventure_chooser.rb +46 -0
  26. data/lib/roro/configurators/adventure_picker.rb +68 -0
  27. data/lib/roro/configurators/adventure_writer.rb +34 -0
  28. data/lib/roro/configurators/catalog_builder.rb +17 -0
  29. data/lib/roro/configurators/configurator.rb +64 -0
  30. data/lib/roro/configurators/eligibility.rb +141 -0
  31. data/lib/roro/configurators/question_asker.rb +29 -0
  32. data/lib/roro/configurators/question_builder.rb +83 -0
  33. data/lib/roro/configurators/structure_builder.rb +34 -0
  34. data/lib/roro/configurators/utilities.rb +188 -0
  35. data/lib/roro/configurators/validator.rb +109 -0
  36. data/lib/roro/crypto/cipher.rb +35 -0
  37. data/lib/roro/crypto/exposer.rb +33 -0
  38. data/lib/roro/crypto/file_writer.rb +14 -0
  39. data/lib/roro/crypto/key_writer.rb +35 -0
  40. data/lib/roro/crypto/obfuscator.rb +25 -0
  41. data/lib/roro/error.rb +31 -0
  42. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/fatsufodo.yml +1 -0
  43. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml +38 -0
  44. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/Dockerfile.tt +7 -0
  45. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
  46. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/requirements.txt.tt +2 -0
  47. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_two/settings.py +130 -0
  48. data/lib/roro/{cli/templates/base/jumpstart → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/dummy}/.keep +0 -0
  49. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/stage_one_test.rb +37 -0
  50. data/lib/roro/{cli/templates/base/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_two/dummy}/.keep +0 -0
  51. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/expressjs.yml +8 -0
  52. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
  53. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
  54. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/flask.yml +14 -0
  55. data/lib/roro/{cli/templates/base/roro/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one}/.keep +0 -0
  56. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/Dockerfile +11 -0
  57. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/app.py +23 -0
  58. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/docker-compose.yml +8 -0
  59. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/requirements.txt +2 -0
  60. data/lib/roro/{cli/templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
  61. data/lib/roro/{cli/templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
  62. data/lib/roro/{cli/templates/base/roro/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_dummy}/.keep +0 -0
  63. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_test.rb +37 -0
  64. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/rails.yml +12 -0
  65. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  66. data/lib/roro/{cli/templates/rails/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
  67. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  68. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/docker-compose.yml.tt +9 -0
  69. data/lib/roro/{cli/templates/rails/roro/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
  70. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_two/database.yml.tt +16 -0
  71. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
  72. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/wordpress.yml +17 -0
  73. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/okonomi.yml +1 -0
  74. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/roll_your_own.yml +23 -0
  75. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/%interpolated_story_name%.yml.tt +10 -0
  76. data/lib/roro/{cli/templates/rails → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/templates/stage_one}/.keep +0 -0
  77. data/lib/roro/{cli/templates/rails/database/with_postgresql → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test}/.keep +0 -0
  78. data/lib/roro/{cli/templates/rails/dotenv → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one}/.keep +0 -0
  79. data/lib/roro/{cli/templates/rails/roro → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_dummy}/.keep +0 -0
  80. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/templates/stage_one/%interpolated_stack_path%/test/stage_one/stage_test.rb.tt +37 -0
  81. data/lib/roro/{cli/templates/rails/roro/containers → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/dummy}/.keep +0 -0
  82. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/stage_one_test.rb +58 -0
  83. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/omakase.yml +1 -0
  84. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/rails.yml +13 -0
  85. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  86. data/lib/roro/{cli/templates/rails/roro/containers/app/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
  87. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  88. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
  89. data/lib/roro/{cli/templates/rails/roro/docker-entrypoint.sh.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh} +1 -1
  90. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_two/database.yml.tt +16 -0
  91. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/.env +38 -0
  92. data/lib/roro/{cli/templates/rails/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one}/.keep +0 -0
  93. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/LICENSE +674 -0
  94. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/README.md +346 -0
  95. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/build.sh +39 -0
  96. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-custom-configs.conf +117 -0
  97. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-wp-hardening.conf +131 -0
  98. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-http.conf.template +103 -0
  99. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-https.conf.example +123 -0
  100. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/php.conf.ini +3 -0
  101. data/lib/roro/{cli/templates/rails/roro/roro/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/conf/.placeholder} +0 -0
  102. data/lib/roro/{cli/templates/rails/roro/roro/containers/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/www/.placeholder} +0 -0
  103. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-build.yml +24 -0
  104. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-dev.yml +96 -0
  105. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-prod.yml +147 -0
  106. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/dump_mysql.sh +16 -0
  107. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/init_letsencrypt.sh +80 -0
  108. data/lib/roro/{cli/templates/rails/roro/roro/containers/app/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/mysql-dumps/.placeholder} +0 -0
  109. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/push.sh +22 -0
  110. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/Dockerfile +14 -0
  111. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/adduser.sh +15 -0
  112. data/lib/roro/{cli/templates/rails/roro/roro/containers/frontend/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-sql/.placeholder} +0 -0
  113. data/lib/roro/{cli/templates/ruby_gem/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-src/.placeholder} +0 -0
  114. data/lib/roro/{cli/templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
  115. data/lib/roro/{cli/templates/ruby_gem/roro/keys → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
  116. data/lib/roro/{cli/templates/stories → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_dummy}/.keep +0 -0
  117. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb +40 -0
  118. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/wordpress.yml +76 -0
  119. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/fatsufodo.yml +1 -0
  120. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml +36 -0
  121. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt +7 -0
  122. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
  123. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/requirements.txt.tt +2 -0
  124. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_two/settings.py +130 -0
  125. data/lib/roro/{cli/templates/stories/with_postgresql → stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/dummy}/.keep +0 -0
  126. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/stage_one_test.rb +37 -0
  127. data/{roro/containers → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_two/dummy}/.keep +0 -0
  128. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/expressjs.yml +7 -0
  129. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
  130. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
  131. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/rails.yml +12 -0
  132. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  133. data/{roro/keys/.keep → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
  134. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  135. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
  136. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/entrypoint.sh +8 -0
  137. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_two/database.yml.tt +16 -0
  138. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/__MACOSX/scripts/._.DS_Store +0 -0
  139. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/.DS_Store +0 -0
  140. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/bundler.sh +22 -0
  141. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/git.sh +21 -0
  142. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/rvm.sh +38 -0
  143. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/utilities.sh +53 -0
  144. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base.sh +6 -0
  145. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_idea.sh +14 -0
  146. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_repos.sh +33 -0
  147. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_correct_bundler.sh +21 -0
  148. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_rubies.sh +6 -0
  149. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize.sh +18 -0
  150. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/roro.sh +15 -0
  151. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/source.sh +28 -0
  152. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/bundle_all.sh +12 -0
  153. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/git_pull_all.sh +15 -0
  154. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/rvm_install_all.sh +12 -0
  155. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/yarn_install_all.sh +10 -0
  156. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
  157. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/wordpress.yml +16 -0
  158. data/{sandbox → lib/roro/stacks/library/roro}/.keep +0 -0
  159. data/lib/roro/stacks/library/roro/docker_compose/docker-compose.yml +22 -0
  160. data/lib/roro/stacks/library/roro/k8s/k8s.yml +15 -0
  161. data/lib/roro/stacks/library/roro/plots/node/.keep +0 -0
  162. data/lib/roro/stacks/library/roro/plots/node/node.yml +22 -0
  163. data/lib/roro/stacks/library/roro/plots/php/.keep +0 -0
  164. data/lib/roro/stacks/library/roro/plots/php/php.yml +22 -0
  165. data/lib/roro/stacks/library/roro/plots/python/plots/django/.keep +0 -0
  166. data/lib/roro/stacks/library/roro/plots/python/plots/django/django.yml +10 -0
  167. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/Dockerfile +7 -0
  168. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/docker-compose.yml +20 -0
  169. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/requirements.txt +2 -0
  170. data/lib/roro/stacks/library/roro/plots/python/plots/flask/flask.yml +0 -0
  171. data/lib/roro/stacks/library/roro/plots/python/python.yml +1 -0
  172. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/.keep +0 -0
  173. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/mysql.yml +22 -0
  174. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/postgres.yml +22 -0
  175. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/rails.yml +22 -0
  176. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/templates/.keep +0 -0
  177. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/rails_react.yml +22 -0
  178. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/templates/.keep +0 -0
  179. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/rails_vue.yml +22 -0
  180. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/templates/.keep +0 -0
  181. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/rails.yml +16 -0
  182. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/templates/.keep +0 -0
  183. data/lib/roro/stacks/library/roro/plots/ruby/plots/ruby_gem/ruby_gem.yml +22 -0
  184. data/lib/roro/stacks/library/roro/plots/ruby/ruby.yml +22 -0
  185. data/lib/roro/stacks/library/roro/roro/roro.yml +15 -0
  186. data/lib/roro/stacks/stories_v1/greenfield/rails.yml +9 -0
  187. data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
  188. data/lib/roro/stacks/stories_v1/greenfield.yml +1 -0
  189. data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd/circleci.yml +2 -0
  190. data/lib/roro/stacks/stories_v1/rollon/rails/ci_cd.yml +1 -0
  191. data/lib/roro/stacks/stories_v1/rollon/rails/database/mysql.yml +17 -0
  192. data/lib/roro/stacks/stories_v1/rollon/rails/database/postgresql.yml +15 -0
  193. data/lib/roro/stacks/stories_v1/rollon/rails/database.yml +9 -0
  194. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/default.yml +1 -0
  195. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql/edge.yml +1 -0
  196. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
  197. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes.yml +1 -0
  198. data/lib/roro/stacks/stories_v1/rollon/rails.yml +76 -0
  199. data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
  200. data/lib/roro/stacks/stories_v1/rollon/ruby_gem.yml +5 -0
  201. data/lib/roro/stacks/stories_v1/rollon.yml +42 -0
  202. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
  203. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/config.yml.tt +4 -6
  204. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/jobs/_build.yml +4 -6
  205. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_push.yml +11 -0
  206. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
  207. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/.circleci/setup-gem-credentials.sh +0 -0
  208. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/workflows/_build_test_push.yml +12 -0
  209. data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
  210. data/lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt +51 -0
  211. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.mysql.yml +0 -0
  212. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/config/database.pg.yml +2 -3
  213. data/lib/roro/stacks/stories_v1/templates/rails/database/with_mysql/_service.yml +10 -0
  214. data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/.keep +0 -0
  215. data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/_service.yml +7 -0
  216. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/docker-compose.yml.tt +3 -3
  217. data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
  218. data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.mysql.env.tt +6 -0
  219. data/lib/roro/stacks/stories_v1/templates/rails/dotenv/database.pg.env.tt +4 -0
  220. data/lib/roro/{cli → stacks/stories_v1}/templates/rails/dotenv/web.env.tt +0 -0
  221. data/lib/roro/stacks/stories_v1/templates/rails/kube.rake.tt +114 -0
  222. data/lib/roro/stacks/stories_v1/templates/rails/roro/.keep +0 -0
  223. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/.keep +0 -0
  224. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/.keep +0 -0
  225. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/Dockerfile.tt +34 -0
  226. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
  227. data/lib/roro/{cli/templates/base/roro/roro/docker-entrypoint.sh.tt → stacks/stories_v1/templates/rails/roro/docker-entrypoint.sh} +0 -0
  228. data/lib/roro/stacks/stories_v1/templates/rails/roro/keys/.keep +0 -0
  229. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/.keep +0 -0
  230. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/certificate.yml.tt +0 -0
  231. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/cluster-issuer.yml.tt +0 -0
  232. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployment.yml.tt +50 -0
  233. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/postgres_deploy.yaml +47 -0
  234. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/rails_deploy.yaml +62 -0
  235. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/redis_deploy.yaml +23 -0
  236. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/deployments/sidekiq_deploy.yaml +56 -0
  237. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
  238. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingresses/ingress.yaml +13 -0
  239. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
  240. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/jobs/setup.yaml +42 -0
  241. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/secret-digital-ocean.yml.tt +4 -0
  242. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/service.yml.tt +10 -0
  243. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/postgres_svc.yaml +13 -0
  244. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/rails_svc.yaml +13 -0
  245. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/services/redis_svc.yaml +13 -0
  246. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/volumes/postgres_volumes.yaml +25 -0
  247. data/lib/roro/stacks/stories_v1/templates/roro/containers/.keep +0 -0
  248. data/lib/roro/stacks/stories_v1/templates/roro/containers/database/env/.keep +0 -0
  249. data/lib/roro/stacks/stories_v1/templates/roro/containers/database/scripts/.keep +0 -0
  250. data/lib/roro/stacks/stories_v1/templates/roro/env/.keep +0 -0
  251. data/lib/roro/stacks/stories_v1/templates/roro/keys/.keep +0 -0
  252. data/lib/roro/stacks/stories_v1/templates/roro/scripts/.keep +0 -0
  253. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/bundler.sh +22 -0
  254. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/git.sh +21 -0
  255. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/rvm.sh +38 -0
  256. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/utilities.sh +53 -0
  257. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base.sh +6 -0
  258. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_idea.sh +14 -0
  259. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_repos.sh +33 -0
  260. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_correct_bundler.sh +21 -0
  261. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_rubies.sh +6 -0
  262. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize.sh +18 -0
  263. data/lib/roro/stacks/stories_v1/templates/roro/scripts/roro.sh +15 -0
  264. data/lib/roro/stacks/stories_v1/templates/roro/scripts/source.sh +28 -0
  265. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/bundle_all.sh +12 -0
  266. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/git_pull_all.sh +15 -0
  267. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/rvm_install_all.sh +12 -0
  268. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/yarn_install_all.sh +10 -0
  269. data/lib/roro/stacks/stories_v1/templates/ruby_gem/.circleci/.keep +0 -0
  270. data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/config.yml.tt +4 -4
  271. data/lib/roro/{cli/templates/base/.circleci/jobs/_build.yml → stacks/stories_v1/templates/ruby_gem/.circleci/jobs/_test.yml} +2 -2
  272. data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
  273. data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/docker-compose.yml +1 -1
  274. data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/.keep +0 -0
  275. data/lib/roro/{cli → stacks/stories_v1}/templates/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +1 -1
  276. data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +1 -0
  277. data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/keys/.keep +0 -0
  278. data/lib/roro/version.rb +1 -1
  279. data/lib/roro.rb +60 -4
  280. data/mise/containers/ruby_gem/Dockerfile +16 -0
  281. data/mise/containers/ruby_gem/Dockerfile-app +51 -0
  282. data/{roro/containers/ruby_image/Dockerfile → mise/containers/ruby_gem/Dockerfile-ruby_gem} +0 -0
  283. data/mise/containers/ruby_gem/env/.keep +0 -0
  284. data/mise/containers/ruby_gem/env/base.env.enc +1 -0
  285. data/mise/containers/ruby_gem/env/ci.env.enc +2 -0
  286. data/mise/containers/ruby_gem/env/development.env.enc +1 -0
  287. data/mise/containers/ruby_gem/env/production.env.enc +1 -0
  288. data/mise/containers/ruby_gem/scripts/.keep +0 -0
  289. data/mise/env/base.env.enc +1 -0
  290. data/mise/env/ci.env.enc +1 -0
  291. data/mise/env/development.env.enc +1 -0
  292. data/mise/env/production.env.enc +1 -0
  293. data/mise/mise.roro +0 -0
  294. data/process.yml +401 -0
  295. data/roro.gemspec +8 -11
  296. metadata +353 -111
  297. data/lib/roro/cli/base/base.rb +0 -8
  298. data/lib/roro/cli/base/base_files.rb +0 -24
  299. data/lib/roro/cli/base/check_dependencies.rb +0 -97
  300. data/lib/roro/cli/base/continuous_integration.rb +0 -13
  301. data/lib/roro/cli/base/insert_gems.rb +0 -31
  302. data/lib/roro/cli/base/insertions.rb +0 -19
  303. data/lib/roro/cli/base/utilities.rb +0 -38
  304. data/lib/roro/cli/configuration.rb +0 -69
  305. data/lib/roro/cli/generate/config/rails.rb +0 -17
  306. data/lib/roro/cli/generate/config.rb +0 -11
  307. data/lib/roro/cli/generate/exposed.rb +0 -14
  308. data/lib/roro/cli/generate/keys.rb +0 -69
  309. data/lib/roro/cli/generate/obfuscated.rb +0 -17
  310. data/lib/roro/cli/greenfield/rails.rb +0 -36
  311. data/lib/roro/cli/rollon/rails/database/with_mysql.rb +0 -22
  312. data/lib/roro/cli/rollon/rails/database/with_postgresql.rb +0 -21
  313. data/lib/roro/cli/rollon/rails/database.rb +0 -30
  314. data/lib/roro/cli/rollon/rails.rb +0 -47
  315. data/lib/roro/cli/rollon/ruby_gem/with_ci_cd.rb +0 -45
  316. data/lib/roro/cli/rollon/ruby_gem.rb +0 -1
  317. data/lib/roro/cli/rollon/stories/stories.rb +0 -3
  318. data/lib/roro/cli/rollon/stories.rb +0 -2
  319. data/lib/roro/cli/roro_configurator.yml +0 -157
  320. data/lib/roro/cli/templates/base/.circleci/_defaults.yml +0 -17
  321. data/lib/roro/cli/templates/base/.circleci/_workflow.yml +0 -2
  322. data/lib/roro/cli/templates/base/.circleci/config.job-example.yml +0 -33
  323. data/lib/roro/cli/templates/base/.circleci/jobs/_release.yml +0 -12
  324. data/lib/roro/cli/templates/base/.circleci/workflows/_build_release.yml +0 -10
  325. data/lib/roro/cli/templates/base/.dockerignore +0 -51
  326. data/lib/roro/cli/templates/base/.roro_config.yml +0 -15
  327. data/lib/roro/cli/templates/base/dotenv +0 -1
  328. data/lib/roro/cli/templates/base/jumpstart/Dockerfile.tt +0 -30
  329. data/lib/roro/cli/templates/base/jumpstart/docker-compose.yml +0 -59
  330. data/lib/roro/cli/templates/base/jumpstart/docker-entrypoint.sh +0 -16
  331. data/lib/roro/cli/templates/base/livereload/hosts.example +0 -7
  332. data/lib/roro/cli/templates/rails/.circleci/_aliases.yml +0 -8
  333. data/lib/roro/cli/templates/rails/.circleci/jobs/_push.yml +0 -23
  334. data/lib/roro/cli/templates/rails/.circleci/jobs/_test.yml +0 -13
  335. data/lib/roro/cli/templates/rails/.circleci/workflows/_build_test_push.yml +0 -9
  336. data/lib/roro/cli/templates/rails/Dockerfile.greenfield.tt +0 -47
  337. data/lib/roro/cli/templates/rails/database/with_mysql/_service.yml +0 -10
  338. data/lib/roro/cli/templates/rails/database/with_postgresql/_service.yml +0 -7
  339. data/lib/roro/cli/templates/rails/dotenv/database.mysql.env.tt +0 -3
  340. data/lib/roro/cli/templates/rails/dotenv/database.pg.env.tt +0 -4
  341. data/lib/roro/cli/templates/rails/roro/containers/app/Dockerfile.tt +0 -88
  342. data/lib/roro/cli/templates/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -1
  343. data/lib/roro/cli/templates/stories/ruby_gem/with_ci_cd/_build.yml +0 -11
  344. data/lib/roro/cli/templates/stories/with_mysql/_service.yml +0 -10
  345. data/lib/roro/cli/templates/stories/with_postgresql/_service.yml +0 -7
  346. data/lib/tasks/deploy.rake +0 -126
  347. data/roro/containers/ruby_image/ci.env.enc +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4ff432672046f38d4adb0214e9c5125be36183f2
4
- data.tar.gz: 5559ed50720181a77d4af026cd3b0b8bff90b674
2
+ SHA256:
3
+ metadata.gz: c3367a0100cab60651928187b96db25f1a4ecaecca166afde2621e0fd09f4b17
4
+ data.tar.gz: 851e7f8fe51e02c206a506350d353a3f4663265d7568c61dc359c394ae5599f9
5
5
  SHA512:
6
- metadata.gz: 44d46961f02e97b9d21ee5c7e76f2e4d1708824c3bb50dbb24291bdc3f3c9fa64c4c2ffeb70ff235c685898e4224bc6ba558f51a6158a68888f63d2be904bb77
7
- data.tar.gz: 2b3d2e7129581279a7bca13f36a3a1287e06041b8ba1e2880251ca4aa65217cd47947c31d511509b724bf5d64119a31c47da1cb7afc82165922bc126322a31f9
6
+ metadata.gz: 4326d8ca1ec1a6bbd16a48403bf2f754799c46b29a83043d2b1d04c7165ba46073ebd0d8f4092ce0b8a8ea1476962ffeea4a260bd98b0808ce73820abe85017e
7
+ data.tar.gz: 5b7a70514ba7174f5a68dc07accf606374a20f441d7a76f46c728bc602e6b2f3a49bbc40c8e713b907d2f3fb7816e95d255a27abc12ac9f708da00a536765fff
data/.circleci/config.yml CHANGED
@@ -1,92 +1,130 @@
1
- aliases:
2
- - &workspace-location
3
- at: /tmp/workspace
4
- - &copy-ci-dotenv |
5
- cp -rf /tmp/workspace/roro .
6
- - &source-ci-variables |
7
- echo 'source roro/containers/app/ci.env' >> $BASH_ENV
8
- source $BASH_ENV
9
-
10
- defaults: &defaults
11
- executor: machine-executor
12
- working_directory: ~/project
13
-
14
1
  version: 2.1
15
2
 
16
3
  executors:
17
- machine-executor:
18
- machine: true
19
- ruby-executor:
4
+ ruby-executor:
20
5
  docker:
21
6
  - image: cimg/ruby:2.7
22
-
23
- jobs:
7
+ linux:
8
+ docker:
9
+ - image: cimg/ruby:2.7
10
+ mac:
11
+ macos:
12
+ xcode: 11.4
13
+ ruby:
14
+ parameters:
15
+ version:
16
+ description: "version tag"
17
+ default: "2.5"
18
+ type: string
19
+ docker:
20
+ - image: cimg/ruby:<<parameters.version>>
21
+
22
+ defaults: &defaults
23
+ executor: ruby
24
24
 
25
+ major_only: &major_only
26
+ filters:
27
+ branches:
28
+ only: master
29
+
30
+ release: &release
31
+ filters:
32
+ branches:
33
+ only: release
34
+
35
+ commands:
36
+ run-test-case:
37
+ parameters:
38
+ answers:
39
+ type: string
40
+ default: "1\n2"
41
+ os:
42
+ type: executor
43
+ steps:
44
+ - run: |
45
+ rake install &&
46
+ printf "<< parameters.answers >>\ny\ny\ny\ny\ny\ny\ny$var\n" | roro rollon
47
+ - run: echo 'success'
48
+
49
+ jobs:
25
50
  build:
26
51
  <<: *defaults
27
52
  steps:
28
53
  - checkout
29
-
30
- test-rollon-rails:
31
- executor: ruby-executor
32
- steps:
33
- - checkout
54
+
55
+ test-against-ruby:
56
+ parameters:
57
+ version:
58
+ description: "version tag"
59
+ default: "3.0"
60
+ type: string
61
+ executor:
62
+ name: ruby
63
+ version: <<parameters.version>>
64
+ steps:
65
+ - checkout
66
+ - run: gem install bundler
67
+ - run: bundle
68
+ - run: bundle exec rake test
69
+
70
+ test-rollon:
71
+ parameters:
72
+ answers:
73
+ type: string
74
+ default: "1\n4"
75
+ os:
76
+ type: executor
77
+ default: linux
78
+ executor: << parameters.os >>
79
+ steps:
80
+ - checkout
34
81
  - setup_remote_docker:
35
82
  version: 19.03.12
36
83
  - run: |
37
- rake install
38
- mkdir greenfield
39
- cd greenfield
40
- (yes || true) | roro greenfield
84
+ rake install &&
85
+ printf "<< parameters.answers >>\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny$var\n" | roro rollon
41
86
  - run: echo 'success'
42
-
43
- test:
44
- <<: *defaults
45
- steps:
46
- - checkout
47
- - run: RUBY_VERSION=2.5 docker-compose build ruby_gem
48
- - run: RUBY_VERSION=2.5 docker-compose up -d --force-recreate ruby_gem
49
- - run: RUBY_VERSION=2.5 docker-compose run ruby_gem bundle exec rake test
50
- - run: RUBY_VERSION=2.6 docker-compose build ruby_gem
51
- - run: RUBY_VERSION=2.6 docker-compose up -d --force-recreate ruby_gem
52
- - run: RUBY_VERSION=2.6 docker-compose run ruby_gem bundle exec rake test
53
- - run: RUBY_VERSION=2.7 docker-compose build ruby_gem
54
- - run: RUBY_VERSION=2.7 docker-compose up -d --force-recreate ruby_gem
55
- - run: RUBY_VERSION=2.7 docker-compose run ruby_gem bundle exec rake test
56
-
87
+
57
88
  release:
58
89
  <<: *defaults
59
90
  steps:
60
91
  - checkout
61
- - run: gem install roro
62
- - run: roro generate::exposed ci
63
- - run: |
64
- echo $(cat ./roro/containers/ruby_image/ci.env) >> $BASH_ENV
65
- source $BASH_ENV
66
- - run: chmod +x ./.circleci/setup-gem-credentials.sh
67
- - run: ./.circleci/setup-gem-credentials.sh
68
- - run: chmod 0600 ~/.gem/credentials
69
- - run: git checkout .
70
- - run: gem release
71
-
92
+ - run: rake install
93
+ - run: |
94
+ export CI_KEY="Bx2LCiZo7Gedfz1OV9vh3w=="
95
+ roro generate:exposed ci
96
+ # - run: |
97
+ # echo $(cat ./mise/containers/ruby_image/env/ci.env) >> $BASH_ENV
98
+ # source $BASH_ENV
99
+ # - run: echo $RUBYGEMS_API_KEY
100
+ # - run: chmod +x ./.circleci/setup-gem-credentials.sh
101
+ # - run: ./.circleci/setup-gem-credentials.sh
102
+ # - run: chmod 0600 ./.gem/credentials
103
+ # - run: git checkout .
104
+ # - run: gem release
105
+
72
106
  workflows:
73
- version: 2
74
-
75
- build-cli:
76
- jobs:
107
+ matrix-test-rollon:
108
+ jobs:
109
+ - test-rollon:
110
+ <<: *major_only
111
+ matrix:
112
+ parameters:
113
+ answers: ["1\n1", "1\n2", "1\n3", "1\n4", "1\n5", "2\n1", "3\n1", "3\n2"]
114
+ os: [linux]
115
+
116
+ matrix-test-against-rubies:
117
+ jobs:
118
+ - test-against-ruby:
119
+ <<: *major_only
120
+ matrix:
121
+ parameters:
122
+ version: [ "2.5", "2.6", "2.7", "3.0" ]
123
+
124
+ gem-release:
125
+ jobs:
77
126
  - build
78
- - test-rollon-rails:
79
- filters:
80
- branches:
81
- only: development
82
- - test:
83
- filters:
84
- branches:
85
- only: master
86
-
87
127
  - release:
88
- requires:
128
+ requires:
89
129
  - build
90
- filters:
91
- branches:
92
- only: release
130
+ <<: *release
data/.gitignore CHANGED
@@ -10,15 +10,42 @@ Gemfile.lock
10
10
 
11
11
  roro/**/*.env
12
12
  roro/**/*.key
13
-
14
13
  *.key
15
14
  *.env
15
+ !/lib/roro/stacks/**/*.key
16
+ !/lib/roro/stacks/**/*.env
17
+ !test/**/*.key
18
+ !test/**/*.env
16
19
  !/.gitignore
17
-
20
+ *.gem
18
21
  tmp/*
19
- !tmp/.keep
20
- sandbox/*
21
- !sandbox/.keep
22
- !sandbox/greenfield
23
- sandbox/greenfield/*
24
- !sandbox/greenfield/.keep
22
+ !tmp/.keep
23
+ TUTORIAL.md
24
+
25
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
26
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
27
+
28
+ # User-specific stuff
29
+ .idea/**/workspace.xml
30
+ .idea/**/tasks.xml
31
+ .idea/**/usage.statistics.xml
32
+ .idea/**/dictionaries
33
+ .idea/**/shelf
34
+
35
+ # Generated files
36
+ .idea/**/contentModel.xml
37
+
38
+ # Sensitive or high-churn files
39
+ .idea/**/dataSources/
40
+ .idea/**/dataSources.ids
41
+ .idea/**/dataSources.local.xml
42
+ .idea/**/sqlDataSources.xml
43
+ .idea/**/dynamic.xml
44
+ .idea/**/uiDesigner.xml
45
+ .idea/**/dbnavigator.xml
46
+
47
+ # File-based project format
48
+ *.iws
49
+
50
+ # IntelliJ
51
+ out/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.7.2
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ # git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in roro.gemspec
6
6
  gemspec
data/Guardfile CHANGED
@@ -1,17 +1,27 @@
1
- options = {
2
- all_on_start: true,
3
- all_after_pass: true,
4
- }
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
5
3
 
6
- guard :minitest, options do
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard :minitest, test_folders: ['test', 'lib/roro/stacks'] do
19
+ # with Minitest::Unit
20
+ watch(%r{^lib/roro/stacks/(.*)\/?(.*)_test\.rb$})
21
+ watch(%r{^lib/roro/stacks/(.*/)?([^/]+)\.yml$}) { |m| "lib/roro/stacks/#{m[1]}test" }
22
+ watch(%r{^lib/roro/stacks/(.*/)?templates/(.*)$}) { |m| "lib/roro/stacks/#{m[1]}test" }
7
23
 
8
24
  watch(%r{^test/(.*)\/?(.*)_test\.rb$})
9
- watch(%r{^lib/roro/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
10
- watch(%r{^test/thor_helper\.rb$}) { 'test' }
11
- watch(%r{^lib/roro/cli/(.+)\.rb$}) { |m| "test/cli/#{m[1]}_test.rb" }
12
- watch(%r{^lib/roro/cli/templates/base(.+)\.yml$}) { |m| "test/cli" }
13
- watch(%r{^lib/roro/cli/templates/rollon(.+)\.yml$}) { |m| "test/cli/rollon" }
14
- watch(%r{^lib/roro/cli/templates/rollon(.+)\.tt$}) { |m| "test/cli/rollon" }
15
- watch(%r{^lib/roro/cli/templates/greenfield(.+)\.yml$}) { |m| "test/cli/greenfield" }
16
- watch(%r{^lib/roro/cli/templates/greenfield(.+)\.tt$}) { |m| "test/cli/greenfield" }
25
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
26
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
17
27
  end
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # RoRo
2
2
 
3
- RoRo is a containerization and continuous integration framework for Ruby applications. Like Rails, it favors convention over configuration. It aims to provide everything you need to:
3
+ RoRo is a set of tools and stories for building, running continuous integration tests on, and deploying your containerized projects. It aims to provide everything you need to:
4
4
 
5
- 1. Greenfield a Rails app in its own container that can talk to a separate Postgresql container.
6
- 2. Containerize your existing application and database in development.
7
- 3. Run your tests with Guard in a separate container.
8
- 4. Roll your containers onto CircleCI for testing.
9
- 5. Roll your containers off of CircleCI to your servers.
5
+ 1. Greenfield a new project with a containerized app and database and other containers you might need.
6
+ 2. Containerize your project's existing application, database, and services.
7
+ 3. Roll your project into ci/cd.
8
+ 4. Roll your project onto production servers with kubernetes.
10
9
 
11
10
  ## Getting started
12
11
 
@@ -25,10 +24,10 @@ Commands:
25
24
  roro expose # Expose encrypted files
26
25
  roro generate_key # Generate a key for each environment
27
26
  roro generate_keys # Generates keys for all environments. If you have .en...
28
- roro greenfield # Greenfield a brand new rails app using Docker's inst...
27
+ roro omakase # Greenfield a brand new rails backend using Docker's inst...
29
28
  roro help [COMMAND] # Describe available commands or one specific command
30
29
  roro obfuscate # obfuscates any files matching the pattern ./docker/*...
31
- roro rollon # Generates files necessary to greenfield a new app wi...
30
+ roro rollon # Generates files necessary to omakase a new backend wi...
32
31
  roro ruby_gem # Generate files for containerized gem testing, Circle...
33
32
  ```
34
33
 
@@ -56,7 +55,7 @@ docker-compose version 1.21.0, build 5920eb0
56
55
  ```bash
57
56
  $ mkdir -p handsome_app
58
57
  $ cd handsome_app
59
- $ roro greenfield
58
+ $ roro omakase
60
59
  ```
61
60
 
62
61
  It'll take a few minutes for Docker to download your images, copy your files, and build your application but once finished, you'll see the Rails welcome screen at [http://localhost:3000](http://localhost:3000/).
@@ -95,7 +94,7 @@ As with greenfielding above, wait a few minutes, and when it's finished, open [h
95
94
  From another terminal:
96
95
 
97
96
  ```bash
98
- $ docker-compose exec app bundle exec guard
97
+ $ docker-compose exec backend bundle exec guard
99
98
  ```
100
99
 
101
100
  To use LiveReoload with Guard, install the Chrome [extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en):
@@ -217,4 +216,5 @@ $ docker system prune -af --volumes
217
216
  This gem and its associated practices are just one way of using these tools and not the canonical way. My purpose in publishing it is to get a conversation started about what conventions around these tools might look like. If you have ideas on how to make it better please put in an issue -- or fork the repo, make your changes, write your tests, and send me a pull request. It'll make me feel warm inside.
218
217
 
219
218
  ## License
220
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
219
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
220
+
data/bin/console CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/smart.env ruby
2
2
 
3
3
  require "bundler/setup"
4
4
  require "roro"
data/bin/setup CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bash
1
+ #!/usr/bin/smart.env bash
2
2
  set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
data/docker-compose.yml CHANGED
@@ -5,11 +5,11 @@ services:
5
5
  ruby_gem:
6
6
  build:
7
7
  context: .
8
- dockerfile: roro/containers/ruby_image/Dockerfile
9
- environment:
10
- - RUBY_VERSION=${RUBY_VERSION}
8
+ dockerfile: mise/containers/ruby_gem/Dockerfile
11
9
  volumes:
12
10
  - gem_cache:/gems
11
+ environment:
12
+ RUBY_VERSION: '2.5'
13
13
 
14
14
  volumes:
15
15
  gem_cache:
@@ -1 +1,52 @@
1
- require_relative 'config/rails'
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+ method_option :environments,
6
+ type: :array,
7
+ aliases: :e,
8
+ banner: 'one, two, three',
9
+ desc: 'The environments to generate:',
10
+ default: %w[base ci development production]
11
+
12
+ method_option :containers,
13
+ type: :array,
14
+ aliases: :c,
15
+ banner: 'container_one, container_two, container_three',
16
+ default: %w[backend database frontend],
17
+ desc: 'The containers to generate:'
18
+
19
+ method_option :mise_en_place,
20
+ type: :string,
21
+ aliases: :m,
22
+ default: 'mise',
23
+ desc: "The name of your mise en place folder. This is where your container folders, environment files, scripts, and keys will live"
24
+
25
+ method_option :keys,
26
+ type: :array,
27
+ aliases: :k,
28
+ banner: 'one.key two.key three.key',
29
+ default: %w[base ci development production],
30
+ desc: 'The names of your keys to generate. If none supplied, Roro will infer them from your .env files:'
31
+
32
+ desc 'generate', 'Generate stuff.'
33
+ map 'generate' => 'generate'
34
+
35
+ def generate
36
+ order = %w[mise_en_place containers environments keys]
37
+ order.each do |item|
38
+ value = options[item]
39
+ case item
40
+ when 'mise_en_place'
41
+ generate_mise(value)
42
+ when 'containers'
43
+ generate_containers(*value)
44
+ when 'environments'
45
+ generate_environments(*value)
46
+ when 'keys'
47
+ generate_keys(*value)
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ # Where all the generation, configuration, greenfielding happens.
5
+ class CLI < Thor
6
+ desc 'generate:containers', 'Generate containers.'
7
+ map 'generate:containers' => 'generate_containers'
8
+ method_options :containers => :array
9
+ def generate_containers(*containers)
10
+ mise = Roro::CLI.mise
11
+ containers = options['containers'] || containers.empty? ? %w[frontend backend database] : containers
12
+ # siblings = Dir.glob('./*').select do |f|
13
+ # File.directory?(f)
14
+ # !f.match?(mise)
15
+ # end
16
+ # siblings = options[:containers] ? options[:containers] : default_containers
17
+ containers.each { |s| s.split('/').last }.each do |container|
18
+ create_file("#{mise}/containers/#{container}/scripts/.keep")
19
+ create_file("#{mise}/containers/#{container}/env/.keep")
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+ desc 'generate:environments', 'Generate environment files and keys'
6
+ map 'generate:environments' => 'generate_environments'
7
+
8
+ def generate_environments(*args)
9
+ if args.last.is_a?(Hash)
10
+ hash = args.pop
11
+ end
12
+ default_environments = Roro::CLI.roro_environments
13
+ mise = Roro::CLI.mise
14
+ environments = args.empty? ? default_environments : args
15
+ containers = Dir.glob("./#{mise}/containers/*").select { |f| File.directory?(f) }
16
+ environments.each do |env|
17
+ content = hash&.dig(env.to_sym)&.each&.map {|k,v| "#{k}=#{v[:value]}"}&.join("\n") || 'SOME_KEY=some_value'
18
+ create_file "./#{mise}/env/#{env}.env", content
19
+ containers.each do |container|
20
+ create_file "#{container}/env/#{env}.env", content
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,11 @@
1
+ module Roro
2
+ class CLI < Thor
3
+ desc "generate:exposed", "Decrypts .smart.env.enc files for all environments or those specified."
4
+ map "generate:exposed" => "generate_exposed"
5
+
6
+ def generate_exposed(*environments)
7
+ exposer = Roro::Crypto::Exposer.new
8
+ exposer.expose(environments, Roro::CLI.mise, '.env.enc')
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+ desc 'generate:keys', 'Generates a key for each <environment>.smart.env file.'
6
+
7
+ map 'generate:keys' => 'generate_keys'
8
+ map 'generate:key' => 'generate_keys'
9
+
10
+ def generate_keys(*environments)
11
+ key_writer = Roro::Crypto::KeyWriter.new
12
+ key_writer.write_keyfiles(environments.uniq)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+
6
+ desc 'generate:mise MISE', 'Generate mise en place.'
7
+ map 'generate:mise' => 'generate_mise'
8
+
9
+ def generate_mise(mise_name = 'mise')
10
+ create_file "#{mise_name}/#{mise_name}.roro"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+
6
+ desc 'generate:obfuscated', 'Encrypts .smart.env files for safe storage.'
7
+ map 'generate:obfuscated' => 'generate_obfuscated'
8
+
9
+ def generate_obfuscated(*environments)
10
+ obfuscator = Roro::Crypto::Obfuscator.new
11
+ obfuscator.obfuscate(environments, Roro::CLI.mise, '.env')
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Roro
4
+ class CLI < Thor
5
+ desc 'roll_your_own', 'Generate mise en place'
6
+ map 'roll_your_own' => 'roll_your_own'
7
+
8
+ def roll_your_own(stack_path = nil)
9
+
10
+ end
11
+ end
12
+ end
@@ -1,20 +1,20 @@
1
1
  module Roro
2
2
  class CLI < Thor
3
-
4
- no_commands do
5
-
6
- def configure_for_rollon
7
- confirm_dependencies
8
- @config ||= Roro::Configuration.new(options)
9
- end
10
-
11
- def yaml_from_template(file)
12
- File.read(File.dirname(__FILE__) + "/templates/#{file}")
13
- end
14
-
15
- def take_thor_actions
16
- @config.thor_actions.each {|k, v| eval(k) if v.eql?('y') }
17
- end
3
+
4
+ desc 'rollon', 'Roll a fresh development story into the current directory.'
5
+ map 'rollon' => 'rollon'
6
+
7
+ def rollon
8
+ configurator = Roro::Configurators::Configurator.new
9
+ configurator.rollon
10
+ end
11
+
12
+ desc 'log itineraries', 'logs all possible itineraries in specified location'
13
+ map 'log_itineraries' => 'log_itineraries'
14
+
15
+ def log_itineraries(location = 'test/fixtures/itineraries')
16
+ builder = Roro::Configurators::AdventureCaseBuilder.new
17
+ builder.log_itineraries('test/fixtures/itineraries')
18
18
  end
19
19
  end
20
- end
20
+ end