diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee24287b..74222aafc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 69a2738a2..1793f8b1d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -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: diff --git a/Changelog.md b/Changelog.md index 9e61e0271..f1ce6b3d4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/lib/flipper/adapters/memoizable.rb b/lib/flipper/adapters/memoizable.rb index 8218cb1f4..3f6ae7668 100644 --- a/lib/flipper/adapters/memoizable.rb +++ b/lib/flipper/adapters/memoizable.rb @@ -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 diff --git a/lib/flipper/types/actor.rb b/lib/flipper/types/actor.rb index 4e89b6b39..6aee41135 100644 --- a/lib/flipper/types/actor.rb +++ b/lib/flipper/types/actor.rb @@ -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 diff --git a/spec/flipper/cloud_spec.rb b/spec/flipper/cloud_spec.rb index 14f4665b3..12a3c2049 100644 --- a/spec/flipper/cloud_spec.rb +++ b/spec/flipper/cloud_spec.rb @@ -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