diff --git a/.github/workflows/parallel_ci.yml b/.github/workflows/parallel_ci.yml index 7abb5d2..088f24b 100644 --- a/.github/workflows/parallel_ci.yml +++ b/.github/workflows/parallel_ci.yml @@ -8,7 +8,7 @@ jobs: fail-fast: true services: memcached: - image: memcached:1.4.31 + image: memcached:1.6.32 ports: - 11211/udp env: @@ -22,10 +22,10 @@ jobs: - name: Checkout Code uses: actions/checkout@v3 - - name: Set up Ruby 3.1.6 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.1.6" + ruby-version: "3.2.9" bundler-cache: true - name: Run Specs diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index 81b1fed..e45057e 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Ruby 3.0 + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.6 + ruby-version: 3.2.9 - name: Cache gems uses: actions/cache@v4 with: diff --git a/.rubocop.yml b/.rubocop.yml index ed48b0e..49170f3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,7 +11,7 @@ require: - rubocop-factory_bot AllCops: - TargetRubyVersion: 3.0 + TargetRubyVersion: 3.2 Exclude: - "bin/**/*" - "log/**/*" @@ -33,3 +33,10 @@ Layout/SpaceInsideHashLiteralBraces: RSpec/ExampleLength: Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Rails/SkipsModelValidations: + Exclude: + - "db/migrate/**/*" diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..df4bdc7 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.9 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2b5736b..02c361b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM phusion/passenger-ruby31:3.0.7 +FROM phusion/passenger-ruby32:3.1.4 # Set correct environment variables. -ENV HOME /home/app -ENV LC_ALL en_US.UTF-8 -ENV LANG en_US.UTF-8 +ENV HOME=/home/app +ENV LC_ALL=en_US.UTF-8 +ENV LANG=en_US.UTF-8 # Allow app user to read /etc/container_environment RUN usermod -a -G docker_env app @@ -11,8 +11,8 @@ RUN usermod -a -G docker_env app # Use baseimage-docker's init process. CMD ["/sbin/my_init"] -# Use Ruby 3.1.6 -RUN bash -lc 'rvm --default use ruby-3.1.6' +# Use Ruby +RUN bash -lc 'rvm --default use ruby-3.2.9' # Update installed APT packages RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \ @@ -47,7 +47,7 @@ RUN mkdir -p vendor/bundle && \ chown -R app:app . && \ chmod -R 755 . && \ gem install rubygems-update -v 3.5.6 && \ - gem install bundler:2.5.6 && \ + gem install bundler:2.6.9 && \ /sbin/setuser app bundle config set --local path 'vendor/bundle' && \ /sbin/setuser app bundle install diff --git a/Gemfile b/Gemfile index bb9d4db..a802c92 100644 --- a/Gemfile +++ b/Gemfile @@ -1,13 +1,11 @@ -# frozen_string_literal: true - source "https://rubygems.org" -ruby "3.1.6" +ruby "3.2.9" -gem "rails", "~> 7.1.3", ">= 7.1.3.2" +gem "rails", "~> 7.2", ">= 7.2.3" gem "bootsnap", require: false gem "rack-cors" -gem "shoryuken", "~> 4.0" +gem "shoryuken", "~> 7.0" gem "aws-sdk-sqs", "~> 1.3" gem "lograge", "~> 0.11.2" gem "logstash-event", "~> 1.2", ">= 1.2.02" diff --git a/Gemfile.lock b/Gemfile.lock index 3effb52..cc6f643 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,104 +1,102 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.5.1) - actionpack (= 7.1.5.1) - activesupport (= 7.1.5.1) + actioncable (7.2.3) + actionpack (= 7.2.3) + activesupport (= 7.2.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.5.1) - actionpack (= 7.1.5.1) - activejob (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.5.1) - actionpack (= 7.1.5.1) - actionview (= 7.1.5.1) - activejob (= 7.1.5.1) - activesupport (= 7.1.5.1) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.3) + actionpack (= 7.2.3) + activejob (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) + mail (>= 2.8.0) + actionmailer (7.2.3) + actionpack (= 7.2.3) + actionview (= 7.2.3) + activejob (= 7.2.3) + activesupport (= 7.2.3) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.5.1) - actionview (= 7.1.5.1) - activesupport (= 7.1.5.1) + actionpack (7.2.3) + actionview (= 7.2.3) + activesupport (= 7.2.3) + cgi nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.3) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.5.1) - actionpack (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) + useragent (~> 0.16) + actiontext (7.2.3) + actionpack (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.5.1) - activesupport (= 7.1.5.1) + actionview (7.2.3) + activesupport (= 7.2.3) builder (~> 3.1) + cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.5.1) - activesupport (= 7.1.5.1) + activejob (7.2.3) + activesupport (= 7.2.3) globalid (>= 0.3.6) - activemodel (7.1.5.1) - activesupport (= 7.1.5.1) - activerecord (7.1.5.1) - activemodel (= 7.1.5.1) - activesupport (= 7.1.5.1) + activemodel (7.2.3) + activesupport (= 7.2.3) + activerecord (7.2.3) + activemodel (= 7.2.3) + activesupport (= 7.2.3) timeout (>= 0.4.0) activerecord-nulldb-adapter (1.1.1) activerecord (>= 6.0, < 8.1) - activestorage (7.1.5.1) - actionpack (= 7.1.5.1) - activejob (= 7.1.5.1) - activerecord (= 7.1.5.1) - activesupport (= 7.1.5.1) + activestorage (7.2.3) + actionpack (= 7.2.3) + activejob (= 7.2.3) + activerecord (= 7.2.3) + activesupport (= 7.2.3) marcel (~> 1.0) - activesupport (7.1.5.1) + activesupport (7.2.3) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) ast (2.4.2) - aws-eventstream (1.3.1) - aws-partitions (1.1060.0) - aws-sdk-core (3.220.0) + aws-eventstream (1.4.0) + aws-partitions (1.1206.0) + aws-sdk-core (3.241.4) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) base64 + bigdecimal jmespath (~> 1, >= 1.6.1) + logger aws-sdk-sqs (1.93.0) aws-sdk-core (~> 3, >= 3.216.0) aws-sigv4 (~> 1.5) - aws-sigv4 (1.11.0) + aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.9) + base64 (0.3.0) + benchmark (0.5.0) + bigdecimal (4.0.1) bootsnap (1.18.4) msgpack (~> 1.2) brakeman (7.0.0) @@ -107,22 +105,23 @@ GEM bundler-audit (0.9.2) bundler (>= 1.2.0, < 3) thor (~> 1.0) - concurrent-ruby (1.3.5) - connection_pool (2.5.0) + cgi (0.5.1) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) coveralls_reborn (0.28.0) simplecov (~> 0.22.0) term-ansicolor (~> 1.7) thor (~> 1.2) tins (~> 1.32) crass (1.0.6) - date (3.4.1) + date (3.5.1) debug (1.10.0) irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.6.0) docile (1.4.1) dotenv (3.1.7) - drb (2.2.1) + drb (2.2.3) elasticsearch (7.17.11) elasticsearch-api (= 7.17.11) elasticsearch-transport (= 7.17.11) @@ -137,6 +136,7 @@ GEM base64 faraday (>= 1, < 3) multi_json + erb (6.0.1) erubi (1.13.1) excon (1.2.5) logger @@ -160,13 +160,13 @@ GEM git (1.19.1) addressable (~> 2.8) rchardet (~> 1.8) - globalid (1.2.1) + globalid (1.3.0) activesupport (>= 6.1) hashie (5.0.0) - i18n (1.14.7) + i18n (1.14.8) concurrent-ruby (~> 1.0) - io-console (0.8.0) - irb (1.15.1) + io-console (0.8.2) + irb (1.16.0) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) @@ -183,26 +183,27 @@ GEM logstash-event (1.2.02) logstash-logger (0.26.1) logstash-event (~> 1.2) - loofah (2.24.0) + loofah (2.25.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) macaddr (1.7.2) systemu (~> 2.6.5) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.4) + marcel (1.1.0) mini_mime (1.1.5) - minitest (5.25.4) + minitest (6.0.1) + prism (~> 1.5) msgpack (1.8.0) multi_json (1.15.0) - mutex_m (0.3.0) mysql2 (0.5.6) net-http (0.6.0) uri - net-imap (0.5.6) + net-imap (0.6.2) date net-protocol net-pop (0.1.2) @@ -211,12 +212,12 @@ GEM timeout net-smtp (0.5.1) net-protocol - nio4r (2.7.4) - nokogiri (1.18.3-aarch64-linux-gnu) + nio4r (2.7.5) + nokogiri (1.19.0-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.3-arm64-darwin) + nokogiri (1.19.0-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.3-x86_64-linux-gnu) + nokogiri (1.19.0-x86_64-linux-gnu) racc (~> 1.4) oj (3.16.11) bigdecimal (>= 3.0) @@ -226,60 +227,65 @@ GEM parser (3.3.7.1) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.3) prettyprint prettyprint (0.2.0) - psych (5.2.3) + prism (1.8.0) + psych (5.3.1) date stringio public_suffix (6.0.1) racc (1.8.1) - rack (3.1.11) + rack (3.2.4) rack-cors (2.0.2) rack (>= 2.0.0) - rack-session (2.1.0) + rack-session (2.1.1) base64 (>= 0.1.0) rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.2.1) + rackup (2.3.1) rack (>= 3) - rails (7.1.5.1) - actioncable (= 7.1.5.1) - actionmailbox (= 7.1.5.1) - actionmailer (= 7.1.5.1) - actionpack (= 7.1.5.1) - actiontext (= 7.1.5.1) - actionview (= 7.1.5.1) - activejob (= 7.1.5.1) - activemodel (= 7.1.5.1) - activerecord (= 7.1.5.1) - activestorage (= 7.1.5.1) - activesupport (= 7.1.5.1) + rails (7.2.3) + actioncable (= 7.2.3) + actionmailbox (= 7.2.3) + actionmailer (= 7.2.3) + actionpack (= 7.2.3) + actiontext (= 7.2.3) + actionview (= 7.2.3) + activejob (= 7.2.3) + activemodel (= 7.2.3) + activerecord (= 7.2.3) + activestorage (= 7.2.3) + activesupport (= 7.2.3) bundler (>= 1.15.0) - railties (= 7.1.5.1) - rails-dom-testing (2.2.0) + railties (= 7.2.3) + rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.1.5.1) - actionpack (= 7.1.5.1) - activesupport (= 7.1.5.1) - irb + railties (7.2.3) + actionpack (= 7.2.3) + activesupport (= 7.2.3) + cgi + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.2.1) + rake (13.3.1) rchardet (1.9.0) - rdoc (6.12.0) + rdoc (7.1.0) + erb psych (>= 4.0.0) + tsort regexp_parser (2.10.0) - reline (0.6.0) + reline (0.6.3) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) @@ -342,10 +348,11 @@ GEM sentry-ruby (5.23.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - shoryuken (4.0.3) - aws-sdk-core (>= 2) + shoryuken (7.0.0) + aws-sdk-sqs (>= 1.66.0) concurrent-ruby thor + zeitwerk (~> 2.6) shoulda-matchers (6.5.0) activesupport (>= 5.2.0) simplecov (0.22.0) @@ -354,29 +361,31 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) - stringio (3.1.5) + stringio (3.2.0) sync (0.5.0) systemu (2.6.5) term-ansicolor (1.11.2) tins (~> 1.0) - thor (1.3.2) - timeout (0.4.3) + thor (1.5.0) + timeout (0.6.0) tins (1.38.0) bigdecimal sync + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) uri (1.0.3) + useragent (0.16.11) uuid (2.3.9) macaddr (~> 1.0) - websocket-driver (0.7.7) + websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.6.18) + zeitwerk (2.7.4) PLATFORMS aarch64-linux @@ -408,7 +417,7 @@ DEPENDENCIES oj (~> 3.16, >= 3.16.11) parallel (~> 1.27) rack-cors - rails (~> 7.1.3, >= 7.1.3.2) + rails (~> 7.2, >= 7.2.3) rspec-rails (~> 7.0.0) rubocop rubocop-factory_bot @@ -419,13 +428,13 @@ DEPENDENCIES rubocop-shopify sentry-rails sentry-ruby - shoryuken (~> 4.0) + shoryuken (~> 7.0) shoulda-matchers simplecov uuid (~> 2.3, >= 2.3.9) RUBY VERSION - ruby 3.1.6p260 + ruby 3.2.9p265 BUNDLED WITH - 2.5.6 + 2.6.9 diff --git a/Rakefile b/Rakefile index d2a78aa..9a5ea73 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. diff --git a/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb index 9aec230..d672697 100644 --- a/app/channels/application_cable/channel.rb +++ b/app/channels/application_cable/channel.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module ApplicationCable class Channel < ActionCable::Channel::Base end diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 8d6c2a1..0ff5442 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module ApplicationCable class Connection < ActionCable::Connection::Base end diff --git a/app/constants/relation_types.rb b/app/constants/relation_types.rb index 6f380a4..422c523 100644 --- a/app/constants/relation_types.rb +++ b/app/constants/relation_types.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module RelationTypes REFERENCE_RELATION_TYPES = [ "cites", "is-supplemented-by", "references", diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 13c271f..4ac8823 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,2 @@ -# frozen_string_literal: true - class ApplicationController < ActionController::API end diff --git a/app/controllers/heartbeat_controller.rb b/app/controllers/heartbeat_controller.rb index 44a7889..03cda95 100644 --- a/app/controllers/heartbeat_controller.rb +++ b/app/controllers/heartbeat_controller.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class HeartbeatController < ApplicationController def index render( diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index bef3959..d394c3d 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked diff --git a/app/jobs/event_index_job.rb b/app/jobs/event_index_job.rb index de3b927..8975109 100644 --- a/app/jobs/event_index_job.rb +++ b/app/jobs/event_index_job.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class EventIndexJob < ApplicationJob queue_as :events_index diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 5cc63a0..3c34c81 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 08dc537..b63caeb 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class ApplicationRecord < ActiveRecord::Base primary_abstract_class end diff --git a/app/models/concerns/events/event_from_sqs_creator.rb b/app/models/concerns/events/event_from_sqs_creator.rb index 59ac424..7037e60 100644 --- a/app/models/concerns/events/event_from_sqs_creator.rb +++ b/app/models/concerns/events/event_from_sqs_creator.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module Events module EventFromSqsCreator extend ActiveSupport::Concern diff --git a/app/models/concerns/events/event_from_sqs_updater.rb b/app/models/concerns/events/event_from_sqs_updater.rb index 60ed532..4f4180f 100644 --- a/app/models/concerns/events/event_from_sqs_updater.rb +++ b/app/models/concerns/events/event_from_sqs_updater.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module Events module EventFromSqsUpdater extend ActiveSupport::Concern diff --git a/app/models/concerns/events/event_index_handler.rb b/app/models/concerns/events/event_index_handler.rb index 92f259e..a01052d 100644 --- a/app/models/concerns/events/event_index_handler.rb +++ b/app/models/concerns/events/event_index_handler.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module Events module EventIndexHandler extend ActiveSupport::Concern diff --git a/app/models/concerns/events/relation_type_handler.rb b/app/models/concerns/events/relation_type_handler.rb index a19ee6d..77d2b70 100644 --- a/app/models/concerns/events/relation_type_handler.rb +++ b/app/models/concerns/events/relation_type_handler.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Handles setting the source and target doi data of an event when an event is created or updated. # Method is only invoked via a before_validation callback in the events model. diff --git a/app/models/doi.rb b/app/models/doi.rb index c27e9a3..89c440b 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class Doi class << self def publication_date(doi) diff --git a/app/models/event.rb b/app/models/event.rb index cd6b7d7..f65cece 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class Event < ApplicationRecord # Included Modules include Events::RelationTypeHandler diff --git a/app/utilities/doi_utilities.rb b/app/utilities/doi_utilities.rb index dab1eb0..5fef641 100644 --- a/app/utilities/doi_utilities.rb +++ b/app/utilities/doi_utilities.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module DoiUtilities class << self def normalize_doi(url) diff --git a/app/utilities/orcid_utilities.rb b/app/utilities/orcid_utilities.rb index 4a668de..c27a705 100644 --- a/app/utilities/orcid_utilities.rb +++ b/app/utilities/orcid_utilities.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module OrcidUtilities class << self def orcid_from_url(url) diff --git a/app/utilities/sqs_utilities.rb b/app/utilities/sqs_utilities.rb index 7430347..ddfe12b 100644 --- a/app/utilities/sqs_utilities.rb +++ b/app/utilities/sqs_utilities.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - module SqsUtilities require "aws-sdk-sqs" diff --git a/app/validators/uuid_format_validator.rb b/app/validators/uuid_format_validator.rb index 42aacf6..a3caa2e 100644 --- a/app/validators/uuid_format_validator.rb +++ b/app/validators/uuid_format_validator.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class UuidFormatValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) unless UUID.validate(value) diff --git a/app/workers/event_import_worker.rb b/app/workers/event_import_worker.rb index a26aabc..b7e10cf 100644 --- a/app/workers/event_import_worker.rb +++ b/app/workers/event_import_worker.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class EventImportWorker include Shoryuken::Worker diff --git a/bin/brakeman b/bin/brakeman new file mode 100755 index 0000000..ace1c9b --- /dev/null +++ b/bin/brakeman @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +ARGV.unshift("--ensure-latest") + +load Gem.bin_path("brakeman", "brakeman") diff --git a/bin/bundle b/bin/bundle index 981e650..ca309ce 100755 --- a/bin/bundle +++ b/bin/bundle @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# frozen_string_literal: true - # # This file was generated by Bundler. # diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..40330c0 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/setup b/bin/setup index 3cd5a9d..69c173a 100755 --- a/bin/setup +++ b/bin/setup @@ -3,6 +3,7 @@ require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) +APP_NAME = "events" def system!(*args) system(*args, exception: true) diff --git a/config.ru b/config.ru index 2e03084..4a3c09a 100644 --- a/config.ru +++ b/config.ru @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file is used by Rack-based servers to start the application. require_relative "config/environment" diff --git a/config/application.rb b/config/application.rb index a550c98..f2c3248 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require_relative "boot" require "rails/all" @@ -23,7 +21,7 @@ module Events class Application < Rails::Application - config.load_defaults(7.1) + config.load_defaults(7.2) config.autoload_lib(ignore: nil) diff --git a/config/boot.rb b/config/boot.rb index aef6d03..988a5dd 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/config/environment.rb b/config/environment.rb index 7df99e8..cac5315 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Load the Rails application. require_relative "application" diff --git a/config/environments/development.rb b/config/environments/development.rb index 71e9aab..98128ff 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,47 +1,75 @@ -# frozen_string_literal: true - require "active_support/core_ext/integer/time" Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. config.enable_reloading = true - # Normally set to false as this speeds up start up. - # Setting to true ensure that the Shoryuken workers are - # available in development when you try to start them up. - config.eager_load = true + # Do not eager load code on boot. + config.eager_load = false + # Show full error reports. config.consider_all_requests_local = true + # Enable server timing. config.server_timing = true + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.cache_store = :memory_store - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}", - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false + 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 + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } + + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log + # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise + # 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 + # Highlight code that enqueued background job in logs. config.active_job.verbose_enqueue_logs = true + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true - config.hosts << "www.example.com" + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! end diff --git a/config/environments/production.rb b/config/environments/production.rb index 0cceb21..8d47543 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "active_support/core_ext/integer/time" Rails.application.configure do @@ -44,7 +42,7 @@ # config.assume_ssl = true # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Start: Configure Logging config.lograge.enabled = true @@ -103,6 +101,9 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [:id] + # Enable DNS rebinding protection and other `Host` header attacks. # config.hosts = [ # "example.com", # Allow requests from example.com diff --git a/config/environments/stage.rb b/config/environments/stage.rb index 8743ea6..744932a 100644 --- a/config/environments/stage.rb +++ b/config/environments/stage.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/test.rb b/config/environments/test.rb index 670c12d..0c616a1 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's @@ -20,10 +18,7 @@ config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}", - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -39,6 +34,8 @@ # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. @@ -46,6 +43,10 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Unlike controllers, the mailer instance doesn't have any context about the + # incoming request so you'll need to provide the :host parameter yourself. + config.action_mailer.default_url_options = { host: "www.example.com" } + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr @@ -61,6 +62,6 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true end diff --git a/config/initializers/_shoryuken.rb b/config/initializers/_shoryuken.rb index 50748ab..2d18c3d 100644 --- a/config/initializers/_shoryuken.rb +++ b/config/initializers/_shoryuken.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - if Rails.env.development? Aws.config.update({ endpoint: ENV["AWS_ENDPOINT"], diff --git a/config/initializers/_version.rb b/config/initializers/_version.rb index 63863d1..f8f1c83 100644 --- a/config/initializers/_version.rb +++ b/config/initializers/_version.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "git" module Events diff --git a/config/initializers/cors.rb b/config/initializers/cors.rb index 7af62e5..0c5dd99 100644 --- a/config/initializers/cors.rb +++ b/config/initializers/cors.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Be sure to restart your server when you modify this file. # Avoid CORS issues when API is called from the frontend app. diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 97a4361..0121a7f 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,5 +1,8 @@ -# frozen_string_literal: true +# Be sure to restart your server when you modify this file. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += [ - :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 9e049dc..3860f65 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections diff --git a/config/initializers/new_framework_defaults_7_2.rb b/config/initializers/new_framework_defaults_7_2.rb new file mode 100644 index 0000000..b549c4a --- /dev/null +++ b/config/initializers/new_framework_defaults_7_2.rb @@ -0,0 +1,70 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.2 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.2`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +### +# Controls whether Active Job's `#perform_later` and similar methods automatically defer +# the job queuing to after the current Active Record transaction is committed. +# +# Example: +# Topic.transaction do +# topic = Topic.create(...) +# NewTopicNotificationJob.perform_later(topic) +# end +# +# In this example, if the configuration is set to `:never`, the job will +# be enqueued immediately, even though the `Topic` hasn't been committed yet. +# Because of this, if the job is picked up almost immediately, or if the +# transaction doesn't succeed for some reason, the job will fail to find this +# topic in the database. +# +# If `enqueue_after_transaction_commit` is set to `:default`, the queue adapter +# will define the behaviour. +# +# Note: Active Job backends can disable this feature. This is generally done by +# backends that use the same database as Active Record as a queue, hence they +# don't need this feature. +#++ +# Rails.application.config.active_job.enqueue_after_transaction_commit = :default + +### +# Adds image/webp to the list of content types Active Storage considers as an image +# Prevents automatic conversion to a fallback PNG, and assumes clients support WebP, as they support gif, jpeg, and png. +# This is possible due to broad browser support for WebP, but older browsers and email clients may still not support +# WebP. Requires imagemagick/libvips built with WebP support. +#++ +# Rails.application.config.active_storage.web_image_content_types = %w[image/png image/jpeg image/gif image/webp] + +### +# Enable validation of migration timestamps. When set, an ActiveRecord::InvalidMigrationTimestampError +# will be raised if the timestamp prefix for a migration is more than a day ahead of the timestamp +# associated with the current time. This is done to prevent forward-dating of migration files, which can +# impact migration generation and other migration commands. +# +# Applications with existing timestamped migrations that do not adhere to the +# expected format can disable validation by setting this config to `false`. +#++ +# Rails.application.config.active_record.validate_migration_timestamps = true + +### +# Controls whether the PostgresqlAdapter should decode dates automatically with manual queries. +# +# Example: +# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date") #=> Date +# +# This query used to return a `String`. +#++ +# Rails.application.config.active_record.postgresql_adapter_decode_dates = true + +### +# Enables YJIT as of Ruby 3.3, to bring sizeable performance improvements. If you are +# deploying to a memory constrained environment you may want to set this to `false`. +#++ +# Rails.application.config.yjit = true diff --git a/config/initializers/nulldb_database_tasks.rb b/config/initializers/nulldb_database_tasks.rb index d69d96d..63b3b4d 100644 --- a/config/initializers/nulldb_database_tasks.rb +++ b/config/initializers/nulldb_database_tasks.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # Patch DatabaseTasks for nulldb to prevent schema loading attempts if Rails.env.test? && defined?(ActiveRecord::Tasks::DatabaseTasks) module ActiveRecord diff --git a/config/initializers/oj.rb b/config/initializers/oj.rb index 3d2e0cc..fb0ab42 100644 --- a/config/initializers/oj.rb +++ b/config/initializers/oj.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "oj" # Sets Oj as the default encoder and decoder for JSON in Rails. diff --git a/config/initializers/opensearch.rb b/config/initializers/opensearch.rb index 61ab153..3f3cf69 100644 --- a/config/initializers/opensearch.rb +++ b/config/initializers/opensearch.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "faraday" require "faraday_middleware/aws_sigv4" require "faraday/excon" diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index b81b6de..4e93819 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - Sentry.init do |config| config.enabled_environments = ["stage", "production"] config.dsn = ENV["SENTRY_DSN"] diff --git a/config/puma.rb b/config/puma.rb index 40efb18..b950c63 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. @@ -25,7 +23,7 @@ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT", 3000) # Specifies the `environment` that Puma will run in. environment ENV.fetch("RAILS_ENV") { "development" } diff --git a/config/routes.rb b/config/routes.rb index 86f2ddd..9fc473d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - Rails.application.routes.draw do get "heartbeat", to: "heartbeat#index" diff --git a/db/migrate/20260116173138_add_service_name_to_active_storage_blobs.active_storage.rb b/db/migrate/20260116173138_add_service_name_to_active_storage_blobs.active_storage.rb new file mode 100644 index 0000000..5368060 --- /dev/null +++ b/db/migrate/20260116173138_add_service_name_to_active_storage_blobs.active_storage.rb @@ -0,0 +1,22 @@ +# This migration comes from active_storage (originally 20190112182829) +class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0] + def up + return unless table_exists?(:active_storage_blobs) + + unless column_exists?(:active_storage_blobs, :service_name) + add_column(:active_storage_blobs, :service_name, :string) + + if (configured_service = ActiveStorage::Blob.service.name) + ActiveStorage::Blob.unscoped.update_all(service_name: configured_service) + end + + change_column(:active_storage_blobs, :service_name, :string, null: false) + end + end + + def down + return unless table_exists?(:active_storage_blobs) + + remove_column(:active_storage_blobs, :service_name) + end +end diff --git a/db/migrate/20260116173139_create_active_storage_variant_records.active_storage.rb b/db/migrate/20260116173139_create_active_storage_variant_records.active_storage.rb new file mode 100644 index 0000000..5d16410 --- /dev/null +++ b/db/migrate/20260116173139_create_active_storage_variant_records.active_storage.rb @@ -0,0 +1,28 @@ +# This migration comes from active_storage (originally 20191206030411) +class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + # Use Active Record's configured type for primary key + create_table(:active_storage_variant_records, id: primary_key_type, if_not_exists: true) do |t| + t.belongs_to(:blob, null: false, index: false, type: blobs_primary_key_type) + t.string(:variation_digest, null: false) + + t.index([:blob_id, :variation_digest], name: "index_active_storage_variant_records_uniqueness", unique: true) + t.foreign_key(:active_storage_blobs, column: :blob_id) + end + end + + private + + def primary_key_type + config = Rails.configuration.generators + config.options[config.orm][:primary_key_type] || :primary_key + end + + def blobs_primary_key_type + pkey_name = connection.primary_key(:active_storage_blobs) + pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name } + pkey_column.bigint? ? :bigint : pkey_column.type + end +end diff --git a/db/migrate/20260116173140_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb b/db/migrate/20260116173140_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb new file mode 100644 index 0000000..93c8b85 --- /dev/null +++ b/db/migrate/20260116173140_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb @@ -0,0 +1,8 @@ +# This migration comes from active_storage (originally 20211119233751) +class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] + def change + return unless table_exists?(:active_storage_blobs) + + change_column_null(:active_storage_blobs, :checksum, true) + end +end diff --git a/db/seeds.rb b/db/seeds.rb index 0f16211..4fbd6ed 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # This file should ensure the existence of records required to run the application in every environment (production, # development, test). The code here should be idempotent so that it can be executed at any point in every environment. # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). diff --git a/lib/tasks/event.rake b/lib/tasks/event.rake index 5ab7ff5..8267c0f 100644 --- a/lib/tasks/event.rake +++ b/lib/tasks/event.rake @@ -1,5 +1,3 @@ -# frozen_string_literal: true - namespace :event do desc "Import Crossref DOIs for events created within a date range" # example command: IMPORT_DATE=2025-06-11 bundle exec rake event:import_crossref_event_dois diff --git a/spec/constants/relation_types_spec.rb b/spec/constants/relation_types_spec.rb index f9b701e..77cd38b 100644 --- a/spec/constants/relation_types_spec.rb +++ b/spec/constants/relation_types_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(RelationTypes) do diff --git a/spec/factories/event_factory.rb b/spec/factories/event_factory.rb index 97b7885..acee915 100644 --- a/spec/factories/event_factory.rb +++ b/spec/factories/event_factory.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - FactoryBot.define do factory :event do uuid { "00000000-0000-0000-0000-000000000000" } diff --git a/spec/jobs/event_index_job_spec.rb b/spec/jobs/event_index_job_spec.rb index 721515b..d1f830e 100644 --- a/spec/jobs/event_index_job_spec.rb +++ b/spec/jobs/event_index_job_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(EventIndexJob, type: :job) do diff --git a/spec/models/concerns/events/event_from_sqs_creator_spec.rb b/spec/models/concerns/events/event_from_sqs_creator_spec.rb index f85ad38..413c830 100644 --- a/spec/models/concerns/events/event_from_sqs_creator_spec.rb +++ b/spec/models/concerns/events/event_from_sqs_creator_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Events::EventFromSqsCreator, type: :concern) do diff --git a/spec/models/concerns/events/event_from_sqs_updater_spec.rb b/spec/models/concerns/events/event_from_sqs_updater_spec.rb index 5cbe26a..77f0477 100644 --- a/spec/models/concerns/events/event_from_sqs_updater_spec.rb +++ b/spec/models/concerns/events/event_from_sqs_updater_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Events::EventFromSqsUpdater, type: :concern) do diff --git a/spec/models/concerns/events/event_index_handler_spec.rb b/spec/models/concerns/events/event_index_handler_spec.rb index 83628dc..40604ba 100644 --- a/spec/models/concerns/events/event_index_handler_spec.rb +++ b/spec/models/concerns/events/event_index_handler_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Events::EventIndexHandler, type: :concern) do diff --git a/spec/models/concerns/events/relation_type_handler_spec.rb b/spec/models/concerns/events/relation_type_handler_spec.rb index f936af8..bce3401 100644 --- a/spec/models/concerns/events/relation_type_handler_spec.rb +++ b/spec/models/concerns/events/relation_type_handler_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Events::RelationTypeHandler, type: :concern) do diff --git a/spec/models/doi_spec.rb b/spec/models/doi_spec.rb index 0819e5b..772b300 100644 --- a/spec/models/doi_spec.rb +++ b/spec/models/doi_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Doi, type: :model) do diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 41b5113..0f69b21 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(Event, type: :model) do diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 65e4211..21fb2c4 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "simplecov" require "coveralls" diff --git a/spec/requests/heartbeat_controller_spec.rb b/spec/requests/heartbeat_controller_spec.rb index 7a3f78d..ac9b6b9 100644 --- a/spec/requests/heartbeat_controller_spec.rb +++ b/spec/requests/heartbeat_controller_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(HeartbeatController, type: :request) do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 26cea8d..de05df2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - RSpec.configure do |config| ENV["SKIP_TEST_DATABASE_TRUNCATE"] = "true" diff --git a/spec/utlilities/doi_utilities_spec.rb b/spec/utlilities/doi_utilities_spec.rb index 1cf5381..ebe424b 100644 --- a/spec/utlilities/doi_utilities_spec.rb +++ b/spec/utlilities/doi_utilities_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(DoiUtilities) do diff --git a/spec/utlilities/orcid_utilities_spec.rb b/spec/utlilities/orcid_utilities_spec.rb index 2373a45..fff9fc0 100644 --- a/spec/utlilities/orcid_utilities_spec.rb +++ b/spec/utlilities/orcid_utilities_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(OrcidUtilities) do diff --git a/spec/utlilities/sqs_utilities_spec.rb b/spec/utlilities/sqs_utilities_spec.rb index bb80e51..b1b9454 100644 --- a/spec/utlilities/sqs_utilities_spec.rb +++ b/spec/utlilities/sqs_utilities_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(SqsUtilities) do diff --git a/spec/validators/uuid_format_validator_spec.rb b/spec/validators/uuid_format_validator_spec.rb index 241fd7a..0cec1e7 100644 --- a/spec/validators/uuid_format_validator_spec.rb +++ b/spec/validators/uuid_format_validator_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "active_support/testing/time_helpers" RSpec.describe(UuidFormatValidator) do diff --git a/spec/workers/event_import_worker_spec.rb b/spec/workers/event_import_worker_spec.rb index 6ceab32..afb6a9b 100644 --- a/spec/workers/event_import_worker_spec.rb +++ b/spec/workers/event_import_worker_spec.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - require "rails_helper" RSpec.describe(EventImportWorker, type: :worker) do