Skip to content

Commit

Permalink
Add support for Rails 7.1 and Ruby 3.3 and 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Jun 9, 2024
1 parent e75d7ea commit 4a4603d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: [ 3.1, '3.0', 2.7, jruby, truffleruby ]
gemfile: [ '7.0', '6.1' ]
exclude:
- ruby: jruby
gemfile: '7.0' # requires ruby 2.7
ruby: [ 3.3, 3.2, 3.1, jruby, truffleruby ]
gemfile: [ '7.1', '7.0', '6.1' ]
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.gemfile }}.gemfile
steps:
Expand Down
8 changes: 4 additions & 4 deletions lib/simple_workflow/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ def remove_discarded_flashes(session)
Rails.logger.warn "simple_workflow: session: #{session.to_hash}"
end

if ActionPack::VERSION::MAJOR >= 5
if ActionPack::VERSION::MAJOR >= 7
def serialize_session(cookie_jar, session)
cookie_jar.send(:serialize, session)
cookie_jar.send(:serializer).send(:dump, session)
end
else # Rails 4.x
else # Rails 6
def serialize_session(cookie_jar, session)
cookie_jar.send(:serialize, nil, session)
cookie_jar.send(:serialize, session)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/simple_workflow/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module SimpleWorkflow
VERSION = '2.2.0'
VERSION = '2.2.1'
end
4 changes: 2 additions & 2 deletions simple_workflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Gem::Specification.new do |s|
s.summary = 'Add simple breadcrumbs "detour" workflow to Ruby On Rails.'
s.homepage = 'https://github.com/donv/simple_workflow'
s.description = 'Expands Ruby on Rails to allow simple breadcrumb detour workflows.'
s.required_ruby_version = '>= 2.7', '<4'
s.required_ruby_version = '~> 3.1'
s.licenses = %w[MIT]
s.files = Dir['[A-Z]*', 'lib/**/*', 'test/**/*']

s.add_runtime_dependency('rails', '>=6.2', '<8')
s.add_runtime_dependency('rails', '>=6.1', '<8')

s.add_development_dependency('rubocop', '~>1.0')
s.add_development_dependency('rubocop-performance', '~>1.5')
Expand Down

0 comments on commit 4a4603d

Please sign in to comment.