diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 5bbcb6e..67681ba 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -26,35 +26,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rails_version: ['4.2.7', '5.1.0', '5.2.0', '6.0.0', '6.1.0', '7.0'] - ruby-version: ['2.6', '2.7', '3.0', '3.1'] - exclude: - - ruby-version: '3.0' - rails_version: '4.2.7' - - ruby-version: '3.1' - rails_version: '4.2.7' - - ruby-version: '3.0' - rails_version: '5.0' - - ruby-version: '3.1' - rails_version: '5.0' - - ruby-version: '3.0' - rails_version: '5.1' - - ruby-version: '3.1' - rails_version: '5.1' - - ruby-version: '3.0' - rails_version: '5.2' - - ruby-version: '3.1' - rails_version: '5.2' - - ruby-version: '3.0' - rails_version: '6.0' - - ruby-version: '3.1' - rails_version: '6.0' - - ruby-version: '3.1' - rails_version: '6.1' - - ruby-version: '2.6' - rails_version: '7.0' + rails_version: ['6.1.0', '7.0', '7.1.0'] + ruby-version: ['3.0', '3.1', '3.2', '3.3'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: diff --git a/gush.gemspec b/gush.gemspec index 11d3e0e..b8c4c2a 100644 --- a/gush.gemspec +++ b/gush.gemspec @@ -2,11 +2,13 @@ lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require_relative 'lib/gush/version' + Gem::Specification.new do |spec| spec.name = "gush" - spec.version = "2.1.0" - spec.authors = ["Piotrek Okoński"] - spec.email = ["piotrek@okonski.org"] + spec.version = Gush::VERSION + spec.authors = ["Piotrek Okoński", "Michał Krzyżanowski"] + spec.email = ["piotrek@okonski.org", "michal.krzyzanowski+github@gmail.com"] spec.summary = "Fast and distributed workflow runner based on ActiveJob and Redis" spec.description = "Gush is a parallel workflow runner using Redis as storage and ActiveJob for executing jobs." spec.homepage = "https://github.com/chaps-io/gush" @@ -16,8 +18,9 @@ Gem::Specification.new do |spec| spec.executables = "gush" spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.required_ruby_version = '>= 3.0.0' - spec.add_dependency "activejob", ">= 4.2.7", "< 7.1" + spec.add_dependency "activejob", ">= 6.1.0", "< 7.2" spec.add_dependency "concurrent-ruby", "~> 1.0" spec.add_dependency "multi_json", "~> 1.11" spec.add_dependency "redis", ">= 3.2", "< 6" @@ -29,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_dependency "thor", ">= 0.19", "< 1.3" spec.add_dependency "launchy", "~> 2.4" spec.add_development_dependency "bundler" - spec.add_development_dependency "rake", "~> 10.4" + spec.add_development_dependency "rake", "~> 12" spec.add_development_dependency "rspec", '~> 3.0' spec.add_development_dependency "pry", '~> 0.10' end diff --git a/lib/gush/version.rb b/lib/gush/version.rb new file mode 100644 index 0000000..3982b0b --- /dev/null +++ b/lib/gush/version.rb @@ -0,0 +1,3 @@ +module Gush + VERSION = '3.0.0' +end diff --git a/spec/features/integration_spec.rb b/spec/features/integration_spec.rb index 443ffbe..e7544d9 100644 --- a/spec/features/integration_spec.rb +++ b/spec/features/integration_spec.rb @@ -5,9 +5,10 @@ context "when all jobs finish successfuly" do it "marks workflow as completed" do flow = TestWorkflow.create - perform_enqueued_jobs do - flow.start! - end + + ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true + flow.start! + ActiveJob::Base.queue_adapter.perform_enqueued_jobs = false flow = flow.reload expect(flow).to be_finished diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 22ea016..f64a892 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +require 'active_support' require 'active_support/testing/time_helpers' require 'gush' require 'json'