diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5a76c97f..57346c9a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-java - - run: ./gradlew publishToMavenLocal test + - run: ./gradlew publishToMavenLocal test --no-configuration-cache env: TEST_SERVER_URL: http://localhost:${{ job.services.app.ports[3000] }} - uses: actions/upload-artifact@v3 diff --git a/docker/mock-server/Gemfile b/docker/mock-server/Gemfile index 3a0d0d63..123549ed 100644 --- a/docker/mock-server/Gemfile +++ b/docker/mock-server/Gemfile @@ -3,46 +3,12 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby "3.2.0" -# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.4" - -# Use sqlite3 as the database for Active Record -gem "sqlite3", "~> 1.4" - -# Use the Puma web server [https://github.com/puma/puma] gem "puma", "~> 5.6" -# Build JSON APIs with ease [https://github.com/rails/jbuilder] -# gem "jbuilder" - -# Use Redis adapter to run Action Cable in production -# gem "redis", "~> 4.0" - -# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] -# gem "kredis" - -# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] -# gem "bcrypt", "~> 3.1.7" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] - -# Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false -# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] -# gem "image_processing", "~> 1.2" - -# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible -# gem "rack-cors" - group :development, :test do - # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] end - -group :development do - # Speed up commands on slow machines / big apps [https://github.com/rails/spring] - # gem "spring" -end - diff --git a/docker/mock-server/Gemfile.lock b/docker/mock-server/Gemfile.lock index 822ffde8..61dadde0 100644 --- a/docker/mock-server/Gemfile.lock +++ b/docker/mock-server/Gemfile.lock @@ -73,16 +73,11 @@ GEM crass (1.0.6) date (3.3.3) debug (1.7.1) - irb (>= 1.5.0) - reline (>= 0.3.1) erubi (1.12.0) globalid (1.0.1) activesupport (>= 5.0) i18n (1.12.0) concurrent-ruby (~> 1.0) - io-console (0.6.0) - irb (1.6.2) - reline (>= 0.3.0) loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -106,6 +101,8 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.7.0) + nokogiri (1.15.4-aarch64-linux) + racc (~> 1.4) nokogiri (1.15.4-x86_64-darwin) racc (~> 1.4) nokogiri (1.15.4-x86_64-linux) @@ -143,8 +140,6 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - reline (0.3.2) - io-console (~> 0.5) sqlite3 (1.6.0-x86_64-darwin) sqlite3 (1.6.0-x86_64-linux) thor (1.2.1) @@ -157,6 +152,7 @@ GEM zeitwerk (2.6.6) PLATFORMS + aarch64-linux x86_64-darwin-19 x86_64-linux diff --git a/docker/mock-server/app/channels/application_cable/channel.rb b/docker/mock-server/app/channels/application_cable/channel.rb deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/mock-server/app/channels/application_cable/connection.rb b/docker/mock-server/app/channels/application_cable/connection.rb deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/mock-server/app/jobs/application_job.rb b/docker/mock-server/app/jobs/application_job.rb deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/mock-server/app/mailers/application_mailer.rb b/docker/mock-server/app/mailers/application_mailer.rb deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/mock-server/app/models/application_record.rb b/docker/mock-server/app/models/application_record.rb deleted file mode 100644 index b63caeb8..00000000 --- a/docker/mock-server/app/models/application_record.rb +++ /dev/null @@ -1,3 +0,0 @@ -class ApplicationRecord < ActiveRecord::Base - primary_abstract_class -end diff --git a/docker/mock-server/app/models/concerns/.keep b/docker/mock-server/app/models/concerns/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/docker/mock-server/app/views/layouts/mailer.html.erb b/docker/mock-server/app/views/layouts/mailer.html.erb deleted file mode 100644 index cbd34d2e..00000000 --- a/docker/mock-server/app/views/layouts/mailer.html.erb +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - <%= yield %> - - diff --git a/docker/mock-server/app/views/layouts/mailer.text.erb b/docker/mock-server/app/views/layouts/mailer.text.erb deleted file mode 100644 index 37f0bddb..00000000 --- a/docker/mock-server/app/views/layouts/mailer.text.erb +++ /dev/null @@ -1 +0,0 @@ -<%= yield %> diff --git a/docker/mock-server/config/application.rb b/docker/mock-server/config/application.rb index 5016849e..62c02458 100644 --- a/docker/mock-server/config/application.rb +++ b/docker/mock-server/config/application.rb @@ -1,6 +1,9 @@ require_relative "boot" -require "rails/all" +require "active_model/railtie" +require "action_controller/railtie" +require "action_view/railtie" +require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. diff --git a/docker/mock-server/config/environments/development.rb b/docker/mock-server/config/environments/development.rb index 3d6b0736..aace2bd8 100644 --- a/docker/mock-server/config/environments/development.rb +++ b/docker/mock-server/config/environments/development.rb @@ -30,14 +30,6 @@ config.cache_store = :null_store end - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - - # Don't care if the mailer can't send. - config.action_mailer.raise_delivery_errors = false - - config.action_mailer.perform_caching = false - # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -47,12 +39,6 @@ # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] - # Raise an error on page load if there are pending migrations. - config.active_record.migration_error = :page_load - - # Highlight code that triggered database queries in logs. - config.active_record.verbose_query_logs = true - # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/docker/mock-server/config/environments/production.rb b/docker/mock-server/config/environments/production.rb index 77a4026f..d30f007d 100644 --- a/docker/mock-server/config/environments/production.rb +++ b/docker/mock-server/config/environments/production.rb @@ -30,9 +30,6 @@ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX - # Store uploaded files on the local file system (see config/storage.yml for options). - config.active_storage.service = :local - # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil # config.action_cable.url = "wss://example.com/cable" @@ -55,8 +52,6 @@ # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "mock_server_production" - config.action_mailer.perform_caching = false - # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false @@ -80,7 +75,4 @@ logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end - - # Do not dump schema after migrations. - config.active_record.dump_schema_after_migration = false end diff --git a/docker/mock-server/config/environments/test.rb b/docker/mock-server/config/environments/test.rb index 6ea4d1e7..eb2f1716 100644 --- a/docker/mock-server/config/environments/test.rb +++ b/docker/mock-server/config/environments/test.rb @@ -33,16 +33,6 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Store uploaded files on the local file system in a temporary directory. - config.active_storage.service = :test - - config.action_mailer.perform_caching = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr