roro 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +99 -0
  3. data/.circleci/setup-gem-credentials.sh +3 -0
  4. data/.gitignore +7 -1
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/Gemfile.lock +24 -10
  8. data/Guardfile +46 -0
  9. data/bin/roro +5 -0
  10. data/docker/env_files/.keep +0 -0
  11. data/docker/env_files/circleci.env.enc +2 -0
  12. data/docker/keys/.keep +0 -0
  13. data/lib/roro.rb +2 -0
  14. data/lib/roro/cli.rb +18 -0
  15. data/lib/roro/cli/base.rb +124 -0
  16. data/lib/roro/cli/dockerize.rb +30 -0
  17. data/lib/roro/cli/expose.rb +13 -0
  18. data/lib/roro/cli/generate_keys.rb +79 -0
  19. data/lib/roro/cli/greenfield.rb +37 -0
  20. data/lib/roro/cli/obfuscate.rb +20 -0
  21. data/lib/roro/cli/rollon.rb +21 -0
  22. data/lib/roro/cli/templates/Gemfile.lock +0 -0
  23. data/lib/roro/cli/templates/Guardfile +81 -0
  24. data/lib/roro/cli/templates/circleci/Rakefile +4 -0
  25. data/lib/roro/cli/templates/circleci/config.job-example.yml +33 -0
  26. data/lib/roro/cli/templates/circleci/config.yml +69 -0
  27. data/lib/roro/cli/templates/circleci/config.yml.workflow-example +62 -0
  28. data/lib/roro/cli/templates/circleci/deploy.rake +127 -0
  29. data/lib/roro/cli/templates/config.yml +71 -0
  30. data/lib/roro/cli/templates/config/database.yml +20 -0
  31. data/lib/roro/cli/templates/docker-compose.yml +51 -0
  32. data/lib/roro/cli/templates/docker/containers/app/Dockerfile.tt +12 -0
  33. data/lib/roro/cli/templates/docker/containers/database/.keep +0 -0
  34. data/lib/roro/cli/templates/docker/containers/web/Dockerfile.tt +18 -0
  35. data/lib/roro/cli/templates/docker/containers/web/app.conf.tt +23 -0
  36. data/lib/roro/cli/templates/docker/env_files/.keep +0 -0
  37. data/lib/roro/cli/templates/docker/keys/.keep +0 -0
  38. data/lib/roro/cli/templates/docker/overrides/circleci.yml.tt +19 -0
  39. data/lib/roro/cli/templates/docker/overrides/production.yml.tt +26 -0
  40. data/lib/roro/cli/templates/docker/web/Dockerfile +20 -0
  41. data/lib/roro/cli/templates/docker/web/app.conf +23 -0
  42. data/lib/roro/cli/templates/gitignore +27 -0
  43. data/lib/roro/cli/templates/greenfield/Dockerfile +8 -0
  44. data/lib/roro/cli/templates/greenfield/Gemfile +2 -0
  45. data/lib/roro/cli/templates/greenfield/Gemfile.lock +0 -0
  46. data/lib/roro/cli/templates/greenfield/config/database.yml.example +16 -0
  47. data/lib/roro/cli/templates/greenfield/docker-compose.yml +15 -0
  48. data/lib/roro/cli/templates/lib/tasks/deploy.rake +126 -0
  49. data/lib/roro/version.rb +1 -1
  50. data/lib/tasks/deploy.rake +126 -0
  51. data/roro.gemspec +9 -2
  52. data/test_apps/dummy/.gitignore +27 -0
  53. data/test_apps/dummy/Gemfile +61 -0
  54. data/test_apps/dummy/README.md +24 -0
  55. data/test_apps/dummy/Rakefile +6 -0
  56. data/test_apps/dummy/app/assets/config/manifest.js +3 -0
  57. data/test_apps/dummy/app/assets/images/.keep +0 -0
  58. data/test_apps/dummy/app/assets/javascripts/application.js +16 -0
  59. data/test_apps/dummy/app/assets/javascripts/cable.js +13 -0
  60. data/test_apps/dummy/app/assets/javascripts/channels/.keep +0 -0
  61. data/test_apps/dummy/app/assets/stylesheets/application.css +15 -0
  62. data/test_apps/dummy/app/channels/application_cable/channel.rb +4 -0
  63. data/test_apps/dummy/app/channels/application_cable/connection.rb +4 -0
  64. data/test_apps/dummy/app/controllers/application_controller.rb +2 -0
  65. data/test_apps/dummy/app/controllers/concerns/.keep +0 -0
  66. data/test_apps/dummy/app/helpers/application_helper.rb +2 -0
  67. data/test_apps/dummy/app/jobs/application_job.rb +2 -0
  68. data/test_apps/dummy/app/mailers/application_mailer.rb +4 -0
  69. data/test_apps/dummy/app/models/application_record.rb +3 -0
  70. data/test_apps/dummy/app/models/concerns/.keep +0 -0
  71. data/test_apps/dummy/app/views/layouts/application.html.erb +15 -0
  72. data/test_apps/dummy/app/views/layouts/mailer.html.erb +13 -0
  73. data/test_apps/dummy/app/views/layouts/mailer.text.erb +1 -0
  74. data/test_apps/dummy/bin/bundle +3 -0
  75. data/test_apps/dummy/bin/rails +4 -0
  76. data/test_apps/dummy/bin/rake +4 -0
  77. data/test_apps/dummy/bin/setup +36 -0
  78. data/test_apps/dummy/bin/update +31 -0
  79. data/test_apps/dummy/bin/yarn +11 -0
  80. data/test_apps/dummy/config.ru +5 -0
  81. data/test_apps/dummy/config/application.rb +19 -0
  82. data/test_apps/dummy/config/boot.rb +4 -0
  83. data/test_apps/dummy/config/cable.yml +10 -0
  84. data/test_apps/dummy/config/credentials.yml.enc +1 -0
  85. data/test_apps/dummy/config/database.yml +85 -0
  86. data/test_apps/dummy/config/environment.rb +5 -0
  87. data/test_apps/dummy/config/environments/development.rb +61 -0
  88. data/test_apps/dummy/config/environments/production.rb +94 -0
  89. data/test_apps/dummy/config/environments/test.rb +46 -0
  90. data/test_apps/dummy/config/initializers/application_controller_renderer.rb +8 -0
  91. data/test_apps/dummy/config/initializers/assets.rb +14 -0
  92. data/test_apps/dummy/config/initializers/backtrace_silencers.rb +7 -0
  93. data/test_apps/dummy/config/initializers/content_security_policy.rb +25 -0
  94. data/test_apps/dummy/config/initializers/cookies_serializer.rb +5 -0
  95. data/test_apps/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  96. data/test_apps/dummy/config/initializers/inflections.rb +16 -0
  97. data/test_apps/dummy/config/initializers/mime_types.rb +4 -0
  98. data/test_apps/dummy/config/initializers/wrap_parameters.rb +14 -0
  99. data/test_apps/dummy/config/locales/en.yml +33 -0
  100. data/test_apps/dummy/config/puma.rb +34 -0
  101. data/test_apps/dummy/config/routes.rb +3 -0
  102. data/test_apps/dummy/config/spring.rb +6 -0
  103. data/test_apps/dummy/config/storage.yml +34 -0
  104. data/test_apps/dummy/db/seeds.rb +7 -0
  105. data/test_apps/dummy/lib/assets/.keep +0 -0
  106. data/test_apps/dummy/lib/tasks/.keep +0 -0
  107. data/test_apps/dummy/log/.keep +0 -0
  108. data/test_apps/dummy/package.json +5 -0
  109. data/test_apps/dummy/public/404.html +67 -0
  110. data/test_apps/dummy/public/422.html +67 -0
  111. data/test_apps/dummy/public/500.html +66 -0
  112. data/test_apps/dummy/public/apple-touch-icon-precomposed.png +0 -0
  113. data/test_apps/dummy/public/apple-touch-icon.png +0 -0
  114. data/test_apps/dummy/public/favicon.ico +0 -0
  115. data/test_apps/dummy/public/robots.txt +1 -0
  116. data/test_apps/dummy/storage/.keep +0 -0
  117. data/test_apps/dummy/test/application_system_test_case.rb +5 -0
  118. data/test_apps/dummy/test/controllers/.keep +0 -0
  119. data/test_apps/dummy/test/fixtures/.keep +0 -0
  120. data/test_apps/dummy/test/fixtures/files/.keep +0 -0
  121. data/test_apps/dummy/test/helpers/.keep +0 -0
  122. data/test_apps/dummy/test/integration/.keep +0 -0
  123. data/test_apps/dummy/test/mailers/.keep +0 -0
  124. data/test_apps/dummy/test/models/.keep +0 -0
  125. data/test_apps/dummy/test/system/.keep +0 -0
  126. data/test_apps/dummy/test/test_helper.rb +10 -0
  127. data/test_apps/dummy/vendor/.keep +0 -0
  128. data/test_apps/dummy_roro/.circleci/Rakefile +4 -0
  129. data/test_apps/dummy_roro/.circleci/config.job-example.yml +33 -0
  130. data/test_apps/dummy_roro/.circleci/config.yml +69 -0
  131. data/test_apps/dummy_roro/.circleci/config.yml.workflow-example +62 -0
  132. data/test_apps/dummy_roro/.circleci/deploy.rake +127 -0
  133. data/test_apps/dummy_roro/.gitignore +27 -0
  134. data/test_apps/dummy_roro/Gemfile +64 -0
  135. data/test_apps/dummy_roro/README.md +24 -0
  136. data/test_apps/dummy_roro/Rakefile +6 -0
  137. data/test_apps/dummy_roro/app/assets/config/manifest.js +3 -0
  138. data/test_apps/dummy_roro/app/assets/images/.keep +0 -0
  139. data/test_apps/dummy_roro/app/assets/javascripts/application.js +16 -0
  140. data/test_apps/dummy_roro/app/assets/javascripts/cable.js +13 -0
  141. data/test_apps/dummy_roro/app/assets/javascripts/channels/.keep +0 -0
  142. data/test_apps/dummy_roro/app/assets/stylesheets/application.css +15 -0
  143. data/test_apps/dummy_roro/app/channels/application_cable/channel.rb +4 -0
  144. data/test_apps/dummy_roro/app/channels/application_cable/connection.rb +4 -0
  145. data/test_apps/dummy_roro/app/controllers/application_controller.rb +2 -0
  146. data/test_apps/dummy_roro/app/controllers/concerns/.keep +0 -0
  147. data/test_apps/dummy_roro/app/helpers/application_helper.rb +2 -0
  148. data/test_apps/dummy_roro/app/jobs/application_job.rb +2 -0
  149. data/test_apps/dummy_roro/app/mailers/application_mailer.rb +4 -0
  150. data/test_apps/dummy_roro/app/models/application_record.rb +3 -0
  151. data/test_apps/dummy_roro/app/models/concerns/.keep +0 -0
  152. data/test_apps/dummy_roro/app/views/layouts/application.html.erb +15 -0
  153. data/test_apps/dummy_roro/app/views/layouts/mailer.html.erb +13 -0
  154. data/test_apps/dummy_roro/app/views/layouts/mailer.text.erb +1 -0
  155. data/test_apps/dummy_roro/bin/bundle +3 -0
  156. data/test_apps/dummy_roro/bin/rails +4 -0
  157. data/test_apps/dummy_roro/bin/rake +4 -0
  158. data/test_apps/dummy_roro/bin/setup +36 -0
  159. data/test_apps/dummy_roro/bin/update +31 -0
  160. data/test_apps/dummy_roro/bin/yarn +11 -0
  161. data/test_apps/dummy_roro/config.ru +5 -0
  162. data/test_apps/dummy_roro/config/application.rb +19 -0
  163. data/test_apps/dummy_roro/config/boot.rb +4 -0
  164. data/test_apps/dummy_roro/config/cable.yml +10 -0
  165. data/test_apps/dummy_roro/config/credentials.yml.enc +1 -0
  166. data/test_apps/dummy_roro/config/database.yml +20 -0
  167. data/test_apps/dummy_roro/config/environment.rb +5 -0
  168. data/test_apps/dummy_roro/config/environments/development.rb +61 -0
  169. data/test_apps/dummy_roro/config/environments/production.rb +94 -0
  170. data/test_apps/dummy_roro/config/environments/test.rb +46 -0
  171. data/test_apps/dummy_roro/config/initializers/application_controller_renderer.rb +8 -0
  172. data/test_apps/dummy_roro/config/initializers/assets.rb +14 -0
  173. data/test_apps/dummy_roro/config/initializers/backtrace_silencers.rb +7 -0
  174. data/test_apps/dummy_roro/config/initializers/content_security_policy.rb +25 -0
  175. data/test_apps/dummy_roro/config/initializers/cookies_serializer.rb +5 -0
  176. data/test_apps/dummy_roro/config/initializers/filter_parameter_logging.rb +4 -0
  177. data/test_apps/dummy_roro/config/initializers/inflections.rb +16 -0
  178. data/test_apps/dummy_roro/config/initializers/mime_types.rb +4 -0
  179. data/test_apps/dummy_roro/config/initializers/wrap_parameters.rb +14 -0
  180. data/test_apps/dummy_roro/config/locales/en.yml +33 -0
  181. data/test_apps/dummy_roro/config/puma.rb +34 -0
  182. data/test_apps/dummy_roro/config/routes.rb +3 -0
  183. data/test_apps/dummy_roro/config/spring.rb +6 -0
  184. data/test_apps/dummy_roro/config/storage.yml +34 -0
  185. data/test_apps/dummy_roro/db/seeds.rb +7 -0
  186. data/test_apps/dummy_roro/docker-compose.yml +51 -0
  187. data/test_apps/dummy_roro/docker/containers/app/Dockerfile +12 -0
  188. data/test_apps/dummy_roro/docker/containers/app/circleci.env +2 -0
  189. data/test_apps/dummy_roro/docker/containers/app/development.env +2 -0
  190. data/test_apps/dummy_roro/docker/containers/app/production.env +2 -0
  191. data/test_apps/dummy_roro/docker/containers/app/staging.env +2 -0
  192. data/test_apps/dummy_roro/docker/containers/database/.keep +0 -0
  193. data/test_apps/dummy_roro/docker/containers/database/circleci.env +3 -0
  194. data/test_apps/dummy_roro/docker/containers/database/development.env +3 -0
  195. data/test_apps/dummy_roro/docker/containers/database/production.env +3 -0
  196. data/test_apps/dummy_roro/docker/containers/database/staging.env +3 -0
  197. data/test_apps/dummy_roro/docker/containers/web/Dockerfile +18 -0
  198. data/test_apps/dummy_roro/docker/containers/web/app.conf +23 -0
  199. data/test_apps/dummy_roro/docker/containers/web/circleci.env +1 -0
  200. data/test_apps/dummy_roro/docker/containers/web/development.env +1 -0
  201. data/test_apps/dummy_roro/docker/containers/web/production.env +1 -0
  202. data/test_apps/dummy_roro/docker/containers/web/staging.env +1 -0
  203. data/test_apps/dummy_roro/docker/env_files/circleci.env +12 -0
  204. data/test_apps/dummy_roro/docker/env_files/circleci.env.enc +14 -0
  205. data/test_apps/dummy_roro/docker/env_files/production.env +2 -0
  206. data/test_apps/dummy_roro/docker/env_files/production.env.enc +2 -0
  207. data/test_apps/dummy_roro/docker/keys/.keep +0 -0
  208. data/test_apps/dummy_roro/docker/overrides/circleci.yml +19 -0
  209. data/test_apps/dummy_roro/docker/overrides/production.yml +26 -0
  210. data/test_apps/dummy_roro/lib/assets/.keep +0 -0
  211. data/test_apps/dummy_roro/lib/tasks/.keep +0 -0
  212. data/test_apps/dummy_roro/lib/tasks/deploy.rake +126 -0
  213. data/test_apps/dummy_roro/log/.keep +0 -0
  214. data/test_apps/dummy_roro/package.json +5 -0
  215. data/test_apps/dummy_roro/public/404.html +67 -0
  216. data/test_apps/dummy_roro/public/422.html +67 -0
  217. data/test_apps/dummy_roro/public/500.html +66 -0
  218. data/test_apps/dummy_roro/public/apple-touch-icon-precomposed.png +0 -0
  219. data/test_apps/dummy_roro/public/apple-touch-icon.png +0 -0
  220. data/test_apps/dummy_roro/public/favicon.ico +0 -0
  221. data/test_apps/dummy_roro/public/robots.txt +1 -0
  222. data/test_apps/dummy_roro/storage/.keep +0 -0
  223. data/test_apps/dummy_roro/test/application_system_test_case.rb +5 -0
  224. data/test_apps/dummy_roro/test/controllers/.keep +0 -0
  225. data/test_apps/dummy_roro/test/fixtures/.keep +0 -0
  226. data/test_apps/dummy_roro/test/fixtures/files/.keep +0 -0
  227. data/test_apps/dummy_roro/test/helpers/.keep +0 -0
  228. data/test_apps/dummy_roro/test/integration/.keep +0 -0
  229. data/test_apps/dummy_roro/test/mailers/.keep +0 -0
  230. data/test_apps/dummy_roro/test/models/.keep +0 -0
  231. data/test_apps/dummy_roro/test/system/.keep +0 -0
  232. data/test_apps/dummy_roro/test/test_helper.rb +10 -0
  233. data/test_apps/dummy_roro/vendor/.keep +0 -0
  234. data/test_apps/greenfield/.keep +0 -0
  235. metadata +292 -5
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,16 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
5
+ // vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require rails-ujs
14
+ //= require activestorage
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationController < ActionController::Base
2
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
9
+ <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
10
+ </head>
11
+
12
+ <body>
13
+ <%= yield %>
14
+ </body>
15
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a starting point to setup your application.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ # puts "\n== Copying sample files =="
24
+ # unless File.exist?('config/database.yml')
25
+ # cp 'config/database.yml.sample', 'config/database.yml'
26
+ # end
27
+
28
+ puts "\n== Preparing database =="
29
+ system! 'bin/rails db:setup'
30
+
31
+ puts "\n== Removing old logs and tempfiles =="
32
+ system! 'bin/rails log:clear tmp:clear'
33
+
34
+ puts "\n== Restarting application server =="
35
+ system! 'bin/rails restart'
36
+ end
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a way to update your development environment automatically.
14
+ # Add necessary update steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ puts "\n== Updating database =="
24
+ system! 'bin/rails db:migrate'
25
+
26
+ puts "\n== Removing old logs and tempfiles =="
27
+ system! 'bin/rails log:clear tmp:clear'
28
+
29
+ puts "\n== Restarting application server =="
30
+ system! 'bin/rails restart'
31
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
+ begin
5
+ exec "yarnpkg", *ARGV
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,19 @@
1
+ require_relative 'boot'
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Initialize configuration defaults for originally generated Rails version.
12
+ config.load_defaults 5.2
13
+
14
+ # Settings in config/environments/* take precedence over those specified here.
15
+ # Application configuration can go into files in config/initializers
16
+ # -- all .rb files in that directory are automatically loaded after loading
17
+ # the framework and any gems in your application.
18
+ end
19
+ end
@@ -0,0 +1,4 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
4
+ require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -0,0 +1 @@
1
+ ABUbVD3qNSnOvWiPVGLbvqKpuvbQ5I1Dl7KcqV8DTruBDbmTVJkWHPh/3uKA5KrgN8H74KlzXtM7DMXljscnCLhMEd2EzeCIOecSUow7K0X9t/PB7613hGfaeMNSvVkmrsJMJYgaW19VvvND/WmKXhaktdCqSwq4tTEopNw6Jdicl0JfNKPfLlYLU6G+pEyr7Qx7MhVB7pHl0uR1E6IuDM8MJPDSpm27bkcGO4G7L5juFyH64ivRhvGEPjwotfX6Mga8SzTZJ8cuuW1pJxo0rYL8WBrfoM8iTv6Ec93XEcdtkLLopPm3mMt32ZB8TDomrVUghzOrvnxP5u0I4g1Z+WHbRQusk6kBQzsjfhpxOiGffVwCV949cGBPP2NFdfNO+WyWtCQevCZLsU3Du1lxWYhGmQPfFXSXMmGJ--TKhmp16Ilx3MBR3L--lNc3PqMMAINbxHM/biESTQ==
@@ -0,0 +1,85 @@
1
+ # PostgreSQL. Versions 9.1 and up are supported.
2
+ #
3
+ # Install the pg driver:
4
+ # gem install pg
5
+ # On OS X with Homebrew:
6
+ # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7
+ # On OS X with MacPorts:
8
+ # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9
+ # On Windows:
10
+ # gem install pg
11
+ # Choose the win32 build.
12
+ # Install PostgreSQL and put its /bin directory on your path.
13
+ #
14
+ # Configure Using Gemfile
15
+ # gem 'pg'
16
+ #
17
+ default: &default
18
+ adapter: postgresql
19
+ encoding: unicode
20
+ # For details on connection pooling, see Rails configuration guide
21
+ # http://guides.rubyonrails.org/configuring.html#database-pooling
22
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
23
+
24
+ development:
25
+ <<: *default
26
+ database: dummy_development
27
+
28
+ # The specified database role being used to connect to postgres.
29
+ # To create additional roles in postgres see `$ createuser --help`.
30
+ # When left blank, postgres will use the default role. This is
31
+ # the same name as the operating system user that initialized the database.
32
+ #username: dummy
33
+
34
+ # The password associated with the postgres role (username).
35
+ #password:
36
+
37
+ # Connect on a TCP socket. Omitted by default since the client uses a
38
+ # domain socket that doesn't need configuration. Windows does not have
39
+ # domain sockets, so uncomment these lines.
40
+ #host: localhost
41
+
42
+ # The TCP port the server listens on. Defaults to 5432.
43
+ # If your server runs on a different port number, change accordingly.
44
+ #port: 5432
45
+
46
+ # Schema search path. The server defaults to $user,public
47
+ #schema_search_path: myapp,sharedapp,public
48
+
49
+ # Minimum log levels, in increasing order:
50
+ # debug5, debug4, debug3, debug2, debug1,
51
+ # log, notice, warning, error, fatal, and panic
52
+ # Defaults to warning.
53
+ #min_messages: notice
54
+
55
+ # Warning: The database defined as "test" will be erased and
56
+ # re-generated from your development database when you run "rake".
57
+ # Do not set this db to the same as development or production.
58
+ test:
59
+ <<: *default
60
+ database: dummy_test
61
+
62
+ # As with config/secrets.yml, you never want to store sensitive information,
63
+ # like your database password, in your source code. If your source code is
64
+ # ever seen by anyone, they now have access to your database.
65
+ #
66
+ # Instead, provide the password as a unix environment variable when you boot
67
+ # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
68
+ # for a full rundown on how to provide these environment variables in a
69
+ # production deployment.
70
+ #
71
+ # On Heroku and other platform providers, you may have a full connection URL
72
+ # available as an environment variable. For example:
73
+ #
74
+ # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
75
+ #
76
+ # You can use this database configuration with:
77
+ #
78
+ # production:
79
+ # url: <%= ENV['DATABASE_URL'] %>
80
+ #
81
+ production:
82
+ <<: *default
83
+ database: dummy_production
84
+ username: dummy
85
+ password: <%= ENV['DUMMY_DATABASE_PASSWORD'] %>
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,61 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ # Run rails dev:cache to toggle caching.
17
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
18
+ config.action_controller.perform_caching = true
19
+
20
+ config.cache_store = :memory_store
21
+ config.public_file_server.headers = {
22
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
23
+ }
24
+ else
25
+ config.action_controller.perform_caching = false
26
+
27
+ config.cache_store = :null_store
28
+ end
29
+
30
+ # Store uploaded files on the local file system (see config/storage.yml for options)
31
+ config.active_storage.service = :local
32
+
33
+ # Don't care if the mailer can't send.
34
+ config.action_mailer.raise_delivery_errors = false
35
+
36
+ config.action_mailer.perform_caching = false
37
+
38
+ # Print deprecation notices to the Rails logger.
39
+ config.active_support.deprecation = :log
40
+
41
+ # Raise an error on page load if there are pending migrations.
42
+ config.active_record.migration_error = :page_load
43
+
44
+ # Highlight code that triggered database queries in logs.
45
+ config.active_record.verbose_query_logs = true
46
+
47
+ # Debug mode disables concatenation and preprocessing of assets.
48
+ # This option may cause significant delays in view rendering with a large
49
+ # number of complex assets.
50
+ config.assets.debug = true
51
+
52
+ # Suppress logger output for asset requests.
53
+ config.assets.quiet = true
54
+
55
+ # Raises error for missing translations
56
+ # config.action_view.raise_on_missing_translations = true
57
+
58
+ # Use an evented file watcher to asynchronously detect changes in source code,
59
+ # routes, locales, etc. This feature depends on the listen gem.
60
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
61
+ end
@@ -0,0 +1,94 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
+ # config.require_master_key = true
20
+
21
+ # Disable serving static files from the `/public` folder by default since
22
+ # Apache or NGINX already handles this.
23
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
33
+
34
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
35
+ # config.action_controller.asset_host = 'http://assets.example.com'
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
+
41
+ # Store uploaded files on the local file system (see config/storage.yml for options)
42
+ config.active_storage.service = :local
43
+
44
+ # Mount Action Cable outside main process or domain
45
+ # config.action_cable.mount_path = nil
46
+ # config.action_cable.url = 'wss://example.com/cable'
47
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
48
+
49
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
50
+ # config.force_ssl = true
51
+
52
+ # Use the lowest log level to ensure availability of diagnostic information
53
+ # when problems arise.
54
+ config.log_level = :debug
55
+
56
+ # Prepend all log lines with the following tags.
57
+ config.log_tags = [ :request_id ]
58
+
59
+ # Use a different cache store in production.
60
+ # config.cache_store = :mem_cache_store
61
+
62
+ # Use a real queuing backend for Active Job (and separate queues per environment)
63
+ # config.active_job.queue_adapter = :resque
64
+ # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
65
+
66
+ config.action_mailer.perform_caching = false
67
+
68
+ # Ignore bad email addresses and do not raise email delivery errors.
69
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
70
+ # config.action_mailer.raise_delivery_errors = false
71
+
72
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
73
+ # the I18n.default_locale when a translation cannot be found).
74
+ config.i18n.fallbacks = true
75
+
76
+ # Send deprecation notices to registered listeners.
77
+ config.active_support.deprecation = :notify
78
+
79
+ # Use default logging formatter so that PID and timestamp are not suppressed.
80
+ config.log_formatter = ::Logger::Formatter.new
81
+
82
+ # Use a different logger for distributed setups.
83
+ # require 'syslog/logger'
84
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
85
+
86
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
87
+ logger = ActiveSupport::Logger.new(STDOUT)
88
+ logger.formatter = config.log_formatter
89
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
90
+ end
91
+
92
+ # Do not dump schema after migrations.
93
+ config.active_record.dump_schema_after_migration = false
94
+ end