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 9a0da1e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 66 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 Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,8 @@ All notable changes to this project will be documented in this file.

### Breaking Changes

* Removed top level `Flipper.bool`, `Flipper.actors`, `Flipper.time`, `Flipper.actor`, `Flipper.percentage_of_actors`, `Flipper.time`, and `Flipper.percentage_of_time`. Also removed correlated Flipper::DSL instance method. They conflict with some new expression stuff and are rarely if ever used. If you are using them, you can migrate via a search and replace like so:
* Change Flipper.bool => Flipper::Types::Boolean.new
* Change Flipper.boolean => Flipper::Types::Boolean.new
* Change Flipper.actor => Flipper::Types::Actor.new
* Change Flipper.percentage_of_actors => Flipper::Types::PercentageOfActors.new
* Change Flipper.actors => Flipper::Types::PercentageOfActors.new
* Change Flipper.percentage_of_time => Flipper::Types::PercentageOfTime.new
* Change Flipper.time => Flipper::Types::PercentageOfTime.new
* Ruby 2.6 and 2.7 are EOL and no longer supported
* Rails 5.2 and 6.0 are EOL and no longer supported

## 1.0.0

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 9a0da1e

Please sign in to comment.