roro 0.2.4 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -9
  3. data/{docker/env_files/.keep → .keep} +0 -0
  4. data/Guardfile +2 -2
  5. data/README.md +118 -41
  6. data/lib/roro/cli.rb +2 -3
  7. data/lib/roro/cli/base/base.rb +7 -0
  8. data/lib/roro/cli/base/base_files.rb +38 -0
  9. data/lib/roro/cli/base/configuration.rb +63 -0
  10. data/lib/roro/cli/base/continuous_integration.rb +13 -0
  11. data/lib/roro/cli/base/insert_gems.rb +23 -0
  12. data/lib/roro/cli/base/insertions.rb +17 -0
  13. data/lib/roro/cli/base/utilities.rb +17 -0
  14. data/lib/roro/cli/generate_keys.rb +1 -1
  15. data/lib/roro/cli/greenfield.rb +15 -11
  16. data/lib/roro/cli/rollon.rb +19 -12
  17. data/lib/roro/cli/rollon/as_dockerize.rb +28 -0
  18. data/lib/roro/cli/rollon/as_quickstart.rb +17 -0
  19. data/lib/roro/cli/rollon/as_roro.rb +30 -0
  20. data/lib/roro/cli/rollon/use_cases.rb +3 -0
  21. data/lib/roro/cli/ruby_gem.rb +6 -0
  22. data/lib/roro/cli/templates/base/.dockerignore +13 -0
  23. data/{docker/keys → lib/roro/cli/templates/base}/.keep +0 -0
  24. data/{test_apps/dummy_roro/.circleci/config.yml → lib/roro/cli/templates/base/circleci/config.yml.tt} +7 -6
  25. data/lib/roro/cli/templates/{config → base/config}/database.yml +0 -0
  26. data/lib/roro/cli/templates/base/docker-compose.yml.tt +53 -0
  27. data/lib/roro/cli/templates/base/livereload/hosts.example +7 -0
  28. data/lib/roro/cli/templates/{docker/containers/database → base/roro}/.keep +0 -0
  29. data/lib/roro/cli/templates/{docker/env_files → base/roro/containers}/.keep +0 -0
  30. data/lib/roro/cli/templates/{docker/keys → base/roro/containers/app}/.keep +0 -0
  31. data/lib/roro/cli/templates/base/roro/containers/app/Dockerfile.tt +32 -0
  32. data/lib/roro/cli/templates/base/roro/containers/app/development.env.tt +1 -0
  33. data/lib/roro/cli/templates/base/roro/containers/app/docker-entrypoint.sh +8 -0
  34. data/lib/roro/cli/templates/base/roro/containers/app/test.env.tt +1 -0
  35. data/lib/roro/cli/templates/base/roro/containers/database/development.env.tt +4 -0
  36. data/lib/roro/cli/templates/base/roro/containers/database/test.env.tt +4 -0
  37. data/{test_apps/dummy/app/assets/images → lib/roro/cli/templates/base/roro/containers/frontend}/.keep +0 -0
  38. data/{test_apps/dummy/app/assets/javascripts/channels → lib/roro/cli/templates/dockerize/.env}/.keep +0 -0
  39. data/{test_apps/dummy/app/controllers/concerns → lib/roro/cli/templates/dockerize/.env/development}/.keep +0 -0
  40. data/lib/roro/cli/templates/dockerize/.env/development/database +3 -0
  41. data/lib/roro/cli/templates/dockerize/.env/development/web +1 -0
  42. data/{test_apps/dummy/app/models/concerns → lib/roro/cli/templates/dockerize}/.keep +0 -0
  43. data/lib/roro/cli/templates/dockerize/Dockerfile.tt +23 -0
  44. data/lib/roro/cli/templates/dockerize/docker-compose.yml +60 -0
  45. data/lib/roro/cli/templates/dockerize/docker-entrypoint.sh +9 -0
  46. data/lib/roro/cli/templates/greenfield/Dockerfile.tt +21 -0
  47. data/lib/roro/cli/templates/greenfield/Gemfile +1 -1
  48. data/lib/roro/cli/templates/greenfield/docker-compose.yml +12 -10
  49. data/lib/roro/cli/templates/greenfield/docker-entrypoint.sh +8 -0
  50. data/{test_apps/dummy/lib/assets → lib/roro/cli/templates/jumpstart/.env}/.keep +0 -0
  51. data/{test_apps/dummy/lib/tasks → lib/roro/cli/templates/jumpstart/.env/development}/.keep +0 -0
  52. data/lib/roro/cli/templates/jumpstart/.env/development/database +3 -0
  53. data/lib/roro/cli/templates/jumpstart/.env/development/web +1 -0
  54. data/{test_apps/dummy/log → lib/roro/cli/templates/jumpstart}/.keep +0 -0
  55. data/lib/roro/cli/templates/jumpstart/Dockerfile.tt +30 -0
  56. data/lib/roro/cli/templates/jumpstart/docker-compose.yml +59 -0
  57. data/lib/roro/cli/templates/jumpstart/docker-entrypoint.sh +16 -0
  58. data/lib/roro/cli/templates/quickstart/Dockerfile.tt +20 -0
  59. data/{test_apps/dummy/config → lib/roro/cli/templates/quickstart}/database.yml +12 -12
  60. data/lib/roro/cli/templates/quickstart/docker-compose.yml +17 -0
  61. data/lib/roro/cli/templates/quickstart/entrypoint.sh +8 -0
  62. data/lib/roro/cli/templates/ruby_gem/.gitignore +8 -0
  63. data/lib/roro/version.rb +1 -1
  64. data/roro.gemspec +5 -3
  65. data/vendor/cache/actionpack-6.0.3.2.gem +0 -0
  66. data/vendor/cache/actionview-6.0.3.2.gem +0 -0
  67. data/vendor/cache/activesupport-6.0.3.2.gem +0 -0
  68. data/vendor/cache/addressable-2.7.0.gem +0 -0
  69. data/vendor/cache/builder-3.2.4.gem +0 -0
  70. data/vendor/cache/byebug-11.1.3.gem +0 -0
  71. data/vendor/cache/coderay-1.1.3.gem +0 -0
  72. data/vendor/cache/concurrent-ruby-1.1.6.gem +0 -0
  73. data/vendor/cache/crass-1.0.6.gem +0 -0
  74. data/vendor/cache/erubi-1.9.0.gem +0 -0
  75. data/vendor/cache/ffi-1.13.1.gem +0 -0
  76. data/vendor/cache/guard-2.16.2.gem +0 -0
  77. data/vendor/cache/i18n-1.8.5.gem +0 -0
  78. data/vendor/cache/launchy-2.5.0.gem +0 -0
  79. data/vendor/cache/listen-3.2.1.gem +0 -0
  80. data/vendor/cache/loofah-2.6.0.gem +0 -0
  81. data/vendor/cache/lumberjack-1.2.7.gem +0 -0
  82. data/vendor/cache/method_source-1.0.0.gem +0 -0
  83. data/vendor/cache/minitest-5.14.1.gem +0 -0
  84. data/vendor/cache/minitest-rails-6.0.1.gem +0 -0
  85. data/vendor/cache/multi_json-1.15.0.gem +0 -0
  86. data/vendor/cache/net-scp-3.0.0.gem +0 -0
  87. data/vendor/cache/net-ssh-6.1.0.gem +0 -0
  88. data/vendor/cache/{nokogiri-1.9.1.gem → nokogiri-1.10.10.gem} +0 -0
  89. data/vendor/cache/notiffany-0.1.3.gem +0 -0
  90. data/vendor/cache/pry-0.13.1.gem +0 -0
  91. data/vendor/cache/public_suffix-4.0.5.gem +0 -0
  92. data/vendor/cache/rack-2.2.3.gem +0 -0
  93. data/vendor/cache/rails-html-sanitizer-1.3.0.gem +0 -0
  94. data/vendor/cache/railties-6.0.3.2.gem +0 -0
  95. data/vendor/cache/rake-13.0.1.gem +0 -0
  96. data/vendor/cache/rb-fsevent-0.10.4.gem +0 -0
  97. data/vendor/cache/rb-inotify-0.10.1.gem +0 -0
  98. data/vendor/cache/shoulda-4.0.0.gem +0 -0
  99. data/vendor/cache/shoulda-context-2.0.0.gem +0 -0
  100. data/vendor/cache/shoulda-matchers-4.3.0.gem +0 -0
  101. data/vendor/cache/sorcerer-2.0.1.gem +0 -0
  102. data/vendor/cache/thor-1.0.1.gem +0 -0
  103. data/vendor/cache/tzinfo-1.2.7.gem +0 -0
  104. data/vendor/cache/zeitwerk-2.4.0.gem +0 -0
  105. metadata +116 -272
  106. data/.circleci/config.yml +0 -177
  107. data/.circleci/setup-gem-credentials.sh +0 -3
  108. data/.ruby-version +0 -1
  109. data/Gemfile.lock +0 -165
  110. data/_config.yml +0 -1
  111. data/docker-compose.yml +0 -21
  112. data/docker/containers/2_5_3/Dockerfile +0 -10
  113. data/docker/containers/2_6_0/Dockerfile +0 -10
  114. data/docker/containers/app/Dockerfile +0 -10
  115. data/docker/env_files/circleci.env.enc +0 -5
  116. data/lib/roro/cli/base.rb +0 -137
  117. data/lib/roro/cli/templates/Gemfile.lock +0 -0
  118. data/lib/roro/cli/templates/Guardfile +0 -81
  119. data/lib/roro/cli/templates/circleci/Rakefile +0 -4
  120. data/lib/roro/cli/templates/circleci/config.job-example.yml +0 -33
  121. data/lib/roro/cli/templates/circleci/config.yml +0 -69
  122. data/lib/roro/cli/templates/circleci/config.yml.workflow-example +0 -62
  123. data/lib/roro/cli/templates/circleci/deploy.rake +0 -127
  124. data/lib/roro/cli/templates/config.yml +0 -71
  125. data/lib/roro/cli/templates/docker-compose.yml +0 -51
  126. data/lib/roro/cli/templates/docker/containers/app/Dockerfile.tt +0 -12
  127. data/lib/roro/cli/templates/docker/containers/web/Dockerfile.tt +0 -18
  128. data/lib/roro/cli/templates/docker/containers/web/app.conf.tt +0 -23
  129. data/lib/roro/cli/templates/docker/overrides/circleci.yml.tt +0 -19
  130. data/lib/roro/cli/templates/docker/overrides/production.yml.tt +0 -26
  131. data/lib/roro/cli/templates/docker/web/Dockerfile +0 -20
  132. data/lib/roro/cli/templates/docker/web/app.conf +0 -23
  133. data/lib/roro/cli/templates/gitignore +0 -27
  134. data/lib/roro/cli/templates/greenfield/Dockerfile +0 -8
  135. data/lib/roro/cli/templates/lib/tasks/deploy.rake +0 -126
  136. data/test_apps/dummy/.gitignore +0 -27
  137. data/test_apps/dummy/Gemfile +0 -61
  138. data/test_apps/dummy/README.md +0 -24
  139. data/test_apps/dummy/Rakefile +0 -6
  140. data/test_apps/dummy/app/assets/config/manifest.js +0 -3
  141. data/test_apps/dummy/app/assets/javascripts/application.js +0 -16
  142. data/test_apps/dummy/app/assets/javascripts/cable.js +0 -13
  143. data/test_apps/dummy/app/assets/stylesheets/application.css +0 -15
  144. data/test_apps/dummy/app/channels/application_cable/channel.rb +0 -4
  145. data/test_apps/dummy/app/channels/application_cable/connection.rb +0 -4
  146. data/test_apps/dummy/app/controllers/application_controller.rb +0 -2
  147. data/test_apps/dummy/app/helpers/application_helper.rb +0 -2
  148. data/test_apps/dummy/app/jobs/application_job.rb +0 -2
  149. data/test_apps/dummy/app/mailers/application_mailer.rb +0 -4
  150. data/test_apps/dummy/app/models/application_record.rb +0 -3
  151. data/test_apps/dummy/app/views/layouts/application.html.erb +0 -15
  152. data/test_apps/dummy/app/views/layouts/mailer.html.erb +0 -13
  153. data/test_apps/dummy/app/views/layouts/mailer.text.erb +0 -1
  154. data/test_apps/dummy/bin/bundle +0 -3
  155. data/test_apps/dummy/bin/rails +0 -4
  156. data/test_apps/dummy/bin/rake +0 -4
  157. data/test_apps/dummy/bin/setup +0 -36
  158. data/test_apps/dummy/bin/update +0 -31
  159. data/test_apps/dummy/bin/yarn +0 -11
  160. data/test_apps/dummy/config.ru +0 -5
  161. data/test_apps/dummy/config/application.rb +0 -19
  162. data/test_apps/dummy/config/boot.rb +0 -4
  163. data/test_apps/dummy/config/cable.yml +0 -10
  164. data/test_apps/dummy/config/credentials.yml.enc +0 -1
  165. data/test_apps/dummy/config/environment.rb +0 -5
  166. data/test_apps/dummy/config/environments/development.rb +0 -61
  167. data/test_apps/dummy/config/environments/production.rb +0 -94
  168. data/test_apps/dummy/config/environments/test.rb +0 -46
  169. data/test_apps/dummy/config/initializers/application_controller_renderer.rb +0 -8
  170. data/test_apps/dummy/config/initializers/assets.rb +0 -14
  171. data/test_apps/dummy/config/initializers/backtrace_silencers.rb +0 -7
  172. data/test_apps/dummy/config/initializers/content_security_policy.rb +0 -25
  173. data/test_apps/dummy/config/initializers/cookies_serializer.rb +0 -5
  174. data/test_apps/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  175. data/test_apps/dummy/config/initializers/inflections.rb +0 -16
  176. data/test_apps/dummy/config/initializers/mime_types.rb +0 -4
  177. data/test_apps/dummy/config/initializers/wrap_parameters.rb +0 -14
  178. data/test_apps/dummy/config/locales/en.yml +0 -33
  179. data/test_apps/dummy/config/puma.rb +0 -34
  180. data/test_apps/dummy/config/routes.rb +0 -3
  181. data/test_apps/dummy/config/spring.rb +0 -6
  182. data/test_apps/dummy/config/storage.yml +0 -34
  183. data/test_apps/dummy/db/seeds.rb +0 -7
  184. data/test_apps/dummy/package.json +0 -5
  185. data/test_apps/dummy/public/404.html +0 -67
  186. data/test_apps/dummy/public/422.html +0 -67
  187. data/test_apps/dummy/public/500.html +0 -66
  188. data/test_apps/dummy/public/apple-touch-icon-precomposed.png +0 -0
  189. data/test_apps/dummy/public/apple-touch-icon.png +0 -0
  190. data/test_apps/dummy/public/favicon.ico +0 -0
  191. data/test_apps/dummy/public/robots.txt +0 -1
  192. data/test_apps/dummy/storage/.keep +0 -0
  193. data/test_apps/dummy/test/application_system_test_case.rb +0 -5
  194. data/test_apps/dummy/test/controllers/.keep +0 -0
  195. data/test_apps/dummy/test/fixtures/.keep +0 -0
  196. data/test_apps/dummy/test/fixtures/files/.keep +0 -0
  197. data/test_apps/dummy/test/helpers/.keep +0 -0
  198. data/test_apps/dummy/test/integration/.keep +0 -0
  199. data/test_apps/dummy/test/mailers/.keep +0 -0
  200. data/test_apps/dummy/test/models/.keep +0 -0
  201. data/test_apps/dummy/test/system/.keep +0 -0
  202. data/test_apps/dummy/test/test_helper.rb +0 -10
  203. data/test_apps/dummy/tmp/.keep +0 -0
  204. data/test_apps/dummy/vendor/.keep +0 -0
  205. data/test_apps/dummy_gem/.keep +0 -0
  206. data/test_apps/dummy_roro/.circleci/Rakefile +0 -4
  207. data/test_apps/dummy_roro/.circleci/config.job-example.yml +0 -33
  208. data/test_apps/dummy_roro/.circleci/config.yml.workflow-example +0 -62
  209. data/test_apps/dummy_roro/.circleci/deploy.rake +0 -127
  210. data/test_apps/dummy_roro/.gitignore +0 -27
  211. data/test_apps/dummy_roro/Gemfile +0 -64
  212. data/test_apps/dummy_roro/README.md +0 -24
  213. data/test_apps/dummy_roro/Rakefile +0 -6
  214. data/test_apps/dummy_roro/app/assets/config/manifest.js +0 -3
  215. data/test_apps/dummy_roro/app/assets/images/.keep +0 -0
  216. data/test_apps/dummy_roro/app/assets/javascripts/application.js +0 -16
  217. data/test_apps/dummy_roro/app/assets/javascripts/cable.js +0 -13
  218. data/test_apps/dummy_roro/app/assets/javascripts/channels/.keep +0 -0
  219. data/test_apps/dummy_roro/app/assets/stylesheets/application.css +0 -15
  220. data/test_apps/dummy_roro/app/channels/application_cable/channel.rb +0 -4
  221. data/test_apps/dummy_roro/app/channels/application_cable/connection.rb +0 -4
  222. data/test_apps/dummy_roro/app/controllers/application_controller.rb +0 -2
  223. data/test_apps/dummy_roro/app/controllers/concerns/.keep +0 -0
  224. data/test_apps/dummy_roro/app/helpers/application_helper.rb +0 -2
  225. data/test_apps/dummy_roro/app/jobs/application_job.rb +0 -2
  226. data/test_apps/dummy_roro/app/mailers/application_mailer.rb +0 -4
  227. data/test_apps/dummy_roro/app/models/application_record.rb +0 -3
  228. data/test_apps/dummy_roro/app/models/concerns/.keep +0 -0
  229. data/test_apps/dummy_roro/app/views/layouts/application.html.erb +0 -15
  230. data/test_apps/dummy_roro/app/views/layouts/mailer.html.erb +0 -13
  231. data/test_apps/dummy_roro/app/views/layouts/mailer.text.erb +0 -1
  232. data/test_apps/dummy_roro/bin/bundle +0 -3
  233. data/test_apps/dummy_roro/bin/rails +0 -4
  234. data/test_apps/dummy_roro/bin/rake +0 -4
  235. data/test_apps/dummy_roro/bin/setup +0 -36
  236. data/test_apps/dummy_roro/bin/update +0 -31
  237. data/test_apps/dummy_roro/bin/yarn +0 -11
  238. data/test_apps/dummy_roro/config.ru +0 -5
  239. data/test_apps/dummy_roro/config/application.rb +0 -19
  240. data/test_apps/dummy_roro/config/boot.rb +0 -4
  241. data/test_apps/dummy_roro/config/cable.yml +0 -10
  242. data/test_apps/dummy_roro/config/credentials.yml.enc +0 -1
  243. data/test_apps/dummy_roro/config/database.yml +0 -20
  244. data/test_apps/dummy_roro/config/environment.rb +0 -5
  245. data/test_apps/dummy_roro/config/environments/development.rb +0 -61
  246. data/test_apps/dummy_roro/config/environments/production.rb +0 -94
  247. data/test_apps/dummy_roro/config/environments/test.rb +0 -46
  248. data/test_apps/dummy_roro/config/initializers/application_controller_renderer.rb +0 -8
  249. data/test_apps/dummy_roro/config/initializers/assets.rb +0 -14
  250. data/test_apps/dummy_roro/config/initializers/backtrace_silencers.rb +0 -7
  251. data/test_apps/dummy_roro/config/initializers/content_security_policy.rb +0 -25
  252. data/test_apps/dummy_roro/config/initializers/cookies_serializer.rb +0 -5
  253. data/test_apps/dummy_roro/config/initializers/filter_parameter_logging.rb +0 -4
  254. data/test_apps/dummy_roro/config/initializers/inflections.rb +0 -16
  255. data/test_apps/dummy_roro/config/initializers/mime_types.rb +0 -4
  256. data/test_apps/dummy_roro/config/initializers/wrap_parameters.rb +0 -14
  257. data/test_apps/dummy_roro/config/locales/en.yml +0 -33
  258. data/test_apps/dummy_roro/config/puma.rb +0 -34
  259. data/test_apps/dummy_roro/config/routes.rb +0 -3
  260. data/test_apps/dummy_roro/config/spring.rb +0 -6
  261. data/test_apps/dummy_roro/config/storage.yml +0 -34
  262. data/test_apps/dummy_roro/db/seeds.rb +0 -7
  263. data/test_apps/dummy_roro/docker-compose.yml +0 -51
  264. data/test_apps/dummy_roro/docker/containers/app/Dockerfile +0 -12
  265. data/test_apps/dummy_roro/docker/containers/app/circleci.env +0 -2
  266. data/test_apps/dummy_roro/docker/containers/app/development.env +0 -2
  267. data/test_apps/dummy_roro/docker/containers/app/production.env +0 -2
  268. data/test_apps/dummy_roro/docker/containers/app/staging.env +0 -2
  269. data/test_apps/dummy_roro/docker/containers/database/.keep +0 -0
  270. data/test_apps/dummy_roro/docker/containers/database/circleci.env +0 -3
  271. data/test_apps/dummy_roro/docker/containers/database/development.env +0 -3
  272. data/test_apps/dummy_roro/docker/containers/database/production.env +0 -3
  273. data/test_apps/dummy_roro/docker/containers/database/staging.env +0 -3
  274. data/test_apps/dummy_roro/docker/containers/web/Dockerfile +0 -18
  275. data/test_apps/dummy_roro/docker/containers/web/app.conf +0 -23
  276. data/test_apps/dummy_roro/docker/containers/web/circleci.env +0 -1
  277. data/test_apps/dummy_roro/docker/containers/web/development.env +0 -1
  278. data/test_apps/dummy_roro/docker/containers/web/production.env +0 -1
  279. data/test_apps/dummy_roro/docker/containers/web/staging.env +0 -1
  280. data/test_apps/dummy_roro/docker/env_files/circleci.env +0 -12
  281. data/test_apps/dummy_roro/docker/env_files/circleci.env.enc +0 -14
  282. data/test_apps/dummy_roro/docker/env_files/production.env +0 -2
  283. data/test_apps/dummy_roro/docker/env_files/production.env.enc +0 -2
  284. data/test_apps/dummy_roro/docker/keys/.keep +0 -0
  285. data/test_apps/dummy_roro/docker/overrides/circleci.yml +0 -19
  286. data/test_apps/dummy_roro/docker/overrides/production.yml +0 -26
  287. data/test_apps/dummy_roro/lib/assets/.keep +0 -0
  288. data/test_apps/dummy_roro/lib/tasks/.keep +0 -0
  289. data/test_apps/dummy_roro/lib/tasks/deploy.rake +0 -126
  290. data/test_apps/dummy_roro/log/.keep +0 -0
  291. data/test_apps/dummy_roro/package.json +0 -5
  292. data/test_apps/dummy_roro/public/404.html +0 -67
  293. data/test_apps/dummy_roro/public/422.html +0 -67
  294. data/test_apps/dummy_roro/public/500.html +0 -66
  295. data/test_apps/dummy_roro/public/apple-touch-icon-precomposed.png +0 -0
  296. data/test_apps/dummy_roro/public/apple-touch-icon.png +0 -0
  297. data/test_apps/dummy_roro/public/favicon.ico +0 -0
  298. data/test_apps/dummy_roro/public/robots.txt +0 -1
  299. data/test_apps/dummy_roro/storage/.keep +0 -0
  300. data/test_apps/dummy_roro/test/application_system_test_case.rb +0 -5
  301. data/test_apps/dummy_roro/test/controllers/.keep +0 -0
  302. data/test_apps/dummy_roro/test/fixtures/.keep +0 -0
  303. data/test_apps/dummy_roro/test/fixtures/files/.keep +0 -0
  304. data/test_apps/dummy_roro/test/helpers/.keep +0 -0
  305. data/test_apps/dummy_roro/test/integration/.keep +0 -0
  306. data/test_apps/dummy_roro/test/mailers/.keep +0 -0
  307. data/test_apps/dummy_roro/test/models/.keep +0 -0
  308. data/test_apps/dummy_roro/test/system/.keep +0 -0
  309. data/test_apps/dummy_roro/test/test_helper.rb +0 -10
  310. data/test_apps/dummy_roro/tmp/.keep +0 -0
  311. data/test_apps/dummy_roro/vendor/.keep +0 -0
  312. data/test_apps/greenfield/.keep +0 -0
  313. data/vendor/cache/actionpack-5.2.2.gem +0 -0
  314. data/vendor/cache/actionview-5.2.2.gem +0 -0
  315. data/vendor/cache/activesupport-5.2.2.gem +0 -0
  316. data/vendor/cache/addressable-2.5.2.gem +0 -0
  317. data/vendor/cache/builder-3.2.3.gem +0 -0
  318. data/vendor/cache/coderay-1.1.2.gem +0 -0
  319. data/vendor/cache/concurrent-ruby-1.1.4.gem +0 -0
  320. data/vendor/cache/crass-1.0.4.gem +0 -0
  321. data/vendor/cache/erubi-1.8.0.gem +0 -0
  322. data/vendor/cache/ffi-1.9.25.gem +0 -0
  323. data/vendor/cache/guard-2.15.0.gem +0 -0
  324. data/vendor/cache/i18n-1.3.0.gem +0 -0
  325. data/vendor/cache/launchy-2.4.3.gem +0 -0
  326. data/vendor/cache/listen-3.1.5.gem +0 -0
  327. data/vendor/cache/loofah-2.2.3.gem +0 -0
  328. data/vendor/cache/lumberjack-1.0.13.gem +0 -0
  329. data/vendor/cache/method_source-0.9.2.gem +0 -0
  330. data/vendor/cache/minitest-5.11.3.gem +0 -0
  331. data/vendor/cache/minitest-rails-3.0.0.gem +0 -0
  332. data/vendor/cache/multi_json-1.13.1.gem +0 -0
  333. data/vendor/cache/net-scp-1.2.1.gem +0 -0
  334. data/vendor/cache/net-ssh-5.2.0.gem +0 -0
  335. data/vendor/cache/notiffany-0.1.1.gem +0 -0
  336. data/vendor/cache/pry-0.12.2.gem +0 -0
  337. data/vendor/cache/public_suffix-3.0.3.gem +0 -0
  338. data/vendor/cache/rack-2.0.6.gem +0 -0
  339. data/vendor/cache/rails-html-sanitizer-1.0.4.gem +0 -0
  340. data/vendor/cache/railties-5.2.2.gem +0 -0
  341. data/vendor/cache/rake-10.5.0.gem +0 -0
  342. data/vendor/cache/rb-fsevent-0.10.3.gem +0 -0
  343. data/vendor/cache/rb-inotify-0.10.0.gem +0 -0
  344. data/vendor/cache/ruby_dep-1.5.0.gem +0 -0
  345. data/vendor/cache/shoulda-3.6.0.gem +0 -0
  346. data/vendor/cache/shoulda-context-1.2.2.gem +0 -0
  347. data/vendor/cache/shoulda-matchers-3.1.2.gem +0 -0
  348. data/vendor/cache/sorcerer-1.0.2.gem +0 -0
  349. data/vendor/cache/thor-0.20.3.gem +0 -0
  350. data/vendor/cache/tzinfo-1.2.5.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 639ba3036903d8a486608ec5b07f79bf4330e05823b21d7eab7f9f3fde803c62
4
- data.tar.gz: 06bb7ab5697e76eba09a77586b21eb213352df9fd971662ee893c211ed364ae1
3
+ metadata.gz: 6ae59fe35a7653d9c15191a99184ad9f850a50eb49ae6cde1da06ddf29b420a9
4
+ data.tar.gz: 00c864acbcf2155ad14ee0ab6d1b01bb0194352d80fa8191c950691863feb2df
5
5
  SHA512:
6
- metadata.gz: 72b53d0e0cd9cf98914a9dc00921106fbfd68b2ab5452608722a3ee090bc384e74b8e275f5034480fa9f99667fac10912ae4e6c6a2004be28bcf317ddd5f5809
7
- data.tar.gz: 7afa2da9a34364e493457d239ddff73b9791ad519993237fcc779140d90f21d6edd31c91de6878af66896df6a8907bf160bc8104d082ab4e937558c7bdb014ae
6
+ metadata.gz: 9c181460cfb92d19799ad53801f690fcc02335153985a849685a4e4472d935502b25e65387c3a9124b19453498b9f6d575ea128ac73dffe68b556b0c99391beb
7
+ data.tar.gz: a8051fd9f5d70b54dc490c5735396e7bca783554ce42cae6ecab90490d870c77b2b0aa41ce1ed46f00cf7c0c9195b7b5153b9a966ce1028c6f2c5fa53325e887
data/.gitignore CHANGED
@@ -5,13 +5,7 @@
5
5
  /doc/
6
6
  /pkg/
7
7
  /spec/reports/
8
- tmp/dummy/
9
- tmp/dummy_gem/
10
- tmp/dummy_roro/
11
- tmp/greenfield/
12
- !tmp/.keep
13
- greenfield/**/*
8
+ tmp/*
9
+ Gemfile.lock
14
10
  .byebug_history
15
-
16
- docker/**/*.env
17
- docker/**/*.key
11
+ /sandbox/**/*
File without changes
data/Guardfile CHANGED
@@ -3,11 +3,11 @@
3
3
 
4
4
  options = {
5
5
  cli: '',
6
- all_after_run: false
6
+ all_after_run: true,
7
+ all_after_pass: true
7
8
  }
8
9
 
9
10
  guard :minitest, options do
10
- # with Minitest::Unit
11
11
 
12
12
  watch(%r{^test/(.*)\/?test_(.*)\.rb$})
13
13
  watch(%r{^test/(.*)\/?(.*)_test\.rb$})
data/README.md CHANGED
@@ -1,16 +1,23 @@
1
- # Roro
1
+ # RoRo
2
2
 
3
- Roro gives developers a handsome way to create, test, integrate, and deploy Ruby on Rails applications using Guard, CircleCI, Docker, Docker Compose.
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:
4
4
 
5
- ## Installation
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.
6
10
 
11
+ ## Getting started
12
+
13
+ ### Install
14
+
15
+ RoRo can be installed
7
16
  ```bash
8
17
  $ gem install roro
9
18
  ```
10
19
 
11
- ## Usage
12
-
13
- Once installed, Roro provides a CLI:
20
+ Once installed, RoRo provides a CLI:
14
21
 
15
22
  ```bash
16
23
  $ roro --help
@@ -25,84 +32,134 @@ Commands:
25
32
  roro ruby_gem # Generate files for containerized gem testing, Circle...
26
33
  ```
27
34
 
28
- ## Installing Docker and Docker Compose
35
+ However to use RoRo
36
+
37
+
38
+ ### Docker and Docker Compose
29
39
 
30
- Before using Roro's 'greenfield' and 'rollon' commands, you'll need Docker and Docker Compose. To see if Docker is installed:
40
+ You'll need [Docker](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/). To confirm Docker is installed:
31
41
 
32
42
  ```bash
33
43
  $ docker -v
34
44
  Docker version 18.03.1-ce, build 9ee9f40
35
45
  ```
36
46
 
37
- Instructions for installing [Docker](https://docs.docker.com/install/). To see if Docker Compose is installed:
47
+ To confirm Docker Compose is installed:
38
48
 
39
49
  ```bash
40
50
  $ docker-compose -v
41
51
  docker-compose version 1.21.0, build 5920eb0
42
52
  ```
43
53
 
44
- Instructions for installing [Docker Compose](https://docs.docker.com/compose/install/).
45
-
46
- ## Greenfielding a dockerized app:
54
+ ### Greenfielding a dockerized app
47
55
 
48
56
  ```bash
49
57
  $ mkdir -p handsome_app
50
58
  $ cd handsome_app
51
59
  $ roro greenfield
52
- $ docker-compose up
53
60
  ```
54
61
 
55
- You should now be able to see the Rails welcome screen upon clicking [http://localhost:3000/](http://localhost:3000/).
62
+ 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/).
56
63
 
57
- If you're on a linux machine and run into issues, please see the
58
- [linux notes](#linux-notes).
64
+ ### Rolling onto an existing app
59
65
 
66
+ Whether using your own app or one greenfielded using instructions above, first shut down any running docker containers:
60
67
 
61
- ### Rolling onto an existing app:
68
+ ```bash
69
+ $ docker-compose down
70
+ ```
62
71
 
63
- Using your own app or one generated using the 'greenfield' instructions above:
72
+ Then, roll RoRo on:
64
73
 
65
74
  ```bash
66
- $ docker-compose down
67
75
  $ roro rollon
68
- $ docker-compose up
69
76
  ```
70
77
 
71
- You should now be able to see the Rails welcome screen upon clicking [http://localhost:3000/](http://localhost:3000/).
78
+ If your host machine runs a flavor of linux, ensure its logged in user owns the generated files:
79
+
80
+ ```bash
81
+ $ sudo chown <username><user group> -R .
82
+ ```
83
+
84
+ And spin it up:
72
85
 
73
- ## Securing environment files
86
+ ```bash
87
+ $ docker-compose up --build
88
+ ```
74
89
 
75
- Roro gives provides conventions for securing your environment files. To store a variable for use in your development environment, create a file with that variable, name it "development.env," and store it in docker/env_files like so:
90
+ As with greenfielding above, wait a few minutes, and when it's finished, open [http://localhost:3000/](http://localhost:3000/).
91
+
92
+
93
+ ### Guard and tests
94
+
95
+ From another terminal:
96
+
97
+ ```bash
98
+ $ docker-compose exec app bundle exec guard
99
+ ```
100
+
101
+ To use LiveReoload with Guard, install the Chrome [extension](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en):
102
+
103
+
104
+ ## Deployment
105
+
106
+ ### Securing environment files
107
+
108
+ Roro provides conventions for securing sensitive variables between docker containers and environments. To store a variable for use in development, create a file with that variable inside, name it "development.env," and store it in docker/env_files. Here's a one-liner:
109
+
110
+ ```bash
111
+ $ echo "export EXAMPLE_KEY=example_value" > docker/env_files/development.env
112
+ ```
113
+
114
+ Next, generate a key for the development environment:
76
115
 
77
116
  ```bash
78
- $ echo "export export EXplace to put environment files for use in dockerized environments. AMPLE_KEY=example_value" > docker/env_files/development.env
79
117
  $ roro generate_key development
118
+ ```
119
+
120
+ Then encrypt the development.env file using the previously generated development key:
121
+
122
+ ```bash
80
123
  $ roro obfuscate development
81
124
  ```
82
125
 
83
- You should now see an environment file and its encrypted counterpart in docker/env_files:
126
+ You should now have the environment file and its encrypted counterpart:
84
127
 
85
128
  ```bash
86
129
  $ ls docker/env_files
87
130
  development.env development.env.enc
88
131
  ```
89
132
 
90
- To expose a previously obfuscated file:
133
+ To see how decryption works, first back up a copy of your development.env file:
91
134
 
92
135
  ```bash
93
136
  $ mv docker/env_files/development.env docker/env_files/backup.env
137
+ ```
138
+
139
+ Then expose its encrypted counterpart:
140
+
141
+ ```bash
94
142
  $ roro expose development
95
143
  ```
96
144
 
97
- To verify the newly decrypted file contents match its backup:
145
+ You should now have three files:
146
+
147
+ ```bash
148
+ $ ls docker/env_files
149
+ backup.env development.env development.env.enc
150
+ ```
151
+
152
+ To verify the newly decrypted file's contents match those of its backup:
98
153
 
99
154
  ```bash
100
155
  $ diff docker/env_files/development.env docker/env_files/backup.env
101
156
  ```
102
157
 
103
- ## Linux notes
158
+ ## Notes
104
159
 
105
- If you're on a linux machine, you may need to change ownership of the newly created files:
160
+ ### Linux
161
+
162
+ If you're running linux you may need to change ownership of the newly created files, prepend commands with sudo, or both. To change ownership of newly generated files:
106
163
 
107
164
  ```bash
108
165
  $ sudo chown <username><user group> -R .
@@ -110,34 +167,54 @@ $ sudo chown <username><user group> -R .
110
167
 
111
168
  If that doesn't work, Docker's [documentation](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) should get you pointed in the right direction.
112
169
 
113
- ## Troubleshooting
170
+ ### Troubleshooting
171
+
172
+ #### Port in use
114
173
 
115
- Sometimes the port is in use. This could be because you have a server running on your host machine, or because Docker is running a server and piping it to the host. To shut down a server running in Docker, do:
174
+ Sometimes you will ge a message saying the port specified in your docker-compose.yml file is already in use. This may be because you have a server running on your host from normal development, or because another Docker container is running a server and piping it to your host. If the former you can shut it down using ctrl^c, and if the latter:
116
175
 
117
176
  ```
118
177
  $ docker-compose down
119
178
  ```
120
179
 
121
- Sometimes shutting down all servers doesn't work, because Rails still thinks a server is already running, which is usuall because there's a .pid file somewhere.
180
+ Sometimes shutting down all servers isn't enough because a .pid file remains. You can usually remove it with:
122
181
 
182
+ ```bash
123
183
  $ rm /tmp/pids/server.pid
184
+ ```
124
185
 
125
- Sometimes you just need a fresh start. To remove all images, containers, and volumes from your system:
186
+ If that doesn't work, restart your machine.
126
187
 
127
- $ docker system prune -af --volumes
188
+ #### Mismatched ruby versions
128
189
 
129
- ## Contributing
190
+ Sometimes your Gemfile will specify a ruby version which doesn't match the ruby version of the image your container is using. There are three ways to handle this. The first way is to specify an image with the same version of ruby as is in your Gemfile. Open your Dockerfile and change:
130
191
 
131
- This gem and the associated practices are just a way of deploying your application, not the canonical or best way. If you have suggestions on how to make it easier, more secure, quicker or better, please share them. If you have specific ideas, please fork the repo, make your changes, write your tests, and send me a pull request.
192
+ ```
193
+ FROM ruby:2.5
194
+ ```
195
+ to:
196
+ ```
197
+ FROM ruby:2.5.x
198
+ ```
199
+ ...where 2.5.x is the ruby specified in your Gemfile. The second way is to specify the same version of ruby in your app container's image as at the top of your Gemfile:
132
200
 
133
- ## License
134
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
201
+ ```ruby
202
+ ruby '2.5.x'
203
+ ```
135
204
 
205
+ The third way is to remove the ruby specification from your Gemfile, relying on your Dockerfile for ruby version management.
136
206
 
137
- should get you pointed in the right direction. , you may need to prepend 'sudo' to the above command, or chown newly created files:
207
+ #### Get out of jail
208
+
209
+ To remove all images, containers, and volumes from your system and start over:
138
210
 
139
211
  ```bash
140
- $ sudo chown <username><user group> -R .
212
+ $ docker system prune -af --volumes
141
213
  ```
142
214
 
143
- If that doesn't work, Docker's [documentation](https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user) should get you pointed in the right direction.
215
+ ## Contributing
216
+
217
+ This gem and its associated practices are just one way of using these tools and not the canonical way. My purpose in publishing it is to get a conversation started about what conventions around these tools might look like. If you have ideas on how to make it better please put in an issue -- or fork the repo, make your changes, write your tests, and send me a pull request. It'll make me feel warm inside.
218
+
219
+ ## License
220
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,5 +1,6 @@
1
+ require 'byebug'
1
2
  require 'thor'
2
- require 'roro/cli/base'
3
+ require 'roro/cli/base/base'
3
4
  require 'roro/cli/rollon'
4
5
  require 'roro/cli/greenfield'
5
6
  require 'roro/cli/generate_keys'
@@ -15,7 +16,5 @@ module Roro
15
16
  def self.source_root
16
17
  File.dirname(__FILE__) + '/cli/templates'
17
18
  end
18
-
19
-
20
19
  end
21
20
  end
@@ -0,0 +1,7 @@
1
+ require_relative 'configuration.rb'
2
+ require_relative 'continuous_integration.rb'
3
+ require_relative 'utilities.rb'
4
+ require_relative 'insertions.rb'
5
+ require_relative 'insert_gems.rb'
6
+ require_relative 'base_files.rb'
7
+
@@ -0,0 +1,38 @@
1
+ module Roro
2
+
3
+ class CLI < Thor
4
+
5
+ no_commands do
6
+
7
+ def copy_dockerignore
8
+ copy_file 'base/.dockerignore', '.dockerignore', @env_hash[:use_force]
9
+
10
+ end
11
+
12
+ def copy_host_example
13
+ copy_file 'base/livereload/hosts.example', 'hosts.example'
14
+ end
15
+
16
+ def copy_docker_compose
17
+ template "base/docker-compose.yml", 'docker-compose.yml', @env_hash[:force]
18
+ end
19
+
20
+ def copy_roro
21
+ directory 'base/roro/containers/app', "roro/containers/#{@env_hash[:app_name]}", @env_hash
22
+ directory 'base/roro/containers/database', "roro/containers/#{@env_hash[:database_container]}", @env_hash
23
+ directory 'base/roro/containers/frontend', "roro/containers/#{@env_hash[:frontend_container]}", @env_hash
24
+ end
25
+
26
+ def copy_config_database_yml
27
+ copy_file "base/config/database.yml", 'config/database.yml', @env_hash[:use_force]
28
+ end
29
+
30
+ def copy_base_files
31
+ copy_circleci
32
+ copy_roro
33
+ copy_docker_compose
34
+ copy_config_database_yml
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,63 @@
1
+
2
+ module Roro
3
+
4
+ class CLI < Thor
5
+
6
+ no_commands do
7
+
8
+ def get_configuration_variables
9
+ options["interactive"] ? set_interactively : set_from_defaults
10
+ @env_hash[:deploy_tag] = "${CIRCLE_SHA1:0:7}"
11
+ @env_hash[:server_port] = "22"
12
+ @env_hash[:server_user] = "root"
13
+ @env_hash
14
+ end
15
+
16
+ def set_from_defaults
17
+ @env_hash = configuration_hash
18
+ @env_hash.map do |key, hash|
19
+ @env_hash[key] = hash.values.last
20
+ end
21
+ @env_hash
22
+ end
23
+
24
+ def set_interactively
25
+ @env_hash = configuration_hash
26
+ @env_hash.map do |key, prompt|
27
+ answer = ask("Please provide #{prompt.keys.first} or hit enter to accept: \[ #{prompt.values.first} \]")
28
+ @env_hash[key] = (answer == "") ? prompt.values.first : answer
29
+ end
30
+ end
31
+
32
+ private
33
+
34
+ def configuration_hash
35
+ {
36
+ app_name: {
37
+ "the name of your app" => `pwd`.split('/').last.strip! },
38
+ ruby_version: {
39
+ "the version of ruby you'd like" => `ruby -v`.scan(/\d.\d/).first },
40
+ server_host: {
41
+ "the ip address of your server" => "ip-address-of-your-server"},
42
+ database_container: {
43
+ "the name of your database container" => "database"},
44
+ frontend_container: {
45
+ "the name of your frontend container" => "frontend"},
46
+ server_container: {
47
+ "the name of your server container" => "nginx"},
48
+ dockerhub_email: {
49
+ "your Docker Hub email" => "your-docker-hub-email"},
50
+ dockerhub_user: {
51
+ "your Docker Hub username" => "your-docker-hub-user-name" },
52
+ dockerhub_org: {
53
+ "your Docker Hub organization name" => "your-docker-hub-org-name"},
54
+ dockerhub_password: {
55
+ "your Docker Hub password" => "your-docker-hub-password"},
56
+ postgres_user: {
57
+ "your Postgres username" => "postgres"},
58
+ postgres_password: {
59
+ "your Postgres password" => "your-postgres-password"} }
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,13 @@
1
+
2
+ module Roro
3
+
4
+ class CLI < Thor
5
+
6
+ no_commands do
7
+
8
+ def copy_circleci
9
+ directory 'base/circleci', '.circleci', @env_hash
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+
2
+ module Roro
3
+
4
+ class CLI < Thor
5
+
6
+ no_commands do
7
+
8
+ def insert_roro_gem_into_gemfile
9
+ insert_into_file 'Gemfile', "gem 'roro'", before: "group :development, :test do"
10
+ end
11
+
12
+ def insert_pg_gem_into_gemfile
13
+ comment_lines 'Gemfile', /sqlite/
14
+ comment_lines 'Gemfile', /mysql/
15
+ insert_into_file 'Gemfile', "gem 'pg'\n", before: "group :development, :test do"
16
+ end
17
+
18
+ def insert_hfci_gem_into_gemfile
19
+ insert_into_file 'Gemfile', "gem 'handsome_fencer-test'", after: "group :development, :test do"
20
+ end
21
+ end
22
+ end
23
+ end