roro 0.3.18 → 0.3.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (335) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +105 -68
  3. data/.gitignore +34 -8
  4. data/.ruby-version +1 -0
  5. data/Gemfile +1 -1
  6. data/Guardfile +23 -11
  7. data/README.md +9 -10
  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 +11 -138
  20. data/lib/roro/cli.rb +30 -20
  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 +14 -14
  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/{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/{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/{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/{templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
  61. data/lib/roro/{templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
  62. data/lib/roro/{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/{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/{templates/base/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/{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/{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/{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/{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/{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/{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/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh +8 -0
  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/{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/{templates/rails/roro/kube/.keep → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/data/certbot/conf/.placeholder} +0 -0
  102. data/lib/roro/{templates/rails/roro/kube/certificate.yml.tt → 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/{templates/rails/roro/kube/cluster-issuer.yml.tt → 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/{templates/rails/roro/kube/ingress.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-sql/.placeholder} +0 -0
  113. data/lib/roro/{templates/rails/roro/kube/job-migrate.yml.tt → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress-src/.placeholder} +0 -0
  114. data/lib/roro/{templates/ruby_gem/.circleci → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
  115. data/lib/roro/{templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
  116. data/lib/roro/{templates/ruby_gem/roro/keys → 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/{roro/containers → lib/roro/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/keys → 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/{sandbox/.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/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/{stories → stacks/stories_v1}/greenfield/rails.yml +2 -2
  187. data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
  188. data/lib/roro/{stories → stacks/stories_v1}/greenfield.yml +0 -0
  189. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd/circleci.yml +0 -0
  190. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd.yml +0 -0
  191. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/mysql.yml +1 -1
  192. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/postgresql.yml +1 -1
  193. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database.yml +0 -0
  194. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/default.yml +0 -0
  195. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/edge.yml +0 -0
  196. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
  197. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes.yml +0 -0
  198. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails.yml +7 -7
  199. data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
  200. data/lib/roro/{stories → stacks/stories_v1}/rollon/ruby_gem.yml +0 -0
  201. data/lib/roro/{stories → stacks/stories_v1}/rollon.yml +0 -0
  202. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
  203. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/config.yml.tt +0 -0
  204. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_build.yml +1 -1
  205. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_push.yml +1 -1
  206. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
  207. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/setup-gem-credentials.sh +0 -0
  208. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/workflows/_build_test_push.yml +0 -0
  209. data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
  210. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/Dockerfile.greenfield.tt +1 -1
  211. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.mysql.yml +0 -0
  212. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.pg.yml +0 -0
  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/{templates → stacks/stories_v1/templates}/rails/docker-compose.yml.tt +0 -0
  217. data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
  218. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.mysql.env.tt +0 -0
  219. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.pg.env.tt +0 -0
  220. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/web.env.tt +0 -0
  221. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/kube.rake.tt +0 -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/{templates → stacks/stories_v1/templates}/rails/roro/containers/app/Dockerfile.tt +0 -0
  226. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
  227. data/lib/roro/{templates → 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/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployment.yml.tt +0 -0
  233. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/postgres_deploy.yaml +3 -3
  234. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/rails_deploy.yaml +5 -5
  235. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/redis_deploy.yaml +2 -2
  236. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/sidekiq_deploy.yaml +3 -3
  237. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
  238. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/ingresses/ingress.yaml +0 -0
  239. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
  240. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/jobs/setup.yaml +1 -1
  241. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/secret-digital-ocean.yml.tt +0 -0
  242. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/service.yml.tt +0 -0
  243. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/postgres_svc.yaml +2 -2
  244. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/rails_svc.yaml +3 -3
  245. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/redis_svc.yaml +2 -2
  246. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/volumes/postgres_volumes.yaml +0 -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/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/config.yml.tt +0 -0
  271. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/jobs/_test.yml +0 -0
  272. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
  273. data/lib/roro/{templates → 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/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +0 -0
  276. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -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 -5
  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 +352 -131
  297. data/lib/roro/cli/generate/exposed.rb +0 -14
  298. data/lib/roro/cli/generate/keys.rb +0 -69
  299. data/lib/roro/cli/generate/obfuscated.rb +0 -17
  300. data/lib/roro/cli/generate/story.rb +0 -18
  301. data/lib/roro/cli/greenfield/rails.rb +0 -14
  302. data/lib/roro/cli/rollon/rails/base/base.rb +0 -4
  303. data/lib/roro/cli/rollon/rails/base/insert_gems.rb +0 -23
  304. data/lib/roro/cli/rollon/rails/base/insertions.rb +0 -27
  305. data/lib/roro/cli/rollon/rails/database/with_mysql.rb +0 -22
  306. data/lib/roro/cli/rollon/rails/database/with_postgresql.rb +0 -20
  307. data/lib/roro/cli/rollon/rails/database.rb +0 -26
  308. data/lib/roro/cli/rollon/ruby_gem/with_ci_cd.rb +0 -45
  309. data/lib/roro/cli/rollon/ruby_gem.rb +0 -1
  310. data/lib/roro/cli/rollon/stories.rb +0 -2
  311. data/lib/roro/configurator/eligibility.rb +0 -137
  312. data/lib/roro/configurator/okonomi.rb +0 -28
  313. data/lib/roro/configurator/omakase.rb +0 -170
  314. data/lib/roro/stories/rollon/rails/kubernetes/postgresql.yml +0 -10
  315. data/lib/roro/templates/base/.circleci/_aliases.yml +0 -8
  316. data/lib/roro/templates/base/.circleci/_commands.yml +0 -31
  317. data/lib/roro/templates/base/.circleci/_defaults.yml +0 -5
  318. data/lib/roro/templates/base/.circleci/_executors.yml +0 -11
  319. data/lib/roro/templates/base/.circleci/_major_only.yml +0 -4
  320. data/lib/roro/templates/base/.circleci/_version.yml +0 -1
  321. data/lib/roro/templates/base/.circleci/_workflow.yml +0 -2
  322. data/lib/roro/templates/base/.circleci/config.job-example.yml +0 -33
  323. data/lib/roro/templates/base/.circleci/jobs/_build.yml +0 -4
  324. data/lib/roro/templates/base/.circleci/jobs/_release.yml +0 -12
  325. data/lib/roro/templates/base/.circleci/workflows/_build_release.yml +0 -10
  326. data/lib/roro/templates/base/.dockerignore +0 -51
  327. data/lib/roro/templates/base/dotenv +0 -1
  328. data/lib/roro/templates/base/jumpstart/Dockerfile.tt +0 -30
  329. data/lib/roro/templates/base/jumpstart/docker-compose.yml +0 -59
  330. data/lib/roro/templates/base/jumpstart/docker-entrypoint.sh +0 -16
  331. data/lib/roro/templates/base/livereload/hosts.example +0 -7
  332. data/lib/roro/templates/rails/.circleci/jobs/_test.yml +0 -12
  333. data/lib/roro/templates/rails/database/with_mysql/_service.yml +0 -10
  334. data/lib/roro/templates/rails/database/with_postgresql/_service.yml +0 -7
  335. data/roro/containers/ruby_image/ci.env.enc +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 28419719167db581fa026244d2628fa4c86c9d3b
4
- data.tar.gz: b46403289b09d42a550ac9dff3a4edcc717f2c63
2
+ SHA256:
3
+ metadata.gz: 041c08174ce7ef8801ff96de5579a5af5475ccea54855a34352ca85a820b95be
4
+ data.tar.gz: 7f2bbabd5f24a2e1410dbb24d961cbea46bd7cf79ab1629c6f7109b108868f93
5
5
  SHA512:
6
- metadata.gz: 3b2075ccae46a264f2d64bf2d2c09fb678bf95a44d534b0263dcb2a9e5cbf6345663d683bea3219ec728512e65eca391e1715a7334d304d4e46411a3e75f6ec1
7
- data.tar.gz: 5ef3392e89e8e72af5e190a79f45ff7e107db744c0fe2a886b6e0e11bf6829c0fc723c6e298c0ad51d20a7b4882dbd84035b3b966a2eabdf5484e4c32827ae28
6
+ metadata.gz: 3c9ecbf3a06d7146e01913113af6d3e83393de5cf5ac2b7dcd840ecaf9c16e4fe5f75609916b1f43b0cab7f2321f038ab457be6d8843bd39c756aa6fe6db0868
7
+ data.tar.gz: 6c112af32e6b2693a87a1888455796a6883941057f64ef0ce16d43b978a39fae10f251451701e95995833077fef60b5eed467fa2cd836fd78c33ef39cfe55d8d
data/.circleci/config.yml CHANGED
@@ -1,93 +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
1
+ version: 2.1
2
+
3
+ executors:
4
+ ruby-executor:
5
+ docker:
6
+ - image: cimg/ruby:2.7
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>>
9
21
 
10
22
  defaults: &defaults
11
- executor: machine-executor
12
- working_directory: ~/project
23
+ executor: ruby
13
24
 
14
25
  major_only: &major_only
15
26
  filters:
16
27
  branches:
17
- only: master, release
18
-
19
- version: 2.1
28
+ only: master
20
29
 
21
- executors:
22
- machine-executor:
23
- machine: true
24
- ruby-executor:
25
- docker:
26
- - image: cimg/ruby:2.7
27
-
28
- jobs:
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'
29
48
 
49
+ jobs:
30
50
  build:
31
51
  <<: *defaults
32
52
  steps:
33
53
  - checkout
34
-
35
- test-rollon-rails:
36
- executor: ruby-executor
37
- steps:
38
- - 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
39
81
  - setup_remote_docker:
40
82
  version: 19.03.12
41
83
  - run: |
42
- rake install
43
- mkdir greenfield
44
- cd greenfield
45
- (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
46
86
  - run: echo 'success'
47
-
48
- test:
49
- <<: *defaults
50
- steps:
51
- - checkout
52
- - run: RUBY_VERSION=2.5 docker-compose build ruby_gem
53
- - run: RUBY_VERSION=2.5 docker-compose up -d --force-recreate ruby_gem
54
- - run: RUBY_VERSION=2.5 docker-compose run ruby_gem bundle exec rake test
55
- - run: RUBY_VERSION=2.6 docker-compose build ruby_gem
56
- - run: RUBY_VERSION=2.6 docker-compose up -d --force-recreate ruby_gem
57
- - run: RUBY_VERSION=2.6 docker-compose run ruby_gem bundle exec rake test
58
- - run: RUBY_VERSION=2.7 docker-compose build ruby_gem
59
- - run: RUBY_VERSION=2.7 docker-compose up -d --force-recreate ruby_gem
60
- - run: RUBY_VERSION=2.7 docker-compose run ruby_gem bundle exec rake test
61
-
87
+
62
88
  release:
63
89
  <<: *defaults
64
90
  steps:
65
91
  - checkout
66
- - run: gem install roro
67
- - run: roro generate::exposed ci
68
- - run: |
69
- echo $(cat ./roro/containers/ruby_image/ci.env) >> $BASH_ENV
70
- source $BASH_ENV
71
- - run: chmod +x ./.circleci/setup-gem-credentials.sh
72
- - run: ./.circleci/setup-gem-credentials.sh
73
- - run: chmod 0600 ~/.gem/credentials
74
- - run: git checkout .
75
- - run: gem release
76
-
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
+
77
106
  workflows:
78
- version: 2
79
-
80
- build-cli:
81
- jobs:
82
- - build
83
- - test-rollon-rails:
107
+ matrix-test-rollon:
108
+ jobs:
109
+ - test-rollon:
84
110
  <<: *major_only
85
- - test:
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:
86
119
  <<: *major_only
87
-
120
+ matrix:
121
+ parameters:
122
+ version: [ "2.5", "2.6", "2.7", "3.0" ]
123
+
124
+ gem-release:
125
+ jobs:
126
+ - build
88
127
  - release:
89
- requires:
128
+ requires:
90
129
  - build
91
- filters:
92
- branches:
93
- only: release
130
+ <<: *release
data/.gitignore CHANGED
@@ -10,16 +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
25
- TUTORIAL.md
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,15 +1,27 @@
1
- options = {
2
- all_on_start: false,
3
- all_after_pass: false,
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{^test/helpers/(.*)\.rb$}) { 'test' }
10
- watch(%r{^test/test_helper\.rb$}) { 'test' }
11
- watch(%r{^lib/roro/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
12
- watch(%r{^lib/roro/cli/(.+)\.rb$}) { |m| "test/cli/#{m[1]}_test.rb" }
13
- watch(%r{^lib/roro/cli/(.+)\.yml$}) { |m| "test/cli" }
14
- watch(%r{^lib/roro/cli/(.+)\.tt$}) { |m| "test/cli" }
25
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}#{m[2]}_test.rb" }
26
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
15
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):
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