From d2176cdbb0967d84d5b8d7c4c613c967dad7f72a Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Mon, 20 Sep 2021 07:37:30 -0700 Subject: [PATCH] Update development dependencies --- .github/workflows/test.yml | 2 ++ Appraisals | 5 +++++ Gemfile | 1 + Gemfile.lock | 41 +++++++++---------------------------- gemfiles/rails_5.2.gemfile | 2 +- gemfiles/rails_6.0.gemfile | 2 +- gemfiles/rails_6.1.gemfile | 2 +- gemfiles/rails_7.0.gemfile | 27 ++++++++++++++++++++++++ gemfiles/rails_head.gemfile | 2 +- lib/good_job/adapter.rb | 4 ++-- 10 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 gemfiles/rails_7.0.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 186063b77..045520f3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,6 +63,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + - name: Install missing libs (Temporary regression in GH Action?) + run: sudo apt update && sudo apt-get -yqq install build-essential - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby }}" >| .ruby-version diff --git a/Appraisals b/Appraisals index 4ba8b57c9..214907d34 100644 --- a/Appraisals +++ b/Appraisals @@ -20,6 +20,11 @@ end if ruby_27_or_higher && !jruby # Rails HEAD requires MRI 2.7+ # activerecord-jdbcpostgresql-adapter does not have a compatible version + + appraise "rails-7.0" do + gem "rails", "~> 7.0.0.alpha" + end + appraise "rails-head" do gem "rails", github: "rails/rails", branch: "main" end diff --git a/Gemfile b/Gemfile index 8b42144f6..260562176 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gemspec gem 'activerecord-jdbcpostgresql-adapter', platforms: [:jruby] gem 'appraisal', github: "bensheldon/appraisal", branch: "fix-bundle-env" # https://github.com/thoughtbot/appraisal/pull/174 gem 'pg', platforms: [:mri, :mingw, :x64_mingw] +gem 'puma', '5.4.0' gem 'rails' platforms :ruby do diff --git a/Gemfile.lock b/Gemfile.lock index a591ece2f..c57f656c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,11 +72,6 @@ GEM activerecord-explain-analyze (0.1.0) activerecord (>= 4) pg - activerecord-jdbc-adapter (61.1-java) - activerecord (~> 6.1.0) - activerecord-jdbcpostgresql-adapter (61.1-java) - activerecord-jdbc-adapter (= 61.1) - jdbc-postgres (>= 9.4, < 43) activestorage (6.1.4.1) actionpack (= 6.1.4.1) activejob (= 6.1.4.1) @@ -155,9 +150,9 @@ GEM rubocop smart_properties erubi (1.10.0) - et-orbi (1.2.4) + et-orbi (1.2.5) tzinfo - faraday (1.7.1) + faraday (1.8.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -178,11 +173,10 @@ GEM faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) - ffi (1.15.3) - ffi (1.15.3-java) + ffi (1.15.4) fiber-local (1.0.0) foreman (0.87.2) - fugit (1.5.1) + fugit (1.5.2) et-orbi (~> 1.1, >= 1.1.8) raabro (~> 1.4) gem-release (2.2.2) @@ -200,7 +194,6 @@ GEM html_tokenizer (0.0.7) i18n (1.8.10) concurrent-ruby (~> 1.0) - jdbc-postgres (42.2.14) kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) @@ -231,17 +224,14 @@ GEM multi_json (1.15.0) multipart-post (2.1.1) nio4r (2.5.8) - nio4r (2.5.8-java) nokogiri (1.12.4) mini_portile2 (~> 2.6.1) racc (~> 1.4) - nokogiri (1.12.4-java) - racc (~> 1.4) octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) optimist (3.0.1) - parallel (1.20.1) + parallel (1.21.0) parser (3.0.2.0) ast (~> 2.4.1) pg (1.2.3) @@ -255,10 +245,6 @@ GEM pry (0.13.1) coderay (~> 1.1) method_source (~> 1.0) - pry (0.13.1-java) - coderay (~> 1.1) - method_source (~> 1.0) - spoon (~> 0.0) pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) @@ -267,11 +253,8 @@ GEM public_suffix (4.0.6) puma (5.4.0) nio4r (~> 2.0) - puma (5.4.0-java) - nio4r (~> 2.0) raabro (1.4.0) racc (1.5.2) - racc (1.5.2-java) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) @@ -326,7 +309,7 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.10.2) - rubocop (1.20.0) + rubocop (1.21.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -340,7 +323,7 @@ GEM rubocop-performance (1.11.5) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.11.3) + rubocop-rails (2.12.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) @@ -357,9 +340,7 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) sigdump (0.2.4) - smart_properties (1.16.0) - spoon (0.0.6) - ffi + smart_properties (1.16.3) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -372,11 +353,9 @@ GEM tomlrb (2.0.1) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - unicode-display_width (2.0.0) + unicode-display_width (2.1.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) - websocket-driver (0.7.5-java) - websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) @@ -410,7 +389,7 @@ DEPENDENCIES pg pry-byebug pry-rails - puma + puma (= 5.4.0) rails rbtrace rspec-rails diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile index 5e2d4786d..38562cf64 100644 --- a/gemfiles/rails_5.2.gemfile +++ b/gemfiles/rails_5.2.gemfile @@ -1,4 +1,3 @@ -# frozen_string_literal: true # This file was generated by Appraisal source "https://rubygems.org" @@ -6,6 +5,7 @@ source "https://rubygems.org" gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby] gem "appraisal", branch: "fix-bundle-env", git: "https://github.com/bensheldon/appraisal.git" gem "pg", platforms: [:mri, :mingw, :x64_mingw] +gem "puma", "5.4.0" gem "rails", "~> 5.2.0" platforms :ruby do diff --git a/gemfiles/rails_6.0.gemfile b/gemfiles/rails_6.0.gemfile index 3d1d9cf37..7d547816d 100644 --- a/gemfiles/rails_6.0.gemfile +++ b/gemfiles/rails_6.0.gemfile @@ -1,4 +1,3 @@ -# frozen_string_literal: true # This file was generated by Appraisal source "https://rubygems.org" @@ -6,6 +5,7 @@ source "https://rubygems.org" gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby] gem "appraisal", branch: "fix-bundle-env", git: "https://github.com/bensheldon/appraisal.git" gem "pg", platforms: [:mri, :mingw, :x64_mingw] +gem "puma", "5.4.0" gem "rails", "~> 6.0.0" platforms :ruby do diff --git a/gemfiles/rails_6.1.gemfile b/gemfiles/rails_6.1.gemfile index d2ee92b98..496166712 100644 --- a/gemfiles/rails_6.1.gemfile +++ b/gemfiles/rails_6.1.gemfile @@ -1,4 +1,3 @@ -# frozen_string_literal: true # This file was generated by Appraisal source "https://rubygems.org" @@ -6,6 +5,7 @@ source "https://rubygems.org" gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby] gem "appraisal", branch: "fix-bundle-env", git: "https://github.com/bensheldon/appraisal.git" gem "pg", platforms: [:mri, :mingw, :x64_mingw] +gem "puma", "5.4.0" gem "rails", "~> 6.1.0" platforms :ruby do diff --git a/gemfiles/rails_7.0.gemfile b/gemfiles/rails_7.0.gemfile new file mode 100644 index 000000000..2dfcad498 --- /dev/null +++ b/gemfiles/rails_7.0.gemfile @@ -0,0 +1,27 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby] +gem "appraisal", branch: "fix-bundle-env", git: "https://github.com/bensheldon/appraisal.git" +gem "pg", platforms: [:mri, :mingw, :x64_mingw] +gem "puma", "5.4.0" +gem "rails", "~> 7.0.0.alpha" + +platforms :ruby do + gem "activerecord-explain-analyze" + gem "memory_profiler" + gem "pry-byebug" + gem "rbtrace" + + group :lint do + gem "erb_lint", ">= 0.0.35" + gem "mdl" + gem "rubocop" + gem "rubocop-performance" + gem "rubocop-rails" + gem "rubocop-rspec" + end +end + +gemspec path: "../" diff --git a/gemfiles/rails_head.gemfile b/gemfiles/rails_head.gemfile index db94e34ec..386eca50a 100644 --- a/gemfiles/rails_head.gemfile +++ b/gemfiles/rails_head.gemfile @@ -1,4 +1,3 @@ -# frozen_string_literal: true # This file was generated by Appraisal source "https://rubygems.org" @@ -6,6 +5,7 @@ source "https://rubygems.org" gem "activerecord-jdbcpostgresql-adapter", platforms: [:jruby] gem "appraisal", branch: "fix-bundle-env", git: "https://github.com/bensheldon/appraisal.git" gem "pg", platforms: [:mri, :mingw, :x64_mingw] +gem "puma", "5.4.0" gem "rails", branch: "main", git: "https://github.com/rails/rails.git" platforms :ruby do diff --git a/lib/good_job/adapter.rb b/lib/good_job/adapter.rb index 9217deb6c..230059b26 100644 --- a/lib/good_job/adapter.rb +++ b/lib/good_job/adapter.rb @@ -101,14 +101,14 @@ def shutdown(timeout: :default) # @return [Boolean] def execute_async? @configuration.execution_mode == :async_all || - @configuration.execution_mode.in?([:async, :async_server]) && in_server_process? + (@configuration.execution_mode.in?([:async, :async_server]) && in_server_process?) end # Whether in +:external+ execution mode. # @return [Boolean] def execute_externally? @configuration.execution_mode == :external || - @configuration.execution_mode.in?([:async, :async_server]) && !in_server_process? + (@configuration.execution_mode.in?([:async, :async_server]) && !in_server_process?) end # Whether in +:inline+ execution mode.