diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 42abc49..4d67027 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,16 +7,31 @@ on: - main jobs: - build: - runs-on: ubuntu-latest + RSpec: + runs-on: ubuntu-24.04 + strategy: + matrix: + ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3', '3.4' ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 - - name: Run the default task + ruby-version: ${{ matrix.ruby }} + - name: Build run: | - gem install bundler -v 2.2.3 bundle install - bundle exec rake + bundle exec rspec + + Rubocop: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.4' + bundler-cache: true + - name: Rubocop + run: | + bundle install + bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 3b0925d..ff2593d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,4 @@ -require: +plugins: - rubocop-rspec AllCops: diff --git a/Gemfile b/Gemfile index 7d35961..3cbd059 100644 --- a/Gemfile +++ b/Gemfile @@ -5,9 +5,14 @@ source 'https://rubygems.org' # Specify your gem's dependencies in gravity_mailbox.gemspec gemspec +gem 'base64' +gem 'bigdecimal' gem 'combustion' +gem 'drb' +gem 'mutex_m' +gem 'net-http' gem 'rails-controller-testing' -gem 'rake', '~> 13.0' +gem 'rake' gem 'rspec' gem 'rspec-rails' gem 'rubocop' diff --git a/Gemfile.lock b/Gemfile.lock index e00e2c8..aaf5d7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,218 +2,187 @@ PATH remote: . specs: gravity_mailbox (0.4.1) - rails (>= 6.0) + actionmailer (>= 7.0) + railties (>= 7.0) GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) - mail (>= 2.7.1) - actionmailer (6.1.7.3) - actionpack (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activesupport (= 6.1.7.3) + 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 (6.1.7.3) - actionview (= 6.1.7.3) - activesupport (= 6.1.7.3) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.8.7) + actionview (= 7.0.8.7) + activesupport (= 7.0.8.7) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.3) - actionpack (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) - nokogiri (>= 1.8.5) - actionview (6.1.7.3) - activesupport (= 6.1.7.3) + actionview (7.0.8.7) + activesupport (= 7.0.8.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.3) - activesupport (= 6.1.7.3) + activejob (7.0.8.7) + activesupport (= 7.0.8.7) globalid (>= 0.3.6) - activemodel (6.1.7.3) - activesupport (= 6.1.7.3) - activerecord (6.1.7.3) - activemodel (= 6.1.7.3) - activesupport (= 6.1.7.3) - activestorage (6.1.7.3) - actionpack (= 6.1.7.3) - activejob (= 6.1.7.3) - activerecord (= 6.1.7.3) - activesupport (= 6.1.7.3) - marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (6.1.7.3) + activesupport (7.0.8.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) - builder (3.2.4) - combustion (1.3.7) + ast (2.4.3) + base64 (0.3.0) + bigdecimal (3.2.2) + builder (3.3.0) + combustion (1.5.0) activesupport (>= 3.0.0) railties (>= 3.0.0) thor (>= 0.14.6) - concurrent-ruby (1.1.10) + concurrent-ruby (1.3.4) crass (1.0.6) - date (3.3.3) - diff-lcs (1.5.0) - erubi (1.12.0) - globalid (1.1.0) - activesupport (>= 5.0) - i18n (1.12.0) + date (3.4.1) + diff-lcs (1.6.2) + drb (2.2.3) + erubi (1.13.1) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.6.2) - loofah (2.19.1) + json (2.13.2) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + loofah (2.24.1) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.2) - method_source (1.0.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.17.0) - net-imap (0.3.6) + method_source (1.1.0) + mini_mime (1.1.5) + mini_portile2 (2.8.9) + minitest (5.25.5) + mutex_m (0.3.0) + net-http (0.2.2) + uri + net-imap (0.4.22) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout - net-smtp (0.3.3) + net-smtp (0.5.1) net-protocol - nio4r (2.5.9) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.7) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - parallel (1.22.1) - parser (3.1.2.1) + parallel (1.27.0) + parser (3.3.9.0) ast (~> 2.4.1) - racc (1.7.1) - rack (2.2.7) - rack-test (2.0.2) + racc + prism (1.4.0) + racc (1.8.1) + rack (2.2.17) + rack-test (2.2.0) rack (>= 1.3) - rails (6.1.7.3) - actioncable (= 6.1.7.3) - actionmailbox (= 6.1.7.3) - actionmailer (= 6.1.7.3) - actionpack (= 6.1.7.3) - actiontext (= 6.1.7.3) - actionview (= 6.1.7.3) - activejob (= 6.1.7.3) - activemodel (= 6.1.7.3) - activerecord (= 6.1.7.3) - activestorage (= 6.1.7.3) - activesupport (= 6.1.7.3) - bundler (>= 1.15.0) - railties (= 6.1.7.3) - sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) - railties (6.1.7.3) - actionpack (= 6.1.7.3) - activesupport (= 6.1.7.3) + 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 rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.6.0) - rexml (3.2.5) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.0) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rake (13.3.0) + regexp_parser (2.11.2) + rspec (3.13.1) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.5) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-rails (5.1.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.12.0) - rubocop (1.38.0) + rspec-support (~> 3.13.0) + rspec-rails (7.1.1) + actionpack (>= 7.0) + activesupport (>= 7.0) + railties (>= 7.0) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.5) + rubocop (1.79.2) json (~> 2.3) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) - parser (>= 3.1.2.1) + 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.23.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.46.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.23.0) - parser (>= 3.1.1.0) - rubocop-rspec (2.17.1) - rubocop (~> 1.33) - ruby-progressbar (1.11.0) - sprockets (4.2.0) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.4.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - sprockets (>= 3.0.0) - thor (1.2.2) - timeout (0.3.2) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.46.0) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-rspec (3.6.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) + ruby-progressbar (1.13.0) + thor (1.4.0) + timeout (0.4.3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.3.0) - websocket-driver (0.7.5) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.5) - zeitwerk (2.6.8) + unicode-display_width (3.1.5) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + uri (1.0.3) + zeitwerk (2.6.18) PLATFORMS ruby DEPENDENCIES + base64 + bigdecimal combustion + drb gravity_mailbox! + mutex_m + net-http rails-controller-testing - rake (~> 13.0) + rake rspec rspec-rails rubocop rubocop-rspec BUNDLED WITH - 2.2.3 + 2.4.22 diff --git a/gravity_mailbox.gemspec b/gravity_mailbox.gemspec index 1d137a2..1038beb 100644 --- a/gravity_mailbox.gemspec +++ b/gravity_mailbox.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| 'sent by your Rails app directly through your Rails app.' spec.homepage = 'https://github.com/petalmd/gravity_mailbox' spec.license = 'MIT' - spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0') + spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0') spec.files = Dir['LICENSE.txt', 'README.md', 'lib/**/*', 'config/**/*', 'app/**/*'] spec.extra_rdoc_files = %w[LICENSE.txt README.md] @@ -27,5 +27,6 @@ Gem::Specification.new do |spec| 'rubygems_mfa_required' => 'true' } - spec.add_dependency 'rails', '>= 6.0' + spec.add_dependency 'actionmailer', '>= 7.0' + spec.add_dependency 'railties', '>= 7.0' end diff --git a/spec/controllers/gravity_mailbox/mailbox_controller_spec.rb b/spec/controllers/gravity_mailbox/mailbox_controller_spec.rb index c9db3c5..330987d 100644 --- a/spec/controllers/gravity_mailbox/mailbox_controller_spec.rb +++ b/spec/controllers/gravity_mailbox/mailbox_controller_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GravityMailbox::MailboxController, type: :controller do # rubocop:disable RSpec/Rails/InferredSpecType +RSpec.describe GravityMailbox::MailboxController, type: :controller do before do @routes = GravityMailbox::Engine.routes end