diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f249ab4..a4711af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,11 +13,20 @@ jobs: name: Run specs runs-on: ubuntu-latest + strategy: + matrix: + ruby: ['3.0', '3.1', '3.2', '3.3'] + rails: ['6.1', '7.0', '7.1'] + + env: + BUNDLE_LOCKFILE: rails-${{ matrix.rails }} + steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: + ruby-version: ${{ matrix.ruby }} rubygems: latest bundler-cache: true @@ -30,6 +39,7 @@ jobs: with: name: code-coverage path: coverage + overwrite: true coverage: name: Report code coverage diff --git a/.ruby-version b/.ruby-version index aed7acb..4a85a55 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.2.4 +ruby-3.3.1 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..be4f468 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "conventionalCommits.scopes": [ + "deps" + ] +} diff --git a/Gemfile b/Gemfile index 9aac809..6bf1a31 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,29 @@ source 'https://rubygems.org' -# Specify your gem's dependencies in human_enum.gemspec gemspec +plugin 'bundler-multilock', '~> 1.3' +return unless Plugin.installed?('bundler-multilock') + +Plugin.send(:load_plugin, 'bundler-multilock') + +lockfile do + gem 'activerecord', '~> 7.1' # rubocop:disable Bundler/DuplicatedGem +end + +lockfile 'rails-6.1' do + gem 'activerecord', '~> 6.1.0' # rubocop:disable Bundler/DuplicatedGem +end + +lockfile 'rails-7.0' do + gem 'activerecord', '~> 7.0.0' # rubocop:disable Bundler/DuplicatedGem +end + +lockfile 'rails-7.1' do + gem 'activerecord', '~> 7.1.0' # rubocop:disable Bundler/DuplicatedGem +end + gem 'rake', '~> 13.0' gem 'sqlite3', '~> 1.4' diff --git a/Gemfile.lock b/Gemfile.lock index 8b74f4d..7c2aff8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,19 +70,20 @@ GEM parser (3.3.1.0) ast (~> 2.4.1) racc - prism (0.27.0) + prism (0.29.0) pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - racc (1.7.3) + racc (1.8.0) rack (3.0.11) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - regexp_parser (2.9.0) - rexml (3.2.6) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) rspec (3.13.0) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) @@ -117,7 +118,7 @@ GEM rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.24.1) + rubocop-rails (2.25.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) @@ -131,9 +132,9 @@ GEM rubocop-rspec_rails (~> 2.28) rubocop-rspec_rails (2.28.3) rubocop (~> 1.40) - ruby-lsp (0.16.6) + ruby-lsp (0.16.7) language_server-protocol (~> 3.17.0) - prism (>= 0.23.0, < 0.28) + prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) ruby-lsp-rails (0.3.6) ruby-lsp (>= 0.16.5, < 0.17.0) @@ -148,9 +149,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet-runtime (0.5.11371) + sorbet-runtime (0.5.11391) + sqlite3 (1.7.3-aarch64-linux) + sqlite3 (1.7.3-arm-linux) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86-linux) sqlite3 (1.7.3-x86_64-darwin) sqlite3 (1.7.3-x86_64-linux) + strscan (3.1.0) thor (1.3.1) timeout (0.4.1) tzinfo (2.0.6) @@ -158,10 +164,15 @@ GEM unicode-display_width (2.5.0) PLATFORMS - x86_64-darwin-22 + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin x86_64-linux DEPENDENCIES + activerecord (~> 7.1) guard (~> 2.18) guard-rspec (~> 4.7) guard-rubocop (~> 1.5) @@ -179,4 +190,4 @@ DEPENDENCIES sqlite3 (~> 1.4) BUNDLED WITH - 2.4.19 + 2.5.10 diff --git a/Gemfile.rails-6.1.lock b/Gemfile.rails-6.1.lock new file mode 100644 index 0000000..fa13ca9 --- /dev/null +++ b/Gemfile.rails-6.1.lock @@ -0,0 +1,184 @@ +PATH + remote: . + specs: + human_enum (1.1.0) + activerecord (>= 6.1, < 8) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (6.1.7.7) + activesupport (= 6.1.7.7) + activerecord (6.1.7.7) + activemodel (= 6.1.7.7) + activesupport (= 6.1.7.7) + activesupport (6.1.7.7) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + ast (2.4.2) + base64 (0.1.1) + coderay (1.1.3) + concurrent-ruby (1.2.3) + diff-lcs (1.5.1) + docile (1.4.0) + ffi (1.16.3) + formatador (1.1.0) + guard (2.18.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.5.0) + guard (~> 2.0) + rubocop (< 2.0) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + lumberjack (1.2.10) + method_source (1.1.0) + minitest (5.23.1) + nenv (0.3.0) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + prism (0.29.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + racc (1.8.0) + rack (3.0.11) + rainbow (3.1.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.56.4) + base64 (~> 0.1.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.2.2.3) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.21.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.25.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.29.2) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.28.3) + rubocop (~> 1.40) + ruby-lsp (0.16.7) + language_server-protocol (~> 3.17.0) + prism (>= 0.29.0, < 0.30) + sorbet-runtime (>= 0.5.10782) + ruby-lsp-rails (0.3.6) + ruby-lsp (>= 0.16.5, < 0.17.0) + sorbet-runtime (>= 0.5.9897) + ruby-lsp-rspec (0.1.11) + ruby-lsp (~> 0.16.0) + ruby-progressbar (1.13.0) + shellany (0.0.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sorbet-runtime (0.5.11391) + sqlite3 (1.7.3-aarch64-linux) + sqlite3 (1.7.3-arm-linux) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86-linux) + sqlite3 (1.7.3-x86_64-darwin) + sqlite3 (1.7.3-x86_64-linux) + strscan (3.1.0) + thor (1.3.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + zeitwerk (2.6.14) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + activerecord (~> 6.1.0) + guard (~> 2.18) + guard-rspec (~> 4.7) + guard-rubocop (~> 1.5) + human_enum! + rake (~> 13.0) + rspec (~> 3.12) + rubocop (~> 1.56.3) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + ruby-lsp-rails + ruby-lsp-rspec + simplecov (~> 0.22.0) + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.10 diff --git a/Gemfile.rails-7.0.lock b/Gemfile.rails-7.0.lock new file mode 100644 index 0000000..53f1770 --- /dev/null +++ b/Gemfile.rails-7.0.lock @@ -0,0 +1,182 @@ +PATH + remote: . + specs: + human_enum (1.1.0) + activerecord (>= 6.1, < 8) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.0.8.3) + activesupport (= 7.0.8.3) + activerecord (7.0.8.3) + activemodel (= 7.0.8.3) + activesupport (= 7.0.8.3) + activesupport (7.0.8.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + ast (2.4.2) + base64 (0.1.1) + coderay (1.1.3) + concurrent-ruby (1.2.3) + diff-lcs (1.5.1) + docile (1.4.0) + ffi (1.16.3) + formatador (1.1.0) + guard (2.18.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.5.0) + guard (~> 2.0) + rubocop (< 2.0) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + lumberjack (1.2.10) + method_source (1.1.0) + minitest (5.23.1) + nenv (0.3.0) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + prism (0.29.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + racc (1.8.0) + rack (3.0.11) + rainbow (3.1.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.56.4) + base64 (~> 0.1.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.2.2.3) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.21.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.25.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.29.2) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.28.3) + rubocop (~> 1.40) + ruby-lsp (0.16.7) + language_server-protocol (~> 3.17.0) + prism (>= 0.29.0, < 0.30) + sorbet-runtime (>= 0.5.10782) + ruby-lsp-rails (0.3.6) + ruby-lsp (>= 0.16.5, < 0.17.0) + sorbet-runtime (>= 0.5.9897) + ruby-lsp-rspec (0.1.11) + ruby-lsp (~> 0.16.0) + ruby-progressbar (1.13.0) + shellany (0.0.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sorbet-runtime (0.5.11391) + sqlite3 (1.7.3-aarch64-linux) + sqlite3 (1.7.3-arm-linux) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86-linux) + sqlite3 (1.7.3-x86_64-darwin) + sqlite3 (1.7.3-x86_64-linux) + strscan (3.1.0) + thor (1.3.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + activerecord (~> 7.0.0) + guard (~> 2.18) + guard-rspec (~> 4.7) + guard-rubocop (~> 1.5) + human_enum! + rake (~> 13.0) + rspec (~> 3.12) + rubocop (~> 1.56.3) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + ruby-lsp-rails + ruby-lsp-rspec + simplecov (~> 0.22.0) + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.10 diff --git a/Gemfile.rails-7.1.lock b/Gemfile.rails-7.1.lock new file mode 100644 index 0000000..da6439e --- /dev/null +++ b/Gemfile.rails-7.1.lock @@ -0,0 +1,193 @@ +PATH + remote: . + specs: + human_enum (1.1.0) + activerecord (>= 6.1, < 8) + +GEM + remote: https://rubygems.org/ + specs: + activemodel (7.1.3.3) + activesupport (= 7.1.3.3) + activerecord (7.1.3.3) + activemodel (= 7.1.3.3) + activesupport (= 7.1.3.3) + timeout (>= 0.4.0) + activesupport (7.1.3.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + ast (2.4.2) + base64 (0.1.1) + bigdecimal (3.1.8) + coderay (1.1.3) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + diff-lcs (1.5.1) + docile (1.4.0) + drb (2.2.1) + ffi (1.16.3) + formatador (1.1.0) + guard (2.18.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + guard-rubocop (1.5.0) + guard (~> 2.0) + rubocop (< 2.0) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + lumberjack (1.2.10) + method_source (1.1.0) + minitest (5.23.1) + mutex_m (0.2.0) + nenv (0.3.0) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + parallel (1.24.0) + parser (3.3.1.0) + ast (~> 2.4.1) + racc + prism (0.29.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + racc (1.8.0) + rack (3.0.11) + rainbow (3.1.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + rubocop (1.56.4) + base64 (~> 0.1.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.2.2.3) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + rubocop-capybara (2.20.0) + rubocop (~> 1.41) + rubocop-factory_bot (2.25.1) + rubocop (~> 1.41) + rubocop-performance (1.21.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rails (2.25.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-rake (0.6.0) + rubocop (~> 1.0) + rubocop-rspec (2.29.2) + rubocop (~> 1.40) + rubocop-capybara (~> 2.17) + rubocop-factory_bot (~> 2.22) + rubocop-rspec_rails (~> 2.28) + rubocop-rspec_rails (2.28.3) + rubocop (~> 1.40) + ruby-lsp (0.16.7) + language_server-protocol (~> 3.17.0) + prism (>= 0.29.0, < 0.30) + sorbet-runtime (>= 0.5.10782) + ruby-lsp-rails (0.3.6) + ruby-lsp (>= 0.16.5, < 0.17.0) + sorbet-runtime (>= 0.5.9897) + ruby-lsp-rspec (0.1.11) + ruby-lsp (~> 0.16.0) + ruby-progressbar (1.13.0) + shellany (0.0.1) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + sorbet-runtime (0.5.11391) + sqlite3 (1.7.3-aarch64-linux) + sqlite3 (1.7.3-arm-linux) + sqlite3 (1.7.3-arm64-darwin) + sqlite3 (1.7.3-x86-linux) + sqlite3 (1.7.3-x86_64-darwin) + sqlite3 (1.7.3-x86_64-linux) + strscan (3.1.0) + thor (1.3.1) + timeout (0.4.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + activerecord (~> 7.1.0) + guard (~> 2.18) + guard-rspec (~> 4.7) + guard-rubocop (~> 1.5) + human_enum! + rake (~> 13.0) + rspec (~> 3.12) + rubocop (~> 1.56.3) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + ruby-lsp-rails + ruby-lsp-rspec + simplecov (~> 0.22.0) + sqlite3 (~> 1.4) + +BUNDLED WITH + 2.5.10