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
@@ -0,0 +1,10 @@
1
+ stories:
2
+ - default
3
+ - edge
4
+
5
+ actions:
6
+ - template 'rails/.circleci/config.yml.tt', './.circleci/config.yml'
7
+ - template 'rails/preface-returns-array_of_strings.yml.tt', './preface-returns-array_of_strings.yml', @config.smart.env
8
+ - template 'base/dotenv', './.smart.env', @config.smart.env
9
+ - directory 'rails/roro', './roro', @config.smart.env
10
+ - template 'rails/kube.rake.tt', './lib/tasks/kube.rake', @config.smart.env
@@ -5,20 +5,20 @@ stories:
5
5
 
6
6
  actions:
7
7
  - template 'rails/.circleci/config.yml.tt', './.circleci/config.yml'
8
- - template 'rails/docker-compose.yml.tt', './docker-compose.yml', @config.env
9
- - template 'base/dotenv', './.env', @config.env
10
- - directory 'rails/roro', './roro', @config.env
8
+ - template 'rails/preface-returns-array_of_strings.yml.tt', './preface-returns-array_of_strings.yml', @config.smart.env
9
+ - template 'base/dotenv', './.smart.env', @config.smart.env
10
+ - directory 'rails/roro', './roro', @config.smart.env
11
11
  - chmod "roro/docker-entrypoint.sh", 0755
12
12
 
13
13
 
14
14
  startup:
15
- success: "Your app should be available at http://localhost:3000"
15
+ success: "Your backend should be available at http://localhost:3000"
16
16
  commands:
17
17
  - docker-compose build --no-cache
18
18
  - docker-compose up -d
19
- - docker-compose run app bin/rails db:create
20
- - docker-compose run app bin/rails db:migrate
21
- - 'docker-compose run app echo #{success_msg}'
19
+ - docker-compose run backend bin/rails db:create
20
+ - docker-compose run backend bin/rails db:migrate
21
+ - 'docker-compose run backend echo #{success_msg}'
22
22
 
23
23
  env_vars:
24
24
  ruby_version: '2.7'
@@ -0,0 +1,5 @@
1
+ greenfield_actions:
2
+ - |
3
+ src = 'roro'
4
+ dest = 'roro'
5
+ template src, dest, @config.env
File without changes
@@ -3,7 +3,7 @@ jobs:
3
3
  <<: *defaults
4
4
  steps:
5
5
  - checkout
6
- - run: gem install roro
6
+ - run: gem install roro
7
7
  - run: roro generate::exposed ci
8
8
  - run: |
9
9
  mkdir -p workspace
@@ -2,7 +2,7 @@
2
2
  <<: *defaults
3
3
  steps:
4
4
  - checkout
5
- - attach-roro
5
+ - attach-roro
6
6
  - run: docker-compose build
7
7
  - run: docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
8
8
  - tag-and-push:
@@ -0,0 +1,12 @@
1
+ test:
2
+ <<: *defaults
3
+ steps:
4
+ - checkout
5
+ - attach-roro
6
+ - run: docker-compose build
7
+ - run: docker-compose up -d
8
+ - run: docker-compose run backend bundle
9
+ - run: docker-compose run backend yarn
10
+ - run: docker-compose run backend bin/rails db:create
11
+ - run: docker-compose run backend bin/rails db:migrate
12
+ - run: docker-compose run backend bin/rails test
File without changes
@@ -28,7 +28,7 @@ RUN gem install bundler:2.1.4
28
28
  WORKDIR ${APP_HOME}
29
29
 
30
30
  ## Create a Gemfile with just the Rails gem inside:
31
- RUN echo -e "source 'https://rubygems.org'\ngem 'rails'" > Gemfile
31
+ RUN echo -e "source 'https://rubygems.org'\ngem 'rails', '6.1.3.1'" > Gemfile
32
32
 
33
33
  ## Bundle to install rails:
34
34
  RUN bundle install
@@ -0,0 +1,10 @@
1
+ database:
2
+ image: mysql:5.7
3
+ env_file:
4
+ - roro/containers/database/${RORO_ENV:-development}.smart.env
5
+ - roro/containers/backend/${RORO_ENV:-development}.smart.env
6
+ volumes:
7
+ - db_data:/var/lib/mysql
8
+ restart: always
9
+ ports:
10
+ - '3307:3306'
@@ -0,0 +1,7 @@
1
+ database:
2
+ image: postgres
3
+ env_file:
4
+ - roro/containers/database/${RORO_ENV:-development}.smart.env
5
+ - roro/containers/backend/${RORO_ENV:-development}.smart.env
6
+ volumes:
7
+ - db_data:/var/lib/postgresql/data
@@ -4,18 +4,18 @@ kind: Deployment
4
4
  metadata:
5
5
  name: postgres
6
6
  labels:
7
- app: rails-kube-app
7
+ app: rails-kube-backend
8
8
  spec:
9
9
  replicas: 1
10
10
  selector:
11
11
  matchLabels:
12
- app: rails-kube-app
12
+ app: rails-kube-backend
13
13
  tier: database
14
14
  template:
15
15
  metadata:
16
16
  name: postgres
17
17
  labels:
18
- app: rails-kube-app
18
+ app: rails-kube-backend
19
19
  tier: database
20
20
  spec:
21
21
  volumes:
@@ -13,18 +13,18 @@ spec:
13
13
  maxUnavailable: 1
14
14
  selector:
15
15
  matchLabels:
16
- app: rails-kube-app
17
- tier: app
16
+ app: rails-kube-backend
17
+ tier: backend
18
18
  template:
19
19
  metadata:
20
20
  name: rails
21
21
  labels:
22
- app: rails-kube-app
23
- tier: app
22
+ app: rails-kube-backend
23
+ tier: backend
24
24
  spec:
25
25
  containers:
26
26
  - name: rails
27
- image: tzumby/rails-app-alpine:latest
27
+ image: tzumby/rails-backend-alpine:latest
28
28
  args: ["rake assets:precompile && rails s -p 3000 -b 0.0.0.0"]
29
29
  env:
30
30
  - name: RAILS_LOG_TO_STDOUT
@@ -7,13 +7,13 @@ spec:
7
7
  replicas: 1
8
8
  selector:
9
9
  matchLabels:
10
- app: rails-kube-app
10
+ app: rails-kube-backend
11
11
  tier: cache
12
12
  template:
13
13
  metadata:
14
14
  name: redis
15
15
  labels:
16
- app: rails-kube-app
16
+ app: rails-kube-backend
17
17
  tier: cache
18
18
  spec:
19
19
  containers:
@@ -13,18 +13,18 @@ spec:
13
13
  maxUnavailable: 1
14
14
  selector:
15
15
  matchLabels:
16
- app: rails-kube-app
16
+ app: rails-kube-backend
17
17
  tier: queue
18
18
  template:
19
19
  metadata:
20
20
  name: sidekiq
21
21
  labels:
22
- app: rails-kube-app
22
+ app: rails-kube-backend
23
23
  tier: queue
24
24
  spec:
25
25
  containers:
26
26
  - name: sidekiq
27
- image: tzumby/rails-app-alpine:latest
27
+ image: tzumby/rails-backend-alpine:latest
28
28
  args: ["sidekiq -C config/sidekiq.yml"]
29
29
  env:
30
30
  - name: DATABASE_NAME
@@ -9,7 +9,7 @@ spec:
9
9
  spec:
10
10
  containers:
11
11
  - name: setup
12
- image: tzumby/rails-app-alpine:latest
12
+ image: tzumby/rails-backend-alpine:latest
13
13
  args: ["rake db:create && rake db:migrate"]
14
14
  env:
15
15
  - name: DATABASE_NAME
@@ -4,10 +4,10 @@ kind: Service
4
4
  metadata:
5
5
  name: postgres
6
6
  labels:
7
- app: rails-kube-app
7
+ app: rails-kube-backend
8
8
  spec:
9
9
  ports:
10
10
  - port: 5432
11
11
  selector:
12
- app: rails-kube-app
12
+ app: rails-kube-backend
13
13
  tier: database
@@ -4,10 +4,10 @@ kind: Service
4
4
  metadata:
5
5
  name: rails
6
6
  labels:
7
- app: rails-kube-app
7
+ app: rails-kube-backend
8
8
  spec:
9
9
  ports:
10
10
  - port: 3000
11
11
  selector:
12
- app: rails-kube-app
13
- tier: app
12
+ app: rails-kube-backend
13
+ tier: backend
@@ -4,10 +4,10 @@ kind: Service
4
4
  metadata:
5
5
  name: redis
6
6
  labels:
7
- app: rails-kube-app
7
+ app: rails-kube-backend
8
8
  spec:
9
9
  ports:
10
10
  - port: 6379
11
11
  selector:
12
- app: rails-kube-app
12
+ app: rails-kube-backend
13
13
  tier: cache
@@ -0,0 +1,22 @@
1
+ #!/bin/zsh --login
2
+
3
+ set -e
4
+ set -a
5
+ DEFAULT_BRANCH='development'
6
+
7
+ bundle_install () {
8
+ REPO=${1}
9
+ BRANCH=${2:-$DEFAULT_BRANCH}
10
+
11
+ cd "${WORKBENCH}/${REPO}"
12
+ rvm_ruby_and_gemset_use "${REPO}"
13
+
14
+ pretty_echo "Checking out git branch: " "${BRANCH}..."
15
+ pretty_echo "Bundling gems in: " "${WORKBENCH}/${REPO}"
16
+ pretty_echo "Git branch: " "$(git status)"
17
+ pretty_echo "Bundling with: " "${RORO_RVM_RUBY_AND_GEMSET}"
18
+ pretty_echo "Current directory: " "${PWD}"
19
+ pretty_echo "Current directory: " "${REPO}"
20
+ rvm_ruby_and_gemset_create "${REPO}" gem install bundler
21
+ bundle install
22
+ }
@@ -0,0 +1,21 @@
1
+ #!/bin/zsh --login
2
+
3
+ DEFAULT_BRANCH='development'
4
+
5
+ update_repo () {
6
+ REPO=${1}
7
+ BRANCH=${2:-$DEFAULT_BRANCH}
8
+
9
+ cd $WORKBENCH/$REPO
10
+ pretty_echo "Updating ${REPO}..."
11
+ pretty_echo "checking out ${BRANCH}..." " "
12
+ git checkout ${BRANCH}
13
+ pretty_echo "fetching origin..."
14
+ git fetch origin
15
+ pretty_echo "pulling latest ${BRANCH} for ${REPO} from origin..."
16
+ git pull origin $BRANCH
17
+ git submodule init .
18
+
19
+ SUCCESS+=("Successfully updated ${green}$REPO${default}, branch: ${BRANCH}")
20
+ }
21
+
@@ -0,0 +1,38 @@
1
+ #!/bin/zsh --login
2
+
3
+ set -e
4
+ set -a
5
+
6
+ rvm_ruby_and_gemset_set() {
7
+ case $1 in
8
+ api)
9
+ RORO_RVM_RUBY="jruby-9.2.9.0"
10
+ RORO_RVM_GEMSET="api"
11
+ ;;
12
+ client-api)
13
+ RORO_RVM_RUBY="ruby-3.0.1"
14
+ RORO_RVM_GEMSET="client-api"
15
+ ;;
16
+ public-api)
17
+ RORO_RVM_RUBY="2.7.2"
18
+ RORO_RVM_GEMSET="public-api"
19
+ ;;
20
+ tokenizer-rails)
21
+ RORO_RVM_RUBY="2.6.5"
22
+ RORO_RVM_GEMSET="tokenizer-rails"
23
+ ;;
24
+ esac
25
+
26
+ RORO_RVM_RUBY_AND_GEMSET="${RORO_RVM_RUBY}@${RORO_RVM_GEMSET}"
27
+ }
28
+
29
+ rvm_ruby_and_gemset_use() {
30
+ rvm_ruby_and_gemset_set $1
31
+ rvm use "${RORO_RVM_RUBY_AND_GEMSET}" --create
32
+ }
33
+
34
+ rvm_ruby_and_gemset_create() {
35
+ rvm_ruby_and_gemset_set $1
36
+ rvm install "${RORO_RVM_RUBY}"
37
+ rvm use "${RORO_RVM_RUBY_AND_GEMSET}" --create
38
+ }
@@ -0,0 +1,53 @@
1
+ #!/bin/zsh
2
+
3
+ echo $DEV_ENV
4
+ source_environment() {
5
+ if [ -n "$DEV_ENV" ]; then
6
+ ENV_SOURCED_FROM=RubyMine
7
+ else
8
+ ENV_SOURCED_FROM=${ENVDIR}/current.env
9
+ . "${ENV_SOURCED_FROM}"
10
+ fi
11
+ }
12
+
13
+
14
+ pretty_echo() {
15
+ echo " ${DEFAULT_COLOR}${1}"
16
+ echo "\t${GREEN}${2}${DEFAULT_COLOR}"
17
+ }
18
+
19
+ include() {
20
+ FILE="${RORODIR}/${1}"
21
+ if [ -f $FILE ]; then
22
+ pretty_echo "Sourcing:" "${GREEN}${FILE}" >&2
23
+ source $FILE
24
+ else
25
+ pretty_echo "No override at:" "${YELLOW}${FILE}" >&2
26
+ fi
27
+ }
28
+
29
+ confirm_if_overwrite () {
30
+ DIRECTORY="${PWD}/${1}"
31
+ if test -d "${DIRECTORY}"; then
32
+ echo "${DIRECTORY} exists."
33
+ read -p "Copy over existing ${DIRECTORY} directory? " answer
34
+ case ${answer:0:1} in y|Y )
35
+ mkdir -p backup
36
+ mv ${DIRECTORY} ./backup/
37
+ ;;
38
+ * )
39
+ ;;
40
+ esac
41
+ fi
42
+ }
43
+
44
+ yarn_install() {
45
+ REPO=${1}
46
+
47
+ cd "${WORKBENCH}/${REPO}"
48
+ pretty_echo "Initializing any git submodules..."
49
+ git submodule init .
50
+ pretty_echo "Running yarn install in:" "${PWD}"
51
+ yarn install
52
+ cd ..
53
+ }
@@ -0,0 +1,6 @@
1
+ #!/bin/zsh --login
2
+
3
+ source "${SCRIPTDIR}"/base/bundler.sh
4
+ source "${SCRIPTDIR}"/base/rvm.sh
5
+ source "${SCRIPTDIR}"/base/git.sh
6
+ source "${SCRIPTDIR}"/base/utilities.sh
@@ -0,0 +1,14 @@
1
+ #!/bin/zsh
2
+
3
+ DEFAULT_IDEA_FILE=bench
4
+
5
+ IDEA_FILE=${1:-$DEFAULT_IDEA_FILE}
6
+
7
+ pretty_echo "Copying RubyMine .idea file: " "${IDEA_FILE}"
8
+
9
+ confirm_if_overwrite .idea
10
+
11
+ mkdir -p .idea
12
+
13
+ cp -r ./roro/ideas/${IDEA_FILE}/runConfigurations .idea/
14
+
@@ -0,0 +1,33 @@
1
+ #!/bin/zsh
2
+
3
+ DEFAULT_BRANCH='development'
4
+
5
+ clone_repo () {
6
+ REPO=${1}
7
+ BRANCH=${2:-$DEFAULT_BRANCH}
8
+
9
+ echo "Cloning ${REPO} into ${PWD}..."
10
+
11
+ confirm_if_overwrite ${REPO}
12
+
13
+ {
14
+ git clone git@bitbucket.org:corptools/${REPO}.git
15
+ } || {
16
+ git clone https://${LOGNAME}@bitbucket.org/corptools/roro.git
17
+ }
18
+
19
+ SUCCESS+=("Successfully cloned ${green}$REPO${default}")
20
+ }
21
+
22
+ clone_repo api
23
+ clone_repo client-api
24
+ clone_repo ct-frontend
25
+ clone_repo frontend
26
+ clone_repo internal-docs master
27
+ clone_repo affiliate-api-docs master
28
+ clone_repo public-api
29
+ clone_repo tokenizer-rails
30
+
31
+ for MESSAGE in "${SUCCESS[@]}"; do
32
+ echo $MESSAGE
33
+ done
@@ -0,0 +1,21 @@
1
+
2
+ nipbin/zsh
3
+
4
+ specify_bundler () {
5
+
6
+ GEMSET=$2
7
+ echo Using ${1}@${2}
8
+ rvm use ${1}@${2}
9
+ echo Uninstalling bundler
10
+ gem uninstall bundler --force
11
+ echo Installing company bundler
12
+ gem install bundler -v 1.9.9
13
+ bundle
14
+
15
+ }
16
+
17
+ specify_bundler 2.5.5 api
18
+ specify_bundler jruby-9.1.17 api
19
+ specify_bundler 2.6.5 tokenizer-rails
20
+ specify_bundler 2.7.2 public-api
21
+ specify_bundler 3.0 client-api
@@ -0,0 +1,6 @@
1
+ #!/bin/zsh --login
2
+
3
+ rvm_ruby_and_gemset_create api
4
+ rvm_ruby_and_gemset_create client-api
5
+ rvm_ruby_and_gemset_create public-api
6
+ rvm_ruby_and_gemset_create tokenizer-rails
@@ -0,0 +1,18 @@
1
+ #!/bin/zsh --login
2
+
3
+ set -a
4
+ set -e
5
+
6
+ WORKBENCH="${PWD}"
7
+ cp ./roro/templates/roro.env.template ./roro/env/roro.env
8
+
9
+ source ${WORKBENCH}/roro/scripts/roro.sh
10
+
11
+ cp "${TEMPLATEDIR}/Caddyfile.template" "${WORKBENCH}/Caddyfile"
12
+ cp "${TEMPLATEDIR}/current.env.template" "${RORODIR}/env/current.env"
13
+
14
+
15
+ source "${SCRIPTDIR}"/initialize/clone_idea.sh
16
+ source "${SCRIPTDIR}"/initialize/clone_repos.sh
17
+ source "${SCRIPTDIR}"/initialize/install_rubies.sh
18
+ source "${SCRIPTDIR}"/utility/bundle_all.sh
@@ -0,0 +1,15 @@
1
+ #!/bin/zsh --login
2
+
3
+ set -a
4
+ set -e
5
+
6
+ RORODIR="${WORKBENCH}/roro/"
7
+ ENVDIR="${RORODIR}/env/"
8
+ SCRIPTDIR="${RORODIR}/scripts/"
9
+ TEMPLATEDIR="${RORODIR}/templates/"
10
+
11
+ source "${ENVDIR}"/roro.env
12
+
13
+ source ${SCRIPTDIR}/base.sh
14
+
15
+
@@ -0,0 +1,28 @@
1
+ #!/bin/zsh --login
2
+
3
+ set -a
4
+ set -e
5
+
6
+ BENCH_APP="${PWD##*/}"
7
+ WORKBENCH="$(dirname ${PWD})"
8
+ echo ${BENCH_APP}
9
+ echo ${WORKBENCH}
10
+
11
+ source ${WORKBENCH}/roro/scripts/roro.sh
12
+ source "${SCRIPTDIR}"/base.sh
13
+
14
+ source_environment
15
+
16
+ include "env/base.env"
17
+ include "containers/database/env/base.env"
18
+ include "containers/database/env/${DEV_ENV}.env"
19
+ include "containers/${BENCH_APP}/env/base.env"
20
+ include "containers/${BENCH_APP}/env/${DEV_ENV}.env"
21
+
22
+ pretty_echo "Dev environment sourced from: " "${ENV_SOURCED_FROM}"
23
+ pretty_echo "DEV_ENV: " "${DEV_ENV}"
24
+ pretty_echo "Bench app: " "${BENCH_APP}"
25
+ pretty_echo "Ruby and Gemset: " "${RORO_RVM_RUBY_AND_GEMSET}"
26
+ pretty_echo "Database host: " "${DB_HOST}"
27
+ pretty_echo "Database password: " "${DB_PASSWORD}"
28
+