roro 0.3.21 → 0.3.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (336) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +95 -67
  3. data/.gitignore +38 -8
  4. data/.ruby-version +1 -0
  5. data/CODE_OF_CONDUCT.md +25 -17
  6. data/Gemfile +1 -1
  7. data/Guardfile +23 -11
  8. data/README.md +9 -10
  9. data/bin/console +1 -1
  10. data/bin/setup +1 -1
  11. data/docker-compose.yml +3 -3
  12. data/lib/roro/cli/generate/generate.rb +52 -1
  13. data/lib/roro/cli/generate/generate_containers.rb +23 -0
  14. data/lib/roro/cli/generate/generate_environments.rb +25 -0
  15. data/lib/roro/cli/generate/generate_exposed.rb +11 -0
  16. data/lib/roro/cli/generate/generate_keys.rb +15 -0
  17. data/lib/roro/cli/generate/generate_mise.rb +13 -0
  18. data/lib/roro/cli/generate/generate_obfuscated.rb +14 -0
  19. data/lib/roro/cli/roll_your_own.rb +12 -0
  20. data/lib/roro/cli/rollon.rb +11 -138
  21. data/lib/roro/cli.rb +30 -20
  22. data/lib/roro/common/file_reflection.rb +33 -0
  23. data/lib/roro/common/utilities.rb +185 -0
  24. data/lib/roro/configurator.rb +14 -14
  25. data/lib/roro/configurators/adventure_case_builder.rb +65 -0
  26. data/lib/roro/configurators/adventure_chooser.rb +46 -0
  27. data/lib/roro/configurators/adventure_picker.rb +68 -0
  28. data/lib/roro/configurators/adventure_writer.rb +34 -0
  29. data/lib/roro/configurators/catalog_builder.rb +17 -0
  30. data/lib/roro/configurators/configurator.rb +64 -0
  31. data/lib/roro/configurators/eligibility.rb +141 -0
  32. data/lib/roro/configurators/question_asker.rb +29 -0
  33. data/lib/roro/configurators/question_builder.rb +83 -0
  34. data/lib/roro/configurators/structure_builder.rb +34 -0
  35. data/lib/roro/configurators/utilities.rb +188 -0
  36. data/lib/roro/configurators/validator.rb +109 -0
  37. data/lib/roro/crypto/cipher.rb +35 -0
  38. data/lib/roro/crypto/exposer.rb +33 -0
  39. data/lib/roro/crypto/file_writer.rb +14 -0
  40. data/lib/roro/crypto/key_writer.rb +35 -0
  41. data/lib/roro/crypto/obfuscator.rb +25 -0
  42. data/lib/roro/error.rb +31 -0
  43. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/fatsufodo.yml +1 -0
  44. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/django.yml +38 -0
  45. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/Dockerfile.tt +7 -0
  46. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
  47. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_one/requirements.txt.tt +2 -0
  48. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/templates/stage_two/settings.py +130 -0
  49. data/lib/roro/{templates/base/jumpstart → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/dummy}/.keep +0 -0
  50. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_one/stage_one_test.rb +37 -0
  51. data/lib/roro/{templates/base/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/django/test/stage_two/dummy}/.keep +0 -0
  52. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/expressjs.yml +8 -0
  53. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
  54. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
  55. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/flask.yml +14 -0
  56. data/lib/roro/{templates/base/roro/roro → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one}/.keep +0 -0
  57. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/Dockerfile +11 -0
  58. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/app.py +23 -0
  59. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/docker-compose.yml +8 -0
  60. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/templates/stage_one/requirements.txt +2 -0
  61. data/lib/roro/{templates/base/roro/roro/containers → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test}/.keep +0 -0
  62. data/lib/roro/{templates/base/roro/roro/containers/app → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one}/.keep +0 -0
  63. 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
  64. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/flask/test/stage_one/stage_test.rb +37 -0
  65. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/rails.yml +12 -0
  66. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  67. data/lib/roro/{templates/rails/.circleci/.keep → stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
  68. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  69. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_one/docker-compose.yml.tt +9 -0
  70. 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
  71. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/rails/templates/stage_two/database.yml.tt +16 -0
  72. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
  73. data/lib/roro/stacks/catalog/unstoppable/developer_styles/fatsufodo/stories/wordpress/wordpress.yml +17 -0
  74. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/okonomi.yml +1 -0
  75. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/roll_your_own.yml +23 -0
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. data/lib/roro/{templates/rails/roro/containers → stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/dummy}/.keep +0 -0
  83. data/lib/roro/stacks/catalog/unstoppable/developer_styles/okonomi/stories/roll_your_own/test/stage_one/stage_one_test.rb +58 -0
  84. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/omakase.yml +1 -0
  85. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/rails.yml +13 -0
  86. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  87. 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
  88. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  89. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
  90. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_one/entrypoint.sh +8 -0
  91. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/rails/templates/stage_two/database.yml.tt +16 -0
  92. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/.env +38 -0
  93. data/lib/roro/{templates/rails/roro/containers/frontend → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one}/.keep +0 -0
  94. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/LICENSE +674 -0
  95. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/README.md +346 -0
  96. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/build.sh +39 -0
  97. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-custom-configs.conf +117 -0
  98. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/cfg/nginx-wp-hardening.conf +131 -0
  99. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-http.conf.template +103 -0
  100. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/nginx/tpl/nginx-https.conf.example +123 -0
  101. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/config/php.conf.ini +3 -0
  102. 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
  103. 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
  104. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-build.yml +24 -0
  105. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-dev.yml +96 -0
  106. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/docker-compose-prod.yml +147 -0
  107. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/dump_mysql.sh +16 -0
  108. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/init_letsencrypt.sh +80 -0
  109. 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
  110. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/push.sh +22 -0
  111. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/Dockerfile +14 -0
  112. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/templates/stage_one/wordpress/adduser.sh +15 -0
  113. 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
  114. 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
  115. data/lib/roro/{templates/ruby_gem/.circleci → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test}/.keep +0 -0
  116. data/lib/roro/{templates/ruby_gem/roro/containers → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one}/.keep +0 -0
  117. data/lib/roro/{templates/ruby_gem/roro/keys → stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_dummy}/.keep +0 -0
  118. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/test/stage_one/stage_test.rb +40 -0
  119. data/lib/roro/stacks/catalog/unstoppable/developer_styles/omakase/stories/wordpress/wordpress.yml +76 -0
  120. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/fatsufodo.yml +1 -0
  121. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/django.yml +36 -0
  122. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/Dockerfile.tt +7 -0
  123. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/docker-compose.yml.tt +20 -0
  124. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_one/requirements.txt.tt +2 -0
  125. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/templates/stage_two/settings.py +130 -0
  126. data/{roro/containers → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/dummy}/.keep +0 -0
  127. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_one/stage_one_test.rb +37 -0
  128. data/{roro/keys → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/django/test/stage_two/dummy}/.keep +0 -0
  129. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/expressjs.yml +7 -0
  130. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/Dockerfile.tt +14 -0
  131. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/expressjs/templates/stage_one/docker-compose.yml.tt +21 -0
  132. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/rails.yml +12 -0
  133. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Dockerfile.tt +16 -0
  134. data/{sandbox/.keep → lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.lock.tt} +0 -0
  135. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/Gemfile.tt +2 -0
  136. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/docker-compose.yml.tt +17 -0
  137. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_one/entrypoint.sh +8 -0
  138. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/rails/templates/stage_two/database.yml.tt +16 -0
  139. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/__MACOSX/scripts/._.DS_Store +0 -0
  140. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/.DS_Store +0 -0
  141. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/bundler.sh +22 -0
  142. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/git.sh +21 -0
  143. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/rvm.sh +38 -0
  144. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base/utilities.sh +53 -0
  145. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/base.sh +6 -0
  146. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_idea.sh +14 -0
  147. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/clone_repos.sh +33 -0
  148. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_correct_bundler.sh +21 -0
  149. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize/install_rubies.sh +6 -0
  150. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/initialize.sh +18 -0
  151. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/roro.sh +15 -0
  152. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/source.sh +28 -0
  153. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/bundle_all.sh +12 -0
  154. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/git_pull_all.sh +15 -0
  155. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/rvm_install_all.sh +12 -0
  156. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/roro/templates/scripts/utility/yarn_install_all.sh +10 -0
  157. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/templates/stage_one/docker-compose.yml.tt +31 -0
  158. data/lib/roro/stacks/catalog/unstoppable/developer_styles/sashimi/stories/wordpress/wordpress.yml +16 -0
  159. data/lib/roro/stacks/library/roro/.keep +0 -0
  160. data/lib/roro/stacks/library/roro/docker_compose/docker-compose.yml +22 -0
  161. data/lib/roro/stacks/library/roro/k8s/k8s.yml +15 -0
  162. data/lib/roro/stacks/library/roro/plots/node/.keep +0 -0
  163. data/lib/roro/stacks/library/roro/plots/node/node.yml +22 -0
  164. data/lib/roro/stacks/library/roro/plots/php/.keep +0 -0
  165. data/lib/roro/stacks/library/roro/plots/php/php.yml +22 -0
  166. data/lib/roro/stacks/library/roro/plots/python/plots/django/.keep +0 -0
  167. data/lib/roro/stacks/library/roro/plots/python/plots/django/django.yml +10 -0
  168. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/Dockerfile +7 -0
  169. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/docker-compose.yml +20 -0
  170. data/lib/roro/stacks/library/roro/plots/python/plots/django/templates/requirements.txt +2 -0
  171. data/lib/roro/stacks/library/roro/plots/python/plots/flask/flask.yml +0 -0
  172. data/lib/roro/stacks/library/roro/plots/python/python.yml +1 -0
  173. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/.keep +0 -0
  174. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/mysql.yml +22 -0
  175. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/databases/postgres.yml +22 -0
  176. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/rails.yml +22 -0
  177. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails/templates/.keep +0 -0
  178. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/rails_react.yml +22 -0
  179. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_react/templates/.keep +0 -0
  180. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/rails_vue.yml +22 -0
  181. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/plots/rails_vue/templates/.keep +0 -0
  182. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/rails.yml +16 -0
  183. data/lib/roro/stacks/library/roro/plots/ruby/plots/rails/templates/.keep +0 -0
  184. data/lib/roro/stacks/library/roro/plots/ruby/plots/ruby_gem/ruby_gem.yml +22 -0
  185. data/lib/roro/stacks/library/roro/plots/ruby/ruby.yml +22 -0
  186. data/lib/roro/stacks/library/roro/roro/roro.yml +15 -0
  187. data/lib/roro/{stories → stacks/stories_v1}/greenfield/rails.yml +2 -2
  188. data/lib/roro/stacks/stories_v1/greenfield/roro.yml +7 -0
  189. data/lib/roro/{stories → stacks/stories_v1}/greenfield.yml +0 -0
  190. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd/circleci.yml +0 -0
  191. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/ci_cd.yml +0 -0
  192. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/mysql.yml +1 -1
  193. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database/postgresql.yml +1 -1
  194. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/database.yml +0 -0
  195. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/default.yml +0 -0
  196. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes/postgresql/edge.yml +0 -0
  197. data/lib/roro/stacks/stories_v1/rollon/rails/kubernetes/postgresql.yml +10 -0
  198. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails/kubernetes.yml +0 -0
  199. data/lib/roro/{stories → stacks/stories_v1}/rollon/rails.yml +7 -7
  200. data/lib/roro/stacks/stories_v1/rollon/roro.yml +5 -0
  201. data/lib/roro/{stories → stacks/stories_v1}/rollon/ruby_gem.yml +0 -0
  202. data/lib/roro/{stories → stacks/stories_v1}/rollon.yml +0 -0
  203. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/.keep +0 -0
  204. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/config.yml.tt +0 -0
  205. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_build.yml +1 -1
  206. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/jobs/_push.yml +1 -1
  207. data/lib/roro/stacks/stories_v1/templates/rails/.circleci/jobs/_test.yml +12 -0
  208. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/setup-gem-credentials.sh +0 -0
  209. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/.circleci/workflows/_build_test_push.yml +0 -0
  210. data/lib/roro/stacks/stories_v1/templates/rails/.keep +0 -0
  211. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/Dockerfile.greenfield.tt +1 -1
  212. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.mysql.yml +0 -0
  213. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/config/database.pg.yml +0 -0
  214. data/lib/roro/stacks/stories_v1/templates/rails/database/with_mysql/_service.yml +10 -0
  215. data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/.keep +0 -0
  216. data/lib/roro/stacks/stories_v1/templates/rails/database/with_postgresql/_service.yml +7 -0
  217. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/docker-compose.yml.tt +0 -0
  218. data/lib/roro/stacks/stories_v1/templates/rails/dotenv/.keep +0 -0
  219. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.mysql.env.tt +0 -0
  220. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/database.pg.env.tt +0 -0
  221. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/dotenv/web.env.tt +0 -0
  222. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/kube.rake.tt +0 -0
  223. data/lib/roro/stacks/stories_v1/templates/rails/roro/.keep +0 -0
  224. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/.keep +0 -0
  225. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/app/.keep +0 -0
  226. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/containers/app/Dockerfile.tt +0 -0
  227. data/lib/roro/stacks/stories_v1/templates/rails/roro/containers/frontend/.keep +0 -0
  228. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/docker-entrypoint.sh +0 -0
  229. data/lib/roro/stacks/stories_v1/templates/rails/roro/keys/.keep +0 -0
  230. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/.keep +0 -0
  231. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/certificate.yml.tt +0 -0
  232. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/cluster-issuer.yml.tt +0 -0
  233. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployment.yml.tt +0 -0
  234. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/postgres_deploy.yaml +3 -3
  235. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/rails_deploy.yaml +5 -5
  236. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/redis_deploy.yaml +2 -2
  237. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/deployments/sidekiq_deploy.yaml +3 -3
  238. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/ingress.yml.tt +0 -0
  239. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/ingresses/ingress.yaml +0 -0
  240. data/lib/roro/stacks/stories_v1/templates/rails/roro/kube/job-migrate.yml.tt +0 -0
  241. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/jobs/setup.yaml +1 -1
  242. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/secret-digital-ocean.yml.tt +0 -0
  243. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/service.yml.tt +0 -0
  244. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/postgres_svc.yaml +2 -2
  245. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/rails_svc.yaml +3 -3
  246. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/services/redis_svc.yaml +2 -2
  247. data/lib/roro/{templates → stacks/stories_v1/templates}/rails/roro/kube/volumes/postgres_volumes.yaml +0 -0
  248. data/lib/roro/stacks/stories_v1/templates/roro/containers/.keep +0 -0
  249. data/lib/roro/stacks/stories_v1/templates/roro/containers/database/env/.keep +0 -0
  250. data/lib/roro/stacks/stories_v1/templates/roro/containers/database/scripts/.keep +0 -0
  251. data/lib/roro/stacks/stories_v1/templates/roro/env/.keep +0 -0
  252. data/lib/roro/stacks/stories_v1/templates/roro/keys/.keep +0 -0
  253. data/lib/roro/stacks/stories_v1/templates/roro/scripts/.keep +0 -0
  254. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/bundler.sh +22 -0
  255. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/git.sh +21 -0
  256. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/rvm.sh +38 -0
  257. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base/utilities.sh +53 -0
  258. data/lib/roro/stacks/stories_v1/templates/roro/scripts/base.sh +6 -0
  259. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_idea.sh +14 -0
  260. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/clone_repos.sh +33 -0
  261. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_correct_bundler.sh +21 -0
  262. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize/install_rubies.sh +6 -0
  263. data/lib/roro/stacks/stories_v1/templates/roro/scripts/initialize.sh +18 -0
  264. data/lib/roro/stacks/stories_v1/templates/roro/scripts/roro.sh +15 -0
  265. data/lib/roro/stacks/stories_v1/templates/roro/scripts/source.sh +28 -0
  266. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/bundle_all.sh +12 -0
  267. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/git_pull_all.sh +15 -0
  268. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/rvm_install_all.sh +12 -0
  269. data/lib/roro/stacks/stories_v1/templates/roro/scripts/utility/yarn_install_all.sh +10 -0
  270. data/lib/roro/stacks/stories_v1/templates/ruby_gem/.circleci/.keep +0 -0
  271. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/config.yml.tt +0 -0
  272. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/jobs/_test.yml +0 -0
  273. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/.circleci/setup-gem-credentials.sh +0 -0
  274. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/docker-compose.yml +1 -1
  275. data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/containers/.keep +0 -0
  276. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/Dockerfile.tt +0 -0
  277. data/lib/roro/{templates → stacks/stories_v1/templates}/ruby_gem/roro/containers/ruby_image/ci.env.tt +0 -0
  278. data/lib/roro/stacks/stories_v1/templates/ruby_gem/roro/keys/.keep +0 -0
  279. data/lib/roro/version.rb +1 -1
  280. data/lib/roro.rb +60 -6
  281. data/mise/containers/ruby_gem/Dockerfile +16 -0
  282. data/{roro/containers/app/Dockerfile → mise/containers/ruby_gem/Dockerfile-app} +0 -0
  283. data/{roro/containers/ruby_image/Dockerfile → mise/containers/ruby_gem/Dockerfile-ruby_gem} +0 -0
  284. data/mise/containers/ruby_gem/env/.keep +0 -0
  285. data/mise/containers/ruby_gem/env/base.env.enc +1 -0
  286. data/mise/containers/ruby_gem/env/ci.env.enc +2 -0
  287. data/mise/containers/ruby_gem/env/development.env.enc +1 -0
  288. data/mise/containers/ruby_gem/env/production.env.enc +1 -0
  289. data/mise/containers/ruby_gem/scripts/.keep +0 -0
  290. data/mise/env/base.env.enc +1 -0
  291. data/mise/env/ci.env.enc +1 -0
  292. data/mise/env/development.env.enc +1 -0
  293. data/mise/env/production.env.enc +1 -0
  294. data/mise/mise.roro +0 -0
  295. data/roro.gemspec +7 -1
  296. metadata +338 -119
  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/crypto.rb +0 -73
  315. data/lib/roro/stories/rollon/rails/kubernetes/postgresql.yml +0 -10
  316. data/lib/roro/templates/base/.circleci/_aliases.yml +0 -8
  317. data/lib/roro/templates/base/.circleci/_commands.yml +0 -31
  318. data/lib/roro/templates/base/.circleci/_defaults.yml +0 -5
  319. data/lib/roro/templates/base/.circleci/_executors.yml +0 -11
  320. data/lib/roro/templates/base/.circleci/_major_only.yml +0 -4
  321. data/lib/roro/templates/base/.circleci/_version.yml +0 -1
  322. data/lib/roro/templates/base/.circleci/_workflow.yml +0 -2
  323. data/lib/roro/templates/base/.circleci/config.job-example.yml +0 -33
  324. data/lib/roro/templates/base/.circleci/jobs/_build.yml +0 -4
  325. data/lib/roro/templates/base/.circleci/jobs/_release.yml +0 -12
  326. data/lib/roro/templates/base/.circleci/workflows/_build_release.yml +0 -10
  327. data/lib/roro/templates/base/.dockerignore +0 -51
  328. data/lib/roro/templates/base/dotenv +0 -1
  329. data/lib/roro/templates/base/jumpstart/Dockerfile.tt +0 -30
  330. data/lib/roro/templates/base/jumpstart/docker-compose.yml +0 -59
  331. data/lib/roro/templates/base/jumpstart/docker-entrypoint.sh +0 -16
  332. data/lib/roro/templates/base/livereload/hosts.example +0 -7
  333. data/lib/roro/templates/rails/.circleci/jobs/_test.yml +0 -12
  334. data/lib/roro/templates/rails/database/with_mysql/_service.yml +0 -10
  335. data/lib/roro/templates/rails/database/with_postgresql/_service.yml +0 -7
  336. data/roro/containers/ruby_image/ci.env.enc +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43e30bd9aa551984852307e9c258049546a167e89aaab22e3f8b7256cec22a23
4
- data.tar.gz: 790ad729852cf34c8bbdfa6499ab325f399334d1df2c385d20e7ae5757dcd707
3
+ metadata.gz: ce80e2557743ac04bef8961392b5c23bf51f1cf99a73a85cda4bb96f08c75a54
4
+ data.tar.gz: 30fed01b1e4fb71dd11139515d8a85dd59b71381328420237f9a20b933670b68
5
5
  SHA512:
6
- metadata.gz: 4de76d1807c627790a721e968e458bcff335d9a972b8b496d5a1dfc494c8b750332eae75411dc689482bb3e60fab44319fa46cc95c63547cedfa5c849e527ce5
7
- data.tar.gz: b7f2647884d116fc849431070829e2806f244771580a532f57e65cabbf17d856bf209d76e425eee28e370eee90ef6d10f0ab8de10998503bc058da846387bb78
6
+ metadata.gz: a824a157c60ed88f4d5c6e80c4bc663e040fd2a436827a4784f609870dba0ca02ed7d0d00bfa90358c5e543c23681b115cbbdc1702c71e5d0aa0ead982b63ef6
7
+ data.tar.gz: 7691813e2263ca4007885b6351e7d243681855742cc10a53b122b7474dda489da90184cc792c971fa303f6d3ba9a0b437cfbca088ed10e121165eaea85dbfce9
data/.circleci/config.yml CHANGED
@@ -1,15 +1,26 @@
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:
@@ -20,80 +31,97 @@ release: &release
20
31
  filters:
21
32
  branches:
22
33
  only: release
23
-
24
-
25
- version: 2.1
26
34
 
27
- executors:
28
- machine-executor:
29
- machine: true
30
- ruby-executor:
31
- docker:
32
- - image: cimg/ruby:2.7
33
-
34
- jobs:
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'
35
48
 
49
+ jobs:
36
50
  build:
37
51
  <<: *defaults
38
52
  steps:
39
53
  - checkout
40
-
41
- test-rollon-rails:
42
- executor: ruby-executor
43
- steps:
44
- - 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
45
81
  - setup_remote_docker:
46
82
  version: 19.03.12
47
83
  - run: |
48
- rake install
49
- mkdir greenfield
50
- cd greenfield
51
- (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
52
86
  - run: echo 'success'
53
-
54
- test:
55
- <<: *defaults
56
- steps:
57
- - checkout
58
- - run: RUBY_VERSION=2.5 docker-compose build ruby_gem
59
- - run: RUBY_VERSION=2.5 docker-compose up -d --force-recreate ruby_gem
60
- - run: RUBY_VERSION=2.5 docker-compose run ruby_gem bundle exec rake test
61
- - run: RUBY_VERSION=2.6 docker-compose build ruby_gem
62
- - run: RUBY_VERSION=2.6 docker-compose up -d --force-recreate ruby_gem
63
- - run: RUBY_VERSION=2.6 docker-compose run ruby_gem bundle exec rake test
64
- - run: RUBY_VERSION=2.7 docker-compose build ruby_gem
65
- - run: RUBY_VERSION=2.7 docker-compose up -d --force-recreate ruby_gem
66
- - run: RUBY_VERSION=2.7 docker-compose run ruby_gem bundle exec rake test
67
-
87
+
68
88
  release:
69
89
  <<: *defaults
70
90
  steps:
71
91
  - checkout
72
- - run: gem install roro
73
- - run: roro generate::exposed ci
74
- - run: |
75
- echo $(cat ./roro/containers/ruby_image/ci.env) >> $BASH_ENV
76
- source $BASH_ENV
77
- - run: chmod +x ./.circleci/setup-gem-credentials.sh
78
- - run: ./.circleci/setup-gem-credentials.sh
79
- - run: chmod 0600 ~/.gem/credentials
80
- - run: git checkout .
92
+ - run: |
93
+ git config --global user.email "fred.schoeneman@gmail.com"
94
+ git config --global user.name "Fred Schoeneman"
95
+ - run: gem install gem-release
96
+ - run: gem bump
81
97
  - run: gem release
82
-
98
+ # - run: bundle config set --local whithout development test
99
+ # - run: bundle
100
+ # - run: rake install
101
+ # - run: printf "yes" | rake release
102
+
83
103
  workflows:
84
- version: 2
85
-
86
- build-cli:
87
- jobs:
88
- - build:
89
- <<: *major_only
90
- <<: *release
91
- - test-rollon-rails:
104
+ matrix-test-rollon:
105
+ jobs:
106
+ - test-rollon:
92
107
  <<: *major_only
93
- - test:
108
+ matrix:
109
+ parameters:
110
+ answers: ["1\n1", "1\n2", "1\n3", "1\n4", "1\n5", "2\n1", "3\n1", "3\n2"]
111
+ os: [linux]
112
+
113
+ matrix-test-against-rubies:
114
+ jobs:
115
+ - test-against-ruby:
94
116
  <<: *major_only
95
-
117
+ matrix:
118
+ parameters:
119
+ version: [ "2.5", "2.6", "2.7", "3.0" ]
120
+
121
+ gem-release:
122
+ jobs:
123
+ - build
96
124
  - release:
97
- requires:
125
+ requires:
98
126
  - build
99
- <<: *release
127
+ <<: *release
data/.gitignore CHANGED
@@ -8,18 +8,48 @@
8
8
  Gemfile.lock
9
9
  .byebug_history
10
10
 
11
+ ## circleci
12
+ process.yml
13
+
14
+ ## roro
11
15
  roro/**/*.env
12
16
  roro/**/*.key
13
-
14
17
  *.key
15
18
  *.env
19
+ !/lib/roro/stacks/**/*.key
20
+ !/lib/roro/stacks/**/*.env
21
+ !test/**/*.key
22
+ !test/**/*.env
16
23
  !/.gitignore
17
24
  *.gem
18
25
  tmp/*
19
- !tmp/.keep
20
- sandbox/*
21
- !sandbox/.keep
22
- !sandbox/greenfield
23
- sandbox/greenfield/*
24
- !sandbox/greenfield/.keep
25
- TUTORIAL.md
26
+ !tmp/.keep
27
+ TUTORIAL.md
28
+
29
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
30
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
31
+
32
+ # User-specific stuff
33
+ .idea/**/workspace.xml
34
+ .idea/**/tasks.xml
35
+ .idea/**/usage.statistics.xml
36
+ .idea/**/dictionaries
37
+ .idea/**/shelf
38
+
39
+ # Generated files
40
+ .idea/**/contentModel.xml
41
+
42
+ # Sensitive or high-churn files
43
+ .idea/**/dataSources/
44
+ .idea/**/dataSources.ids
45
+ .idea/**/dataSources.local.xml
46
+ .idea/**/sqlDataSources.xml
47
+ .idea/**/dynamic.xml
48
+ .idea/**/uiDesigner.xml
49
+ .idea/**/dbnavigator.xml
50
+
51
+ # File-based project format
52
+ *.iws
53
+
54
+ # IntelliJ
55
+ out/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.7.2
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,29 +1,37 @@
1
1
  # Contributor Covenant Code of Conduct
2
2
 
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
3
+ I want participation in this project to be fun for everyone regardless of age, body size, disability, ethnicity, level of experience,
4
+ nationality, personal appearance, race, religion, gender identity and expression,
5
+ or sexual identity and orientation.
11
6
 
12
7
  ## Our Standards
13
8
 
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
9
+ Some of these things make me happy:
10
+
11
+ * When you use welcoming and inclusive language
12
+ * When you write a user story from the perspective of someone with a different pronoun
13
+ * When you understand we all want the same things for ourselves, our families, and other people even if you disagree with the politics of how to get them
14
+ * When you invert and play with stereotypes
15
+ * When you focus on your own privilege and not on what you assume is that in others
16
+ * When you assume everybody has a positive intent
17
+ * When you listen carefully to criticism before accepting or rejecting it
18
+ * When you tell someone what you think they're asking before providing an answer
19
+ * When you ask before offering criticism
20
+ * When you acknowledge constructive criticism and either accept it or explain why you can not
21
+ * When you accept that sometimes your criticism will be rejected
22
+ * When you show empathy towards others
23
+ * When you are positive and supportive of someone's efforts
24
+ * When you assume as little as possible about others
25
+ * When you are cheerful, even if you have to fake
26
+ * When you give genuine compliments to others
27
+
16
28
 
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
29
 
23
30
  Examples of unacceptable behavior by participants include:
24
31
 
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
32
+ * Unwelcome sexual attention or advances
33
+ * Teasing someone for something that person is sensitive about, or that a reasonable person might guess she is
34
+ * sensitive about.
27
35
  * Trolling, insulting/derogatory comments, and personal or political attacks
28
36
  * Public or private harassment
29
37
  * Publishing others' private information, such as a physical or electronic
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