diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3e56e6..796ba9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,18 +6,15 @@ jobs: env: RAILS_ENV: test DATABASE_URL: postgres://test:password@127.0.0.1:5432/grape_on_rails_test - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile.file }}.gemfile + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.entry.gemfile }}.gemfile strategy: fail-fast: false matrix: - gemfile: - - { ruby: '2.7', file: rails_6 } - - { ruby: '3.0', file: rails_6_1 } - - { ruby: '3.1', file: rails_7 } - - { ruby: '3.2', file: rails_7 } - - { ruby: '3.3', file: rails_7 } - - { ruby: '3.4', file: rails_7 } -# - { ruby: '3.2' ,file: rails_edge } + entry: + - { ruby: '3.0', gemfile: rails_6_1 } + - { ruby: '3.2', gemfile: rails_7 } + - { ruby: '3.4', gemfile: rails_8 } +# - { ruby: '3.2', gemfile: rails_edge } steps: - uses: actions/checkout@v3 - name: Set up Ruby @@ -36,7 +33,7 @@ jobs: run: cp config/database.gha.yml config/database.yml - uses: harmon758/postgresql-action@v1 with: - postgresql version: "14" + postgresql version: "17" postgresql db: grape_on_rails_test postgresql user: test postgresql password: password diff --git a/.rspec b/.rspec index 412e568..be4750a 100644 --- a/.rspec +++ b/.rspec @@ -1,3 +1,4 @@ +--require spec_helper --color --format=documentation diff --git a/.rubocop.yml b/.rubocop.yml index ed78494..e9d9409 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ Style/FrozenStringLiteralComment: Layout/LineLength: Enabled: false -require: +plugins: - rubocop-capybara - rubocop-rails - rubocop-rspec_rails diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 521a5cd..86d30a2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2025-02-20 15:23:50 UTC using RuboCop version 1.62.1. +# on 2025-09-26 12:55:58 UTC using RuboCop version 1.81.0. # 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 @@ -14,7 +14,6 @@ Lint/EmptyBlock: # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: AutoCorrect. RSpec/EmptyExampleGroup: Exclude: - 'spec/helpers/welcome_helper_spec.rb' @@ -34,8 +33,7 @@ RSpec/RepeatedExample: - 'spec/api/headers_spec.rb' # Offense count: 5 -# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata. -# Include: **/*_spec.rb +# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata. RSpec/SpecFilePathFormat: Exclude: - 'spec/api/headers_spec.rb' diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index ef538c2..0000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -3.1.2 diff --git a/Appraisals b/Appraisals index ca6d0d2..07b792e 100644 --- a/Appraisals +++ b/Appraisals @@ -1,9 +1,5 @@ # frozen_string_literal: true -appraise 'rails-6' do - gem 'rails', '~> 6.0' -end - appraise 'rails-6-1' do gem 'rails', '~> 6.1' end @@ -12,6 +8,10 @@ appraise 'rails-7' do gem 'rails', '~> 7.0' end +appraise 'rails-8' do + gem 'rails', '~> 8.0' +end + appraise 'rails-edge' do gem 'rails', github: 'rails/rails' end diff --git a/Gemfile b/Gemfile index 044f69a..a491aac 100644 --- a/Gemfile +++ b/Gemfile @@ -1,17 +1,16 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -# https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror -gem 'concurrent-ruby', '1.3.4' +gem 'concurrent-ruby' # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" -gem 'rails', '~> 7.0.8' +gem 'rails', '~> 8.0.3' # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] gem 'sprockets-rails' # Use postgresql as the database for Active Record -gem 'pg', '~> 1.1' +gem 'pg' # Use the Puma web server [https://github.com/puma/puma] gem 'puma' @@ -49,7 +48,7 @@ gem 'bootsnap', require: false # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" -gem 'grape', '~> 2.1' +gem 'grape', '~> 2.4' gem 'grape-swagger' group :development, :test do @@ -73,13 +72,14 @@ end group :test do # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] gem 'capybara' + gem 'mutex_m' gem 'rspec' gem 'rspec-rails' - gem 'rubocop', '1.62.1' + gem 'rubocop' gem 'rubocop-capybara' gem 'rubocop-rails' gem 'rubocop-rake' gem 'rubocop-rspec' gem 'rubocop-rspec_rails' - gem 'selenium-webdriver', '4.20' + gem 'selenium-webdriver' end diff --git a/Gemfile.lock b/Gemfile.lock index 15d58ed..e5290a4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,82 +1,89 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) + actioncable (8.0.3) + actionpack (= 8.0.3) + activesupport (= 8.0.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.0.8.7) - actionpack (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activesupport (= 7.0.8.7) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.8.7) - actionview (= 7.0.8.7) - activesupport (= 7.0.8.7) - rack (~> 2.0, >= 2.2.4) + zeitwerk (~> 2.6) + actionmailbox (8.0.3) + actionpack (= 8.0.3) + activejob (= 8.0.3) + activerecord (= 8.0.3) + activestorage (= 8.0.3) + activesupport (= 8.0.3) + mail (>= 2.8.0) + actionmailer (8.0.3) + actionpack (= 8.0.3) + actionview (= 8.0.3) + activejob (= 8.0.3) + activesupport (= 8.0.3) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.0.3) + actionview (= 8.0.3) + activesupport (= 8.0.3) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.8.7) - actionpack (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.0.3) + actionpack (= 8.0.3) + activerecord (= 8.0.3) + activestorage (= 8.0.3) + activesupport (= 8.0.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.8.7) - activesupport (= 7.0.8.7) + actionview (8.0.3) + activesupport (= 8.0.3) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.8.7) - activesupport (= 7.0.8.7) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (8.0.3) + activesupport (= 8.0.3) globalid (>= 0.3.6) - activemodel (7.0.8.7) - activesupport (= 7.0.8.7) - activerecord (7.0.8.7) - activemodel (= 7.0.8.7) - activesupport (= 7.0.8.7) - activestorage (7.0.8.7) - actionpack (= 7.0.8.7) - activejob (= 7.0.8.7) - activerecord (= 7.0.8.7) - activesupport (= 7.0.8.7) + activemodel (8.0.3) + activesupport (= 8.0.3) + activerecord (8.0.3) + activemodel (= 8.0.3) + activesupport (= 8.0.3) + timeout (>= 0.4.0) + activestorage (8.0.3) + actionpack (= 8.0.3) + activejob (= 8.0.3) + activerecord (= 8.0.3) + activesupport (= 8.0.3) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.8.7) - concurrent-ruby (~> 1.0, >= 1.0.2) + activesupport (8.0.3) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) appraisal (2.5.0) bundler rake thor (>= 0.14.0) - ast (2.4.2) - base64 (0.2.0) - bigdecimal (3.1.9) + ast (2.4.3) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.3) bindex (0.8.1) - bootsnap (1.18.4) + bootsnap (1.18.6) msgpack (~> 1.2) builder (3.3.0) capybara (3.40.0) @@ -88,13 +95,15 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.3.4) + concurrent-ruby (1.3.5) + connection_pool (2.5.4) crass (1.0.6) date (3.4.1) - debug (1.10.0) + debug (1.11.0) irb (~> 1.10) reline (>= 0.3.8) - diff-lcs (1.6.0) + diff-lcs (1.6.2) + drb (2.2.3) dry-core (1.1.0) concurrent-ruby (~> 1.0) logger @@ -105,18 +114,19 @@ GEM concurrent-ruby (~> 1.0) dry-core (~> 1.1) zeitwerk (~> 2.6) - dry-types (1.8.2) + dry-types (1.8.3) bigdecimal (~> 3.0) concurrent-ruby (~> 1.0) dry-core (~> 1.0) dry-inflector (~> 1.0) dry-logic (~> 1.4) zeitwerk (~> 2.6) + erb (5.0.2) erubi (1.13.1) - globalid (1.2.1) + globalid (1.3.0) + activesupport (>= 6.1) + grape (2.4.0) activesupport (>= 6.1) - grape (2.3.0) - activesupport (>= 6) dry-types (>= 1.1) mustermann-grape (~> 1.1.0) rack (>= 2) @@ -126,22 +136,23 @@ GEM rack-test (~> 2) i18n (1.14.7) concurrent-ruby (~> 1.0) - importmap-rails (2.1.0) + importmap-rails (2.2.2) actionpack (>= 6.0.0) activesupport (>= 6.0.0) railties (>= 6.0.0) - io-console (0.8.0) - irb (1.15.1) + io-console (0.8.1) + irb (1.15.2) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - jbuilder (2.13.0) - actionview (>= 5.0.0) - activesupport (>= 5.0.0) - json (2.10.1) - language_server-protocol (3.17.0.4) - logger (1.6.6) - loofah (2.24.0) + jbuilder (2.14.1) + actionview (>= 7.0.0) + activesupport (>= 7.0.0) + json (2.15.0) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -149,18 +160,18 @@ GEM net-imap net-pop net-smtp - marcel (1.0.4) - matrix (0.4.2) - method_source (1.1.0) + marcel (1.1.0) + matrix (0.4.3) mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (5.25.4) + minitest (5.25.5) msgpack (1.8.0) - mustermann (3.0.3) + mustermann (3.0.4) ruby2_keywords (~> 0.0.1) mustermann-grape (1.1.0) mustermann (>= 1.0.0) - net-imap (0.5.7) + mutex_m (0.3.0) + net-imap (0.5.10) date net-protocol net-pop (0.1.2) @@ -170,121 +181,139 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.4) - nokogiri (1.18.9) + nokogiri (1.18.10) mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.26.3) - parser (3.3.7.1) + parallel (1.27.0) + parser (3.3.9.0) ast (~> 2.4.1) racc - pg (1.5.9) + pg (1.6.2) pp (0.6.2) prettyprint prettyprint (0.2.0) - psych (5.2.3) + prism (1.5.1) + psych (5.2.6) date stringio - public_suffix (6.0.1) - puma (6.6.0) + public_suffix (6.0.2) + puma (7.0.4) nio4r (~> 2.0) racc (1.8.1) - rack (2.2.18) + rack (3.2.1) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rails (7.0.8.7) - actioncable (= 7.0.8.7) - actionmailbox (= 7.0.8.7) - actionmailer (= 7.0.8.7) - actionpack (= 7.0.8.7) - actiontext (= 7.0.8.7) - actionview (= 7.0.8.7) - activejob (= 7.0.8.7) - activemodel (= 7.0.8.7) - activerecord (= 7.0.8.7) - activestorage (= 7.0.8.7) - activesupport (= 7.0.8.7) + rackup (2.2.1) + rack (>= 3) + rails (8.0.3) + actioncable (= 8.0.3) + actionmailbox (= 8.0.3) + actionmailer (= 8.0.3) + actionpack (= 8.0.3) + actiontext (= 8.0.3) + actionview (= 8.0.3) + activejob (= 8.0.3) + activemodel (= 8.0.3) + activerecord (= 8.0.3) + activestorage (= 8.0.3) + activesupport (= 8.0.3) bundler (>= 1.15.0) - railties (= 7.0.8.7) - rails-dom-testing (2.2.0) + railties (= 8.0.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.0.8.7) - actionpack (= 7.0.8.7) - activesupport (= 7.0.8.7) - method_source + railties (8.0.3) + actionpack (= 8.0.3) + activesupport (= 8.0.3) + irb (~> 1.13) + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.2.1) - rdoc (6.12.0) + rake (13.3.0) + rdoc (6.14.2) + erb psych (>= 4.0.0) - regexp_parser (2.10.0) - reline (0.6.0) + regexp_parser (2.11.3) + reline (0.6.2) io-console (~> 0.5) - rexml (3.4.2) - rspec (3.13.0) + rexml (3.4.4) + rspec (3.13.1) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.3) + rspec-core (3.13.5) rspec-support (~> 3.13.0) - rspec-expectations (3.13.3) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.2) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.1.1) - actionpack (>= 7.0) - activesupport (>= 7.0) - railties (>= 7.0) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) rspec-core (~> 3.13) rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.2) - rubocop (1.62.1) + rspec-support (3.13.6) + rubocop (1.81.0) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.38.0) - parser (>= 3.3.1.0) - rubocop-capybara (2.21.0) - rubocop (~> 1.41) - rubocop-rails (2.29.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.47.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-capybara (2.22.1) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rails (2.33.3) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rake (0.6.0) - rubocop (~> 1.0) - rubocop-rspec (3.4.0) - rubocop (~> 1.61) - rubocop-rspec_rails (2.30.0) - rubocop (~> 1.61) - rubocop-rspec (~> 3, >= 3.0.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) + rubocop-rake (0.7.1) + lint_roller (~> 1.1) + rubocop (>= 1.72.1) + rubocop-rspec (3.7.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec_rails (2.31.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + rubocop-rspec (~> 3.5) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (2.4.1) - selenium-webdriver (4.20.0) + rubyzip (3.1.0) + securerandom (0.4.1) + selenium-webdriver (4.35.0) base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) + rubyzip (>= 1.2.2, < 4.0) websocket (~> 1.0) - sprockets (4.2.1) + sprockets (4.2.2) concurrent-ruby (~> 1.0) + logger rack (>= 2.2.4, < 4) sprockets-rails (3.5.2) actionpack (>= 6.1) @@ -292,28 +321,33 @@ GEM sprockets (>= 3.0.0) stimulus-rails (1.3.4) railties (>= 6.0.0) - stringio (3.1.4) + stringio (3.1.7) thor (1.4.0) timeout (0.4.3) - turbo-rails (2.0.11) - actionpack (>= 6.0.0) - railties (>= 6.0.0) + tsort (0.2.0) + turbo-rails (2.0.16) + actionpack (>= 7.1.0) + railties (>= 7.1.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.1.0) + uri (1.0.3) + useragent (0.16.11) web-console (4.2.1) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) websocket (1.2.11) - websocket-driver (0.7.7) + websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.2) + zeitwerk (2.7.3) PLATFORMS ruby @@ -322,24 +356,25 @@ DEPENDENCIES appraisal bootsnap capybara - concurrent-ruby (= 1.3.4) + concurrent-ruby debug - grape (~> 2.1) + grape (~> 2.4) grape-swagger importmap-rails jbuilder - pg (~> 1.1) + mutex_m + pg puma - rails (~> 7.0.8) + rails (~> 8.0.3) rspec rspec-rails - rubocop (= 1.62.1) + rubocop rubocop-capybara rubocop-rails rubocop-rake rubocop-rspec rubocop-rspec_rails - selenium-webdriver (= 4.20) + selenium-webdriver sprockets-rails stimulus-rails turbo-rails diff --git a/README.md b/README.md index 9a1c1b1..59486be 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![Test](https://github.com/ruby-grape/grape-on-rails/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/ruby-grape/grape-on-rails/actions/workflows/test.yml) [![Rubocop](https://github.com/ruby-grape/grape-on-rails/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/ruby-grape/grape-on-rails/actions/workflows/test.yml) -[![Code Climate](https://codeclimate.com/github/ruby-grape/grape-on-rails.svg)](https://codeclimate.com/github/ruby-grape/grape-on-rails) A [Grape](http://github.com/ruby-grape/grape) API mounted on Rails. @@ -21,3 +20,5 @@ rails s - Try http://localhost:3000/api/ping or http://localhost:3000/api/protected/ping with _username_ and _password_. - View Swagger docs at http://localhost:3000/swagger. +- Try http://localhost:3000/api/headers to see request headers. + diff --git a/Rakefile b/Rakefile index 8cff256..de48e7b 100644 --- a/Rakefile +++ b/Rakefile @@ -5,11 +5,15 @@ require_relative 'config/application' Rails.application.load_tasks -if Rails.env.test? || Rails.env.development? +if Rails.env.local? require 'rspec/core/rake_task' Rake::Task[:default].prerequisites.clear + RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = 'spec/**/*_spec.rb' + end + require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) diff --git a/config/boot.rb b/config/boot.rb index b9e460c..45df75b 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,5 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +require 'logger' require 'bundler/setup' # Set up gems listed in the Gemfile. require 'bootsnap/setup' # Speed up boot time by caching expensive operations. diff --git a/config/environments/development.rb b/config/environments/development.rb index e522e6e..c370445 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -67,4 +67,7 @@ # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true + + # Always preserve the full timezone rather than offset of the receiver. + config.active_support.to_time_preserves_timezone = :zone end diff --git a/config/environments/production.rb b/config/environments/production.rb index e2408b6..ae01e39 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -90,4 +90,7 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Always preserve the full timezone rather than offset of the receiver. + config.active_support.to_time_preserves_timezone = :zone end diff --git a/config/environments/test.rb b/config/environments/test.rb index 4795ec8..e797178 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -61,4 +61,7 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + + # Always preserve the full timezone rather than offset of the receiver. + config.active_support.to_time_preserves_timezone = :zone end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..51471bb --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,16 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema[8.0].define(version: 0) do + # These are extensions that must be enabled in order to support this database + enable_extension 'pg_catalog.plpgsql' +end diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index 82f114d..435bb77 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -3,12 +3,12 @@ source 'https://rubygems.org' gem 'bootsnap', require: false -gem 'concurrent-ruby', '1.3.4' -gem 'grape', '~> 2.1' +gem 'concurrent-ruby' +gem 'grape', '~> 2.4' gem 'grape-swagger' gem 'importmap-rails' gem 'jbuilder' -gem 'pg', '~> 1.1' +gem 'pg' gem 'puma' gem 'rails', '~> 6.1' gem 'sprockets-rails' @@ -27,13 +27,14 @@ end group :test do gem 'capybara' + gem 'mutex_m' gem 'rspec' gem 'rspec-rails' - gem 'rubocop', '1.62.1' + gem 'rubocop' gem 'rubocop-capybara' gem 'rubocop-rails' gem 'rubocop-rake' gem 'rubocop-rspec' gem 'rubocop-rspec_rails' - gem 'selenium-webdriver', '4.20' + gem 'selenium-webdriver' end diff --git a/gemfiles/rails_7.gemfile b/gemfiles/rails_7.gemfile index 0b3bde8..b1818f0 100644 --- a/gemfiles/rails_7.gemfile +++ b/gemfiles/rails_7.gemfile @@ -3,12 +3,12 @@ source 'https://rubygems.org' gem 'bootsnap', require: false -gem 'concurrent-ruby', '1.3.4' -gem 'grape', '~> 2.1' +gem 'concurrent-ruby' +gem 'grape', '~> 2.4' gem 'grape-swagger' gem 'importmap-rails' gem 'jbuilder' -gem 'pg', '~> 1.1' +gem 'pg' gem 'puma' gem 'rails', '~> 7.0' gem 'sprockets-rails' @@ -27,13 +27,14 @@ end group :test do gem 'capybara' + gem 'mutex_m' gem 'rspec' gem 'rspec-rails' - gem 'rubocop', '1.62.1' + gem 'rubocop' gem 'rubocop-capybara' gem 'rubocop-rails' gem 'rubocop-rake' gem 'rubocop-rspec' gem 'rubocop-rspec_rails' - gem 'selenium-webdriver', '4.20' + gem 'selenium-webdriver' end diff --git a/gemfiles/rails_6.gemfile b/gemfiles/rails_8.gemfile similarity index 80% rename from gemfiles/rails_6.gemfile rename to gemfiles/rails_8.gemfile index d6927b1..e438202 100644 --- a/gemfiles/rails_6.gemfile +++ b/gemfiles/rails_8.gemfile @@ -3,14 +3,14 @@ source 'https://rubygems.org' gem 'bootsnap', require: false -gem 'concurrent-ruby', '1.3.4' -gem 'grape', '~> 2.1' +gem 'concurrent-ruby' +gem 'grape', '~> 2.4' gem 'grape-swagger' gem 'importmap-rails' gem 'jbuilder' -gem 'pg', '~> 1.1' +gem 'pg' gem 'puma' -gem 'rails', '~> 6.0' +gem 'rails', '~> 8.0' gem 'sprockets-rails' gem 'stimulus-rails' gem 'turbo-rails' @@ -27,13 +27,14 @@ end group :test do gem 'capybara' + gem 'mutex_m' gem 'rspec' gem 'rspec-rails' - gem 'rubocop', '1.62.1' + gem 'rubocop' gem 'rubocop-capybara' gem 'rubocop-rails' gem 'rubocop-rake' gem 'rubocop-rspec' gem 'rubocop-rspec_rails' - gem 'selenium-webdriver', '4.20' + gem 'selenium-webdriver' end diff --git a/gemfiles/rails_edge.gemfile b/gemfiles/rails_edge.gemfile index 0573b37..eddaadf 100644 --- a/gemfiles/rails_edge.gemfile +++ b/gemfiles/rails_edge.gemfile @@ -3,12 +3,12 @@ source 'https://rubygems.org' gem 'bootsnap', require: false -gem 'concurrent-ruby', '1.3.4' -gem 'grape', '~> 2.1' +gem 'concurrent-ruby' +gem 'grape', '~> 2.4' gem 'grape-swagger' gem 'importmap-rails' gem 'jbuilder' -gem 'pg', '~> 1.1' +gem 'pg' gem 'puma' gem 'rails', git: 'https://github.com/rails/rails.git' gem 'sprockets-rails' @@ -27,13 +27,14 @@ end group :test do gem 'capybara' + gem 'mutex_m' gem 'rspec' gem 'rspec-rails' - gem 'rubocop', '1.62.1' + gem 'rubocop' gem 'rubocop-capybara' gem 'rubocop-rails' gem 'rubocop-rake' gem 'rubocop-rspec' gem 'rubocop-rspec_rails' - gem 'selenium-webdriver', '4.20' + gem 'selenium-webdriver' end