From effba3382eddb18cd91e7b1f014498dc2a235993 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 6 Jun 2024 16:48:57 +0200 Subject: [PATCH 1/3] Update Ruby version to 3.3.2 Also remove support for OSEM_RUBY_VERSION, we are going to support one ruby version and one ruby version only now. --- .github/workflows/next-rails.yml | 2 +- .github/workflows/spec.yml | 4 ++-- .ruby-version | 2 +- Dockerfile | 6 +++++- Gemfile | 2 +- Gemfile.lock | 4 ++-- dotenv.example | 3 --- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/next-rails.yml b/.github/workflows/next-rails.yml index 43f03260..6c24660d 100644 --- a/.github/workflows/next-rails.yml +++ b/.github/workflows/next-rails.yml @@ -26,7 +26,7 @@ jobs: echo "BUNDLE_CACHE_PATH=vendor/cache.next" >> $GITHUB_ENV - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.4 + ruby-version: 3.3.2 bundler-cache: true - name: Prepare spec run: | diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index 7da756c6..008374f3 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.4 + ruby-version: 3.3.2 bundler-cache: true - run: bundle exec rubocop - run: bundle exec haml-lint app/views @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.4 + ruby-version: 3.3.2 bundler-cache: true - name: Prepare spec run: | diff --git a/.ruby-version b/.ruby-version index 0aec50e6..47725433 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.4 +3.3.2 diff --git a/Dockerfile b/Dockerfile index bd87877c..2e9edc1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,10 @@ USER osem WORKDIR /osem/ # Install our bundle -RUN bundle install --jobs=3 --retry=3 +RUN bundle config set --local path 'vendor/bundle'; \ + bundle install --jobs=4 --retry=3 + +# Install our process manager +RUN gem install foreman CMD ["foreman", "start"] diff --git a/Gemfile b/Gemfile index 05e824ac..d9c836b3 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ end source 'https://rubygems.org' -ruby ENV.fetch('OSEM_RUBY_VERSION', '3.1.4') +ruby '3.3.2' # as web framework if next? diff --git a/Gemfile.lock b/Gemfile.lock index 9c172fb4..01e5a9e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -717,7 +717,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 3.1.4 + ruby 3.3.2 BUNDLED WITH - 2.3.26 + 2.5.9 diff --git a/dotenv.example b/dotenv.example index 372800ec..b6ca7a36 100644 --- a/dotenv.example +++ b/dotenv.example @@ -32,9 +32,6 @@ # OSEM_MEMCACHED_USERNAME='root' # OSEM_MEMCACHED_PASSWORD='1234' -# Set this if you want to deviate from our 'standard' ruby version -# OSEM_RUBY_VERSION=3.1.2 - # What time is it? # OSEM_TIME_ZONE="UTC" From f5de806ef8e8fd98135d61b8121ea5c06b5eb16f Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 6 Jun 2024 16:55:50 +0200 Subject: [PATCH 2/3] Enable rubocop-rspec_rails cops --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index e6c0a853..5f06f129 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,6 @@ require: - rubocop-rspec + - rubocop-rspec_rails - rubocop-rails - rubocop-capybara - rubocop-performance From 600be2800cf9530ab377d2d6432e66f5ef2de44e Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 6 Jun 2024 16:56:02 +0200 Subject: [PATCH 3/3] Update rubocop todo --- .rubocop_todo.yml | 86 +++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a11f1ce0..d95059f1 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-03-26 11:13:17 UTC using RuboCop version 1.62.1. +# on 2024-06-06 14:55:31 UTC using RuboCop version 1.63.5. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -504,12 +504,6 @@ Lint/NonAtomicFileOperation: Exclude: - 'spec/support/save_feature_failures.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Lint/RedundantCopDisableDirective: - Exclude: - - 'spec/support/save_feature_failures.rb' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AutoCorrect, IgnoreEmptyBlocks, AllowUnusedKeywordArguments. @@ -982,38 +976,6 @@ RSpec/OverwritingSetup: Exclude: - 'spec/controllers/admin/booths_controller_spec.rb' -# Offense count: 3 -# This cop supports safe autocorrection (--autocorrect). -RSpec/Rails/AvoidSetupHook: - Exclude: - - 'spec/features/versions_spec.rb' - - 'spec/helpers/events_helper_spec.rb' - -# Offense count: 2 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: ResponseMethods. -# ResponseMethods: response, last_response -RSpec/Rails/HaveHttpStatus: - Exclude: - - 'spec/controllers/admin/event_schedules_controller_spec.rb' - -# Offense count: 11 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Inferences. -RSpec/Rails/InferredSpecType: - Exclude: - - 'spec/controllers/admin/comments_controller_spec.rb' - - 'spec/controllers/admin/programs_controller_spec.rb' - - 'spec/controllers/application_controller_spec.rb' - - 'spec/controllers/conference_registration_controller_spec.rb' - - 'spec/helpers/application_helper_spec.rb' - - 'spec/helpers/conference_helper_spec.rb' - - 'spec/helpers/date_time_helper_spec.rb' - - 'spec/helpers/events_helper_spec.rb' - - 'spec/helpers/format_helper_spec.rb' - - 'spec/helpers/users_helper_spec.rb' - - 'spec/routing/routing_spec.rb' - # Offense count: 12 # This cop supports unsafe autocorrection (--autocorrect-all). RSpec/ReceiveMessages: @@ -1107,6 +1069,38 @@ RSpec/VoidExpect: Exclude: - 'spec/models/conference_spec.rb' +# Offense count: 3 +# This cop supports safe autocorrection (--autocorrect). +RSpecRails/AvoidSetupHook: + Exclude: + - 'spec/features/versions_spec.rb' + - 'spec/helpers/events_helper_spec.rb' + +# Offense count: 2 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: ResponseMethods. +# ResponseMethods: response, last_response +RSpecRails/HaveHttpStatus: + Exclude: + - 'spec/controllers/admin/event_schedules_controller_spec.rb' + +# Offense count: 11 +# This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: Inferences. +RSpecRails/InferredSpecType: + Exclude: + - 'spec/controllers/admin/comments_controller_spec.rb' + - 'spec/controllers/admin/programs_controller_spec.rb' + - 'spec/controllers/application_controller_spec.rb' + - 'spec/controllers/conference_registration_controller_spec.rb' + - 'spec/helpers/application_helper_spec.rb' + - 'spec/helpers/conference_helper_spec.rb' + - 'spec/helpers/date_time_helper_spec.rb' + - 'spec/helpers/events_helper_spec.rb' + - 'spec/helpers/format_helper_spec.rb' + - 'spec/helpers/users_helper_spec.rb' + - 'spec/routing/routing_spec.rb' + # Offense count: 24 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: ExpectedOrder, Include. @@ -1530,6 +1524,16 @@ Style/AccessorGrouping: Exclude: - 'app/models/payment.rb' +# Offense count: 2 +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames. +# RedundantRestArgumentNames: args, arguments +# RedundantKeywordRestArgumentNames: kwargs, options, opts +# RedundantBlockArgumentNames: blk, block, proc +Style/ArgumentsForwarding: + Exclude: + - 'app/models/user.rb' + # Offense count: 3 # This cop supports unsafe autocorrection (--autocorrect-all). Style/ArrayIntersect: @@ -2040,7 +2044,7 @@ Style/TrailingCommaInHashLiteral: - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - 'spec/models/conference_spec.rb' -# Offense count: 4 +# Offense count: 3 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: WordRegex. # SupportedStyles: percent, brackets @@ -2048,7 +2052,7 @@ Style/WordArray: EnforcedStyle: percent MinSize: 6 -# Offense count: 524 +# Offense count: 525 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https