Skip to content

Commit

Permalink
Remove support for EOL Ruby 2.6/2.7, Rails 5.2/6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Nov 30, 2023
1 parent d149229 commit 225823c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 58 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,9 @@ jobs:
--health-retries 5
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
rails: ['5.2', '6.0.0', '6.1.0', '7.0.0', '7.1.0']
ruby: ['3.0', '3.1', '3.2']
rails: ['6.1.0', '7.0.0', '7.1.0']
exclude:
- ruby: "2.6"
rails: "7.1.0"
- ruby: "2.6"
rails: "7.0.0"
- ruby: "2.7"
rails: "7.1.0"
- ruby: "3.0"
rails: "5.2"
- ruby: "3.1"
rails: "5.2"
- ruby: "3.1"
rails: "6.0.0"
- ruby: "3.2"
rails: "5.2"
- ruby: "3.2"
rails: "6.0.0"
- ruby: "3.2"
rails: "6.1.0"
env:
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,9 @@ jobs:
--health-retries 5
strategy:
matrix:
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
rails: ['5.2', '6.0.0', '6.1.0', '7.0.0', '7.1.0']
ruby: ['3.0', '3.1', '3.2']
rails: ['6.1.0', '7.0.0', '7.1.0']
exclude:
- ruby: "2.6"
rails: "7.1.0"
- ruby: "2.6"
rails: "7.0.0"
- ruby: "2.7"
rails: "7.1.0"
- ruby: "3.0"
rails: "5.2"
- ruby: "3.1"
rails: "5.2"
- ruby: "3.1"
rails: "6.0.0"
- ruby: "3.2"
rails: "5.2"
- ruby: "3.2"
rails: "6.0.0"
- ruby: "3.2"
rails: "6.1.0"
env:
Expand Down
10 changes: 2 additions & 8 deletions lib/flipper/adapters/memoizable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,8 @@ def memoizing?
!!@memoize
end

if RUBY_VERSION >= '3.0'
def method_missing(name, *args, **kwargs, &block)
@adapter.send name, *args, **kwargs, &block
end
else
def method_missing(name, *args, &block)
@adapter.send name, *args, &block
end
def method_missing(name, *args, **kwargs, &block)
@adapter.send name, *args, **kwargs, &block
end

private
Expand Down
10 changes: 2 additions & 8 deletions lib/flipper/types/actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ def respond_to?(*args)
super || @actor.respond_to?(*args)
end

if RUBY_VERSION >= '3.0'
def method_missing(name, *args, **kwargs, &block)
@actor.send name, *args, **kwargs, &block
end
else
def method_missing(name, *args, &block)
@actor.send name, *args, &block
end
def method_missing(name, *args, **kwargs, &block)
@actor.send name, *args, **kwargs, &block
end
end
end
Expand Down
10 changes: 4 additions & 6 deletions spec/flipper/cloud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@
described_class.new(token: 'asdf', open_timeout: 1)
end

if RUBY_VERSION >= '2.6.0'
it 'can set write_timeout' do
expect(Flipper::Adapters::Http::Client).to receive(:new)
.with(hash_including(open_timeout: 1)).at_least(:once)
described_class.new(token: 'asdf', open_timeout: 1)
end
it 'can set write_timeout' do
expect(Flipper::Adapters::Http::Client).to receive(:new)
.with(hash_including(open_timeout: 1)).at_least(:once)
described_class.new(token: 'asdf', open_timeout: 1)
end

it 'can import' do
Expand Down

0 comments on commit 225823c

Please sign in to comment.