orats 5.1.2 → 5.2.0

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 (116) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -0
  3. data/.rubocop.yml +1 -1
  4. data/.travis.yml +0 -0
  5. data/CHANGELOG.md +17 -0
  6. data/Gemfile +0 -0
  7. data/LICENSE +0 -0
  8. data/README.md +5 -4
  9. data/Rakefile +0 -0
  10. data/lib/orats.rb +0 -0
  11. data/lib/orats/cli.rb +0 -0
  12. data/lib/orats/cli_help/destroy +0 -0
  13. data/lib/orats/cli_help/new +0 -0
  14. data/lib/orats/commands/new.rb +0 -0
  15. data/lib/orats/common.rb +1 -1
  16. data/lib/orats/templates/base/.dockerignore +0 -0
  17. data/lib/orats/templates/base/.env.example +5 -0
  18. data/lib/orats/templates/base/.gitignore +0 -0
  19. data/lib/orats/templates/base/.rubocop.yml +1 -1
  20. data/lib/orats/templates/base/Dockerfile +1 -1
  21. data/lib/orats/templates/base/Gemfile +15 -8
  22. data/lib/orats/templates/base/Gemfile.lock +0 -0
  23. data/lib/orats/templates/base/README.md +0 -0
  24. data/lib/orats/templates/base/Rakefile +1 -2
  25. data/lib/orats/templates/base/app/assets/config/manifest.js +0 -0
  26. data/lib/orats/templates/base/app/assets/images/.keep +0 -0
  27. data/lib/orats/templates/base/app/assets/javascripts/application.js +1 -0
  28. data/lib/orats/templates/base/app/assets/javascripts/cable.js +1 -2
  29. data/lib/orats/templates/base/app/assets/javascripts/channels/.keep +0 -0
  30. data/lib/orats/templates/base/app/assets/stylesheets/application.scss +0 -0
  31. data/lib/orats/templates/base/app/channels/application_cable/channel.rb +0 -0
  32. data/lib/orats/templates/base/app/channels/application_cable/connection.rb +0 -0
  33. data/lib/orats/templates/base/app/controllers/application_controller.rb +0 -0
  34. data/lib/orats/templates/base/app/controllers/concerns/.keep +0 -0
  35. data/lib/orats/templates/base/app/controllers/pages_controller.rb +0 -0
  36. data/lib/orats/templates/base/app/helpers/application_helper.rb +0 -0
  37. data/lib/orats/templates/base/app/helpers/pages_helper.rb +0 -0
  38. data/lib/orats/templates/base/app/jobs/application_job.rb +0 -0
  39. data/lib/orats/templates/base/app/mailers/application_mailer.rb +0 -0
  40. data/lib/orats/templates/base/app/models/application_record.rb +0 -0
  41. data/lib/orats/templates/base/app/models/concerns/.keep +0 -0
  42. data/lib/orats/templates/base/app/views/layouts/_flash.html.erb +0 -0
  43. data/lib/orats/templates/base/app/views/layouts/_footer.html.erb +0 -0
  44. data/lib/orats/templates/base/app/views/layouts/_google_analytics.html.erb +0 -0
  45. data/lib/orats/templates/base/app/views/layouts/_navigation.html.erb +0 -0
  46. data/lib/orats/templates/base/app/views/layouts/application.html.erb +1 -0
  47. data/lib/orats/templates/base/app/views/layouts/mailer.html.erb +0 -0
  48. data/lib/orats/templates/base/app/views/layouts/mailer.text.erb +0 -0
  49. data/lib/orats/templates/base/app/views/pages/home.html.erb +0 -0
  50. data/lib/orats/templates/base/bin/bundle +1 -1
  51. data/lib/orats/templates/base/bin/setup +1 -2
  52. data/lib/orats/templates/base/bin/update +4 -2
  53. data/lib/orats/templates/base/bin/yarn +5 -5
  54. data/lib/orats/templates/base/cable/config.ru +0 -0
  55. data/lib/orats/templates/base/config.ru +0 -0
  56. data/lib/orats/templates/base/config/application.rb +1 -1
  57. data/lib/orats/templates/base/config/boot.rb +1 -0
  58. data/lib/orats/templates/base/config/cable.yml +0 -0
  59. data/lib/orats/templates/base/config/database.yml +0 -0
  60. data/lib/orats/templates/base/config/environment.rb +0 -0
  61. data/lib/orats/templates/base/config/environments/development.rb +17 -5
  62. data/lib/orats/templates/base/config/environments/production.rb +36 -9
  63. data/lib/orats/templates/base/config/environments/staging.rb +0 -0
  64. data/lib/orats/templates/base/config/environments/test.rb +10 -1
  65. data/lib/orats/templates/base/config/initializers/application_controller_renderer.rb +6 -4
  66. data/lib/orats/templates/base/config/initializers/assets.rb +0 -1
  67. data/lib/orats/templates/base/config/initializers/backtrace_silencers.rb +2 -4
  68. data/lib/orats/templates/base/config/initializers/content_security_policy.rb +25 -0
  69. data/lib/orats/templates/base/config/initializers/cookies_serializer.rb +0 -0
  70. data/lib/orats/templates/base/config/initializers/filter_parameter_logging.rb +0 -0
  71. data/lib/orats/templates/base/config/initializers/inflections.rb +0 -0
  72. data/lib/orats/templates/base/config/initializers/mime_types.rb +0 -0
  73. data/lib/orats/templates/base/config/initializers/session_store.rb +0 -0
  74. data/lib/orats/templates/base/config/initializers/sidekiq.rb +0 -0
  75. data/lib/orats/templates/base/config/initializers/timeout.rb +0 -0
  76. data/lib/orats/templates/base/config/initializers/wrap_parameters.rb +1 -2
  77. data/lib/orats/templates/base/config/locales/en.yml +0 -0
  78. data/lib/orats/templates/base/config/puma.rb +0 -0
  79. data/lib/orats/templates/base/config/routes.rb +0 -0
  80. data/lib/orats/templates/base/config/secrets.yml +0 -0
  81. data/lib/orats/templates/base/config/sidekiq.yml.erb +0 -0
  82. data/lib/orats/templates/base/config/spring.rb +0 -0
  83. data/lib/orats/templates/base/config/storage.yml +34 -0
  84. data/lib/orats/templates/base/db/seeds.rb +4 -6
  85. data/lib/orats/templates/base/docker-compose.yml +4 -9
  86. data/lib/orats/templates/base/lib/assets/.keep +0 -0
  87. data/lib/orats/templates/base/lib/tasks/.keep +0 -0
  88. data/lib/orats/templates/base/log/.keep +0 -0
  89. data/lib/orats/templates/base/public/404.html +0 -0
  90. data/lib/orats/templates/base/public/422.html +0 -0
  91. data/lib/orats/templates/base/public/500.html +0 -0
  92. data/lib/orats/templates/base/public/apple-touch-icon-precomposed.png +0 -0
  93. data/lib/orats/templates/base/public/apple-touch-icon.png +0 -0
  94. data/lib/orats/templates/base/public/favicon.ico +0 -0
  95. data/lib/orats/templates/base/public/robots.txt +0 -0
  96. data/lib/orats/templates/base/{tmp → storage}/.keep +0 -0
  97. data/lib/orats/templates/base/test/application_system_test_case.rb +4 -4
  98. data/lib/orats/templates/base/test/controllers/.keep +0 -0
  99. data/lib/orats/templates/base/test/controllers/pages_controller_test.rb +0 -0
  100. data/lib/orats/templates/base/test/fixtures/.keep +0 -0
  101. data/lib/orats/templates/base/test/fixtures/files/.keep +0 -0
  102. data/lib/orats/templates/base/test/helpers/.keep +0 -0
  103. data/lib/orats/templates/base/test/integration/.keep +0 -0
  104. data/lib/orats/templates/base/test/mailers/.keep +0 -0
  105. data/lib/orats/templates/base/test/models/.keep +0 -0
  106. data/lib/orats/templates/base/test/system/.keep +0 -0
  107. data/lib/orats/templates/base/test/test_helper.rb +3 -3
  108. data/lib/orats/templates/base/vendor/assets/javascripts/.keep +0 -0
  109. data/lib/orats/templates/base/vendor/assets/stylesheets/.keep +0 -0
  110. data/lib/orats/ui.rb +0 -0
  111. data/lib/orats/util.rb +0 -0
  112. data/lib/orats/version.rb +1 -1
  113. data/orats.gemspec +2 -4
  114. data/test/integration/cli_test.rb +0 -0
  115. data/test/test_helper.rb +0 -0
  116. metadata +15 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4896af6920ab324eed17012d6cbdc55f685e5fab
4
- data.tar.gz: ed5c95a9d96a687a3fb4790a43054a23ffe095c7
2
+ SHA256:
3
+ metadata.gz: f1bd727ba8f85bca5299e42c4b1b60b8bf1e17bef7d860485719de63eb2cc77e
4
+ data.tar.gz: 780bc594d642b6b64e7b9e2e553dbe83308e6c4696d7d3dba398e2d1744138a7
5
5
  SHA512:
6
- metadata.gz: fa1124e7ac1eae2d15ad49ba0695aa5c3a66f50d0af44515330ce14a4e59b6d41dcfd551671f13283067538fd67fdbff31e0255c29cea0bcbd4d9c78bac1edb9
7
- data.tar.gz: 0ba9a705a265ffe5f73275f64ade9bb226bfd78148d11b4d0566acf4f26220bf6adeb1b8f9736a12570e334ea12e92848b5fce01a555cea3a756dfd4492a29c2
6
+ metadata.gz: 10ef7f6011f92e11f223bc4d4c19dab92d9d4b53b4c25342d7c7781ea8f7a31f70cfa2f10b69d3c128be6829cdd18c7fb87c147b9f51545d3ac9d0220de4f90f
7
+ data.tar.gz: e5efd9b81e30aed4139e3cd3a1144d25a71a76e8e0b3af490f44c2f828d510e3fa8f69140128119dd5437211e17bebd032149e1a6a6853db05c4f52017529584
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.0
2
+ TargetRubyVersion: 2.1
3
3
 
4
4
  Documentation:
5
5
  # Skips checking to make sure top level modules / classes have a comment.
data/.travis.yml CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## orats 5.2.0 (April 11, 2018)
2
+
3
+ - Update PostgreSQL to `10.3`
4
+ - Update Redis to `4.0`
5
+ - Update Ruby to `2.5.x`
6
+ - Update Rails to `5.2.0`
7
+ - Update puma to `3.11`
8
+ - Update pg to `1.0`
9
+ - Update sidekiq to `5.1`
10
+ - Update rack-mini-profiler to `1.0`
11
+ - Unpublish PostgreSQL port in `docker-compose.yml`
12
+ - Unpublish Redis port in `docker-compose.yml`
13
+ - Move PostgreSQL environment variables to the `.env` file
14
+ - Drastically reduce log spam in the test output
15
+ - Bootsnap is disabled for now (it may be enabled in a later release)
16
+ - Credentials are not being used for the time being
17
+
1
18
  ## orats 5.1.2 (August 23, 2017)
2
19
 
3
20
  - Fix missing `fileutil` require
data/Gemfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -18,9 +18,9 @@ If you want to learn about Docker specifically then I recommend checking out
18
18
 
19
19
  ## What versions are you targeting?
20
20
 
21
- #### Ruby 2.4+
21
+ #### Ruby 2.5+
22
22
 
23
- #### Rails 5.1+
23
+ #### Rails 5.2+
24
24
 
25
25
  #### Docker 1.11+ / Docker Compose API v2+
26
26
 
@@ -91,6 +91,7 @@ add it.
91
91
  - Use a standalone Action Cable server
92
92
  - jQuery is installed with `jquery-rails`
93
93
  - Capybara is commented out in the `Gemfile`
94
+ - Bootsnap and Credentials are disabled
94
95
  - **Features**:
95
96
  - Add a `pages` controller with `home` action
96
97
  - **Config**:
@@ -185,10 +186,10 @@ cp -r /tmp/orats/lib/orats/templates/base /tmp/foo_bar
185
186
  # Swap a few custom values into the base project.
186
187
  find /tmp/foo_bar -type f -exec sed -i -e 's/OratsBase/FooBar/g' {} \;
187
188
  find /tmp/foo_bar -type f -exec sed -i -e 's/orats_base/foo_bar/g' {} \;
188
- find /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.1.1/g' {} \;
189
+ find /tmp/foo_bar -type f -exec sed -i -e 's/VERSION/5.2.0/g' {} \;
189
190
 
190
191
  # Rename the example .env file since `.env` is git ignored.
191
- mv /tmp/orats/.env.example /tmp/orats/.env
192
+ mv /tmp/foo_bar/.env.example /tmp/foo_bar/.env
192
193
 
193
194
  # Clean up the cloned directory.
194
195
  rm -rf /tmp/orats
data/Rakefile CHANGED
File without changes
data/lib/orats.rb CHANGED
File without changes
data/lib/orats/cli.rb CHANGED
File without changes
File without changes
File without changes
File without changes
data/lib/orats/common.rb CHANGED
@@ -17,7 +17,7 @@ module Orats
17
17
  end
18
18
 
19
19
  def base_path
20
- File.join(File.expand_path(File.dirname(__FILE__)))
20
+ __dir__
21
21
  end
22
22
 
23
23
  def file_to_string(path)
File without changes
@@ -31,6 +31,11 @@ WEB_CONCURRENCY=1
31
31
  # what you are doing 99.99% of the time.
32
32
  REQUEST_TIMEOUT=5
33
33
 
34
+ # Required by the Postgres Docker image. This sets up the initial database when
35
+ # you first run it.
36
+ POSTGRES_USER=testo
37
+ POSTGRES_PASSWORD=yourpassword
38
+
34
39
  # The database name will automatically get the Rails environment appended to it
35
40
  # such as: orats_base_development or orats_base_production.
36
41
  DATABASE_URL=postgresql://orats_base:yourpassword@postgres:5432/orats_base?encoding=utf8&pool=5&timeout=5000
File without changes
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.0
2
+ TargetRubyVersion: 2.1
3
3
 
4
4
  Exclude:
5
5
  - 'db/**/*'
@@ -1,4 +1,4 @@
1
- FROM ruby:2.4-alpine
1
+ FROM ruby:2.5-alpine
2
2
 
3
3
  RUN apk update && apk add build-base nodejs postgresql-dev
4
4
 
@@ -6,10 +6,10 @@ git_source(:github) do |repo_name|
6
6
  end
7
7
 
8
8
  # Looking to use the Edge version? gem 'rails', github: 'rails/rails'
9
- gem 'rails', '~> 5.1.3'
9
+ gem 'rails', '~> 5.2.0'
10
10
 
11
11
  # Use Puma as the app server
12
- gem 'puma', '~> 3.10'
12
+ gem 'puma', '~> 3.11'
13
13
 
14
14
  # Use Rack Timeout. Read more: https://github.com/heroku/rack-timeout
15
15
  gem 'rack-timeout', '~> 0.4'
@@ -18,19 +18,19 @@ gem 'rack-timeout', '~> 0.4'
18
18
  gem 'jbuilder', '~> 2.5'
19
19
 
20
20
  # Use PostgreSQL as the database for Active Record
21
- gem 'pg', '~> 0.21'
21
+ gem 'pg', '~> 1.0'
22
22
 
23
23
  # Use Redis Rails to set up a Redis backed Cache and / or Session
24
24
  gem 'redis-rails', '~> 5.0'
25
25
 
26
26
  # Use Sidekiq as a background job processor through Active Job
27
- gem 'sidekiq', '~> 5.0'
27
+ gem 'sidekiq', '~> 5.1'
28
28
 
29
29
  # Use Clockwork for recurring background tasks without needing cron
30
30
  # gem 'clockwork', '~> 2.0'
31
31
 
32
32
  # Use Kaminari for pagination
33
- # gem 'kaminari', '~> 0.17'
33
+ # gem 'kaminari', '~> 1.0'
34
34
 
35
35
  # Use SCSS for stylesheets
36
36
  gem 'sass-rails', '~> 5.0'
@@ -50,18 +50,25 @@ gem 'bootstrap-sass', '~> 3.3'
50
50
  # Use Font Awesome Rails for Font Awesome icons
51
51
  gem 'font-awesome-rails', '~> 4.7'
52
52
 
53
+ # Use Bootsnap to improve startup times
54
+ # gem 'bootsnap', '>= 1.1.0', require: false
55
+
53
56
  group :development, :test do
54
57
  # Call 'byebug' anywhere in your code to drop into a debugger console
55
58
  gem 'byebug', platform: :mri
59
+ end
56
60
 
57
- # End to end testing of your rails apps (Rails 5.1+ supports this)
58
- # gem 'capybara', '~> 2.13'
61
+ group :test do
62
+ # Adds support for Capybara system testing and selenium driver
63
+ # gem 'capybara', '>= 2.15', '< 4.0'
59
64
  # gem 'selenium-webdriver'
65
+ # Easy installation and use of chromedriver to run system tests with Chrome
66
+ # gem 'chromedriver-helper'
60
67
  end
61
68
 
62
69
  group :development do
63
70
  # Enable a debug toolbar to help profile your application
64
- gem 'rack-mini-profiler', '~> 0.10'
71
+ gem 'rack-mini-profiler', '~> 1.0'
65
72
 
66
73
  # Access an IRB console on exception pages or by using <%= console %>
67
74
  gem 'web-console', '~> 3.3.0'
File without changes
File without changes
@@ -1,6 +1,5 @@
1
1
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be
3
- # available to Rake.
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
3
 
5
4
  require_relative 'config/application'
6
5
 
File without changes
@@ -17,6 +17,7 @@
17
17
  //
18
18
  //= require jquery
19
19
  //= require rails-ujs
20
+ //= require activestorage
20
21
  //= require turbolinks
21
22
  //= require bootstrap/affix
22
23
  //= require bootstrap/alert
@@ -1,6 +1,5 @@
1
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
3
- // generate channel command.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
4
3
  //
5
4
  //= require action_cable
6
5
  //= require_self
File without changes
File without changes
File without changes
@@ -13,6 +13,7 @@
13
13
  <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
14
14
 
15
15
  <%= csrf_meta_tags %>
16
+ <%= csp_meta_tag %>
16
17
 
17
18
  <!--[if lt IE 9]>
18
19
  <script
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
3
  load Gem.bin_path('bundler', 'bundle')
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
3
2
  require 'fileutils'
4
3
  include FileUtils
5
4
 
6
5
  # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+ APP_ROOT = File.expand_path('..', __dir__)
8
7
 
9
8
  def system!(*args)
10
9
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -18,6 +17,9 @@ chdir APP_ROOT do
18
17
  system! 'gem install bundler --conservative'
19
18
  system('bundle check') || system!('bundle install')
20
19
 
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
21
23
  puts "\n== Updating database =="
22
24
  system! 'bin/rails db:migrate'
23
25
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
- VENDOR_PATH = File.expand_path('..', __dir__)
3
- Dir.chdir(VENDOR_PATH) do
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
4
  begin
5
- exec "yarnpkg #{ARGV.join(' ')}"
5
+ exec "yarnpkg", *ARGV
6
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'
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
9
  exit 1
10
10
  end
11
11
  end
File without changes
File without changes
@@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
9
9
  module OratsBase
10
10
  class Application < Rails::Application
11
11
  # Initialize configuration defaults for originally generated Rails version.
12
- config.load_defaults 5.1
12
+ config.load_defaults 5.2
13
13
 
14
14
  # Application configuration should go into files in config/initializers
15
15
  # -- all .rb files in that directory are automatically loaded.
@@ -1,3 +1,4 @@
1
1
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
2
 
3
3
  require 'bundler/setup' # Set up gems listed in the Gemfile.
4
+ # require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
File without changes
File without changes
File without changes
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
2
4
  # In the development environment your application's code is reloaded on
3
5
  # every request. This slows down response time but is perfect for development
4
6
  # since you don't have to restart the web server when you make code changes.
@@ -11,16 +13,23 @@ Rails.application.configure do
11
13
  config.consider_all_requests_local = true
12
14
 
13
15
  # Enable/disable caching. By default caching is disabled.
14
- if Rails.root.join('tmp/caching-dev.txt').exist?
16
+ # Run rails dev:cache to toggle caching.
17
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
15
18
  config.action_controller.perform_caching = true
16
19
 
20
+ config.cache_store = :memory_store
17
21
  config.public_file_server.headers = {
18
- 'Cache-Control' => 'public, max-age=172800'
22
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
19
23
  }
20
24
  else
21
25
  config.action_controller.perform_caching = false
26
+
27
+ config.cache_store = :null_store
22
28
  end
23
29
 
30
+ # Store uploaded files on the local file system (see config/storage.yml for options)
31
+ config.active_storage.service = :local
32
+
24
33
  # Don't care if the mailer can't send.
25
34
  config.action_mailer.raise_delivery_errors = false
26
35
 
@@ -32,6 +41,9 @@ Rails.application.configure do
32
41
  # Raise an error on page load if there are pending migrations.
33
42
  config.active_record.migration_error = :page_load
34
43
 
44
+ # Highlight code that triggered database queries in logs.
45
+ config.active_record.verbose_query_logs = true
46
+
35
47
  # Debug mode disables concatenation and preprocessing of assets.
36
48
  # This option may cause significant delays in view rendering with a large
37
49
  # number of complex assets.
@@ -40,10 +52,10 @@ Rails.application.configure do
40
52
  # Suppress logger output for asset requests.
41
53
  config.assets.quiet = true
42
54
 
43
- # Raises error for missing translations.
55
+ # Raises error for missing translations
44
56
  # config.action_view.raise_on_missing_translations = true
45
57
 
46
- # Use an evented file watcher to asynchronously detect changes in source
47
- # code, routes, locales, etc. This feature depends on the listen gem.
58
+ # Use an evented file watcher to asynchronously detect changes in source code,
59
+ # routes, locales, etc. This feature depends on the listen gem.
48
60
  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
49
61
  end
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
2
4
  # Code is not reloaded between requests.
3
5
  config.cache_classes = true
4
6
 
@@ -12,10 +14,9 @@ Rails.application.configure do
12
14
  config.consider_all_requests_local = false
13
15
  config.action_controller.perform_caching = true
14
16
 
15
- # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
16
- # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
17
- # `config/secrets.yml.key`.
18
- config.read_encrypted_secrets = false
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
19
20
 
20
21
  # Disable serving static files from the `/public` folder by default since
21
22
  # Apache or NGINX already handles this.
@@ -25,9 +26,11 @@ Rails.application.configure do
25
26
  config.assets.js_compressor = :uglifier
26
27
  # config.assets.css_compressor = :sass
27
28
 
28
- # Do not fallback to assets pipeline if a pre-compiled asset is missed.
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
29
30
  config.assets.compile = false
30
31
 
32
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
33
+
31
34
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
32
35
  # config.action_controller.asset_host = 'http://assets.example.com'
33
36
 
@@ -35,15 +38,35 @@ Rails.application.configure do
35
38
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
36
39
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
37
40
 
38
- # Force all access to the app over SSL, use Strict-Transport-Security,
39
- # and use secure cookies.
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.
40
50
  # config.force_ssl = true
41
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 = "testtingrails_#{Rails.env}"
65
+
42
66
  config.action_mailer.perform_caching = false
43
67
 
44
68
  # Ignore bad email addresses and do not raise email delivery errors.
45
- # Set this to true and configure the email server for immediate delivery to
46
- # raise delivery errors.
69
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
47
70
  # config.action_mailer.raise_delivery_errors = false
48
71
 
49
72
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
@@ -56,6 +79,10 @@ Rails.application.configure do
56
79
  # Use default logging formatter so that PID and timestamp are not suppressed.
57
80
  config.log_formatter = ::Logger::Formatter.new
58
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
+
59
86
  # Do not dump schema after migrations.
60
87
  config.active_record.dump_schema_after_migration = false
61
88
  end
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
2
4
  # The test environment is used exclusively to run your application's
3
5
  # test suite. You never need to work with it otherwise. Remember that
4
6
  # your test database is "scratch space" for the test suite and is wiped
@@ -13,7 +15,7 @@ Rails.application.configure do
13
15
  # Configure public file server for tests with Cache-Control for performance.
14
16
  config.public_file_server.enabled = true
15
17
  config.public_file_server.headers = {
16
- 'Cache-Control' => 'public, max-age=3600'
18
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
17
19
  }
18
20
 
19
21
  # Show full error reports and disable caching.
@@ -25,6 +27,10 @@ Rails.application.configure do
25
27
 
26
28
  # Disable request forgery protection in test environment.
27
29
  config.action_controller.allow_forgery_protection = false
30
+
31
+ # Store uploaded files on the local file system in a temporary directory
32
+ config.active_storage.service = :test
33
+
28
34
  config.action_mailer.perform_caching = false
29
35
 
30
36
  # Tell Action Mailer not to deliver emails to the real world.
@@ -37,4 +43,7 @@ Rails.application.configure do
37
43
 
38
44
  # Raises error for missing translations
39
45
  # config.action_view.raise_on_missing_translations = true
46
+
47
+ # Show less verbose log output than in development
48
+ config.log_level = :warn
40
49
  end
@@ -1,6 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # ApplicationController.renderer.defaults.merge!(
4
- # http_host: 'example.org',
5
- # https: false
6
- # )
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -5,7 +5,6 @@ Rails.application.config.assets.version = '1.0'
5
5
 
6
6
  # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path
8
-
9
8
  # Add Yarn node_modules folder to the asset load path.
10
9
  Rails.application.config.assets.paths << Rails.root.join('node_modules')
11
10
 
@@ -1,9 +1,7 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # You can add backtrace silencers for libraries that you're using but don't
4
- # wish to see in your backtraces.
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
5
4
  # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
6
5
 
7
- # You can also remove all the silencers if you're trying to debug a problem
8
- # that might stem from framework code.
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
9
7
  # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,25 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+
19
+ # If you are using UJS then enable automatic nonce generation
20
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
+
22
+ # Report CSP violations to a specified URI
23
+ # For further information see the following documentation:
24
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25
+ # Rails.application.config.content_security_policy_report_only = true
@@ -3,8 +3,7 @@
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format
7
- # to an empty array.
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
8
7
  ActiveSupport.on_load(:action_controller) do
9
8
  wrap_parameters format: [:json]
10
9
  end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket
23
+
24
+ # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -1,9 +1,7 @@
1
- # This file should contain all the record creation needed to seed the database
2
- # with its default values.
3
- # The data can then be loaded with the rails db:seed command
4
- # or created alongside the database with db:setup.
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
5
3
  #
6
4
  # Examples:
7
5
  #
8
- # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
9
- # Character.create(name: 'Luke', movie: movies.first)
6
+ # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
7
+ # Character.create(name: 'Luke', movie: movies.first)
@@ -2,20 +2,15 @@ version: '2'
2
2
 
3
3
  services:
4
4
  postgres:
5
- image: 'postgres:9.6-alpine'
6
- environment:
7
- POSTGRES_USER: 'orats_base'
8
- POSTGRES_PASSWORD: 'yourpassword'
9
- ports:
10
- - '5432:5432'
5
+ image: 'postgres:10.3-alpine'
11
6
  volumes:
12
7
  - 'postgres:/var/lib/postgresql/data'
8
+ env_file:
9
+ - '.env'
13
10
 
14
11
  redis:
15
- image: 'redis:3.2-alpine'
12
+ image: 'redis:4.0-alpine'
16
13
  command: redis-server --requirepass yourpassword
17
- ports:
18
- - '6379:6379'
19
14
  volumes:
20
15
  - 'redis:/data'
21
16
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
- require 'test_helper'
1
+ require "test_helper"
2
2
 
3
- # class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
- # driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
- # end
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ # driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
- require File.expand_path('../../config/environment', __FILE__)
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require_relative '../config/environment'
2
3
  require 'rails/test_help'
3
4
 
4
5
  class ActiveSupport::TestCase
5
- # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical
6
- # order.
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
7
  fixtures :all
8
8
 
9
9
  # Add more helper methods to be used by all tests here...
data/lib/orats/ui.rb CHANGED
File without changes
data/lib/orats/util.rb CHANGED
File without changes
data/lib/orats/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # set the version of this gem
2
2
  module Orats
3
- VERSION = '5.1.2'.freeze
3
+ VERSION = '5.2.0'.freeze
4
4
  end
data/orats.gemspec CHANGED
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'orats/version'
@@ -24,7 +22,7 @@ Gem::Specification.new do |spec|
24
22
  spec.add_dependency 'thor', '~> 0'
25
23
 
26
24
  spec.add_development_dependency 'bundler', '~> 1.5'
27
- spec.add_development_dependency 'rake', '~> 0'
28
25
  spec.add_development_dependency 'minitest', '~> 5.3'
29
- spec.add_development_dependency 'rubocop', '~> 0.41'
26
+ spec.add_development_dependency 'rake', '~> 0'
27
+ spec.add_development_dependency 'rubocop', '~> 0.49'
30
28
  end
File without changes
data/test/test_helper.rb CHANGED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orats
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Janetakis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-23 00:00:00.000000000 Z
11
+ date: 2018-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -39,47 +39,47 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '5.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '5.3'
55
55
  - !ruby/object:Gem::Dependency
56
- name: minitest
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.3'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '5.3'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.41'
75
+ version: '0.49'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.41'
82
+ version: '0.49'
83
83
  description: Generate Dockerized Ruby on Rails applications using best practices.
84
84
  email:
85
85
  - nick.janetakis@gmail.com
@@ -157,6 +157,7 @@ files:
157
157
  - lib/orats/templates/base/config/initializers/application_controller_renderer.rb
158
158
  - lib/orats/templates/base/config/initializers/assets.rb
159
159
  - lib/orats/templates/base/config/initializers/backtrace_silencers.rb
160
+ - lib/orats/templates/base/config/initializers/content_security_policy.rb
160
161
  - lib/orats/templates/base/config/initializers/cookies_serializer.rb
161
162
  - lib/orats/templates/base/config/initializers/filter_parameter_logging.rb
162
163
  - lib/orats/templates/base/config/initializers/inflections.rb
@@ -171,6 +172,7 @@ files:
171
172
  - lib/orats/templates/base/config/secrets.yml
172
173
  - lib/orats/templates/base/config/sidekiq.yml.erb
173
174
  - lib/orats/templates/base/config/spring.rb
175
+ - lib/orats/templates/base/config/storage.yml
174
176
  - lib/orats/templates/base/db/seeds.rb
175
177
  - lib/orats/templates/base/docker-compose.yml
176
178
  - lib/orats/templates/base/lib/assets/.keep
@@ -183,6 +185,7 @@ files:
183
185
  - lib/orats/templates/base/public/apple-touch-icon.png
184
186
  - lib/orats/templates/base/public/favicon.ico
185
187
  - lib/orats/templates/base/public/robots.txt
188
+ - lib/orats/templates/base/storage/.keep
186
189
  - lib/orats/templates/base/test/application_system_test_case.rb
187
190
  - lib/orats/templates/base/test/controllers/.keep
188
191
  - lib/orats/templates/base/test/controllers/pages_controller_test.rb
@@ -192,8 +195,8 @@ files:
192
195
  - lib/orats/templates/base/test/integration/.keep
193
196
  - lib/orats/templates/base/test/mailers/.keep
194
197
  - lib/orats/templates/base/test/models/.keep
198
+ - lib/orats/templates/base/test/system/.keep
195
199
  - lib/orats/templates/base/test/test_helper.rb
196
- - lib/orats/templates/base/tmp/.keep
197
200
  - lib/orats/templates/base/vendor/assets/javascripts/.keep
198
201
  - lib/orats/templates/base/vendor/assets/stylesheets/.keep
199
202
  - lib/orats/ui.rb
@@ -222,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
225
  version: '0'
223
226
  requirements: []
224
227
  rubyforge_project:
225
- rubygems_version: 2.5.1
228
+ rubygems_version: 2.7.3
226
229
  signing_key:
227
230
  specification_version: 4
228
231
  summary: Opinionated rails application templates.