diff --git a/target_versions.yml b/target_versions.yml index 8191b681..92a08e11 100644 --- a/target_versions.yml +++ b/target_versions.yml @@ -2,7 +2,7 @@ # # This is stored in a separate file so we can share it between the template and # our CI configuration. -target_rails_major_minor: '8.0' # specify as major.minor +target_rails_major_minor: '8.1' # specify as major.minor # Set this to the minimum version of Ruby that the chosen Rails version supports. minimum_ruby_major_minor: '3.2' diff --git a/variants/backend-base/app/template.rb b/variants/backend-base/app/template.rb index f5a38d8b..5d7560cc 100644 --- a/variants/backend-base/app/template.rb +++ b/variants/backend-base/app/template.rb @@ -35,5 +35,3 @@ remove_dir ".github/" remove_dir "app/views/pwa" -remove_file "bin/dev" -remove_file "bin/thrust" diff --git a/variants/backend-base/bin/template.rb b/variants/backend-base/bin/template.rb index b2952b48..4c6cdfdc 100644 --- a/variants/backend-base/bin/template.rb +++ b/variants/backend-base/bin/template.rb @@ -2,3 +2,7 @@ copy_file "variants/backend-base/bin/#{bin}", "bin/#{bin}", force: true chmod "bin/#{bin}", "+x" end + +remove_file "bin/ci" +remove_file "bin/dev" +remove_file "bin/thrust" diff --git a/variants/backend-base/config/environments/production.rb b/variants/backend-base/config/environments/production.rb index d4823864..dd08f7c5 100644 --- a/variants/backend-base/config/environments/production.rb +++ b/variants/backend-base/config/environments/production.rb @@ -32,7 +32,7 @@ RUBY gsub_file! "config/environments/production.rb", <<-RUBY, - # Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit. + # Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit. # config.action_mailer.smtp_settings = { # user_name: Rails.application.credentials.dig(:smtp, :user_name), # password: Rails.application.credentials.dig(:smtp, :password), diff --git a/variants/backend-base/config/environments/staging.rb.tt b/variants/backend-base/config/environments/staging.rb.tt index 3fa96ba0..f6399a32 100644 --- a/variants/backend-base/config/environments/staging.rb.tt +++ b/variants/backend-base/config/environments/staging.rb.tt @@ -4,7 +4,6 @@ require_relative "production" Rails.application.configure do - config.action_mailer.default_url_options = { host: "<%= TEMPLATE_CONFIG.staging_hostname %>", protocol: "https" diff --git a/variants/backend-base/config/template.rb b/variants/backend-base/config/template.rb index 5cb2bcf1..2ca886d8 100644 --- a/variants/backend-base/config/template.rb +++ b/variants/backend-base/config/template.rb @@ -6,6 +6,9 @@ remove_file "config/master.key" remove_file "config/credentials.yml.enc" +remove_file "config/ci" +remove_file "config/bundler-audit.yml" + copy_file "variants/backend-base/config/puma.rb", "config/puma.rb", force: true copy_file "variants/backend-base/config/initializers/generators.rb", "config/initializers/generators.rb" @@ -57,23 +60,21 @@ root "home#index" EO_ROUTES -if File.exist? "config/storage.yml" - gsub_file! "config/storage.yml", /# service: S3/ do - <<~YAML - # service: S3 - # upload: - # # TEAM DECISION REQUIRED: The correct caching duration for files - # # stored by Active Storage is project dependent so you should discuss - # # this with you team if you don't feel able to make the decision solo. - # # - # # These options are are not well documented in ActiveStorage. They - # # are passed directly to the S3 SDK. Details: - # # https://github.com/rails/rails/blob/master/activestorage/lib/active_storage/service/s3_service.rb - # # - # # * private: the browser should cache but intermediate proxies (e.g. CDNs) should not - # # * max-age: the number of seconds to cache the file for - # # - # cache_control: 'private, max-age=<%= 365.days.seconds %>' - YAML - end +gsub_file! "config/storage.yml", /# service: S3/ do + <<~YAML + # service: S3 + # upload: + # # TEAM DECISION REQUIRED: The correct caching duration for files + # # stored by Active Storage is project dependent so you should discuss + # # this with you team if you don't feel able to make the decision solo. + # # + # # These options are are not well documented in ActiveStorage. They + # # are passed directly to the S3 SDK. Details: + # # https://github.com/rails/rails/blob/master/activestorage/lib/active_storage/service/s3_service.rb + # # + # # * private: the browser should cache but intermediate proxies (e.g. CDNs) should not + # # * max-age: the number of seconds to cache the file for + # # + # cache_control: 'private, max-age=<%= 365.days.seconds %>' + YAML end