flipper 0.17.2 → 0.20.0.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +27 -1
- data/Dockerfile +1 -1
- data/Gemfile +2 -6
- data/Rakefile +1 -4
- data/docs/Adapters.md +1 -1
- data/docs/DockerCompose.md +0 -1
- data/docs/Gates.md +1 -1
- data/examples/memoizing.rb +39 -0
- data/flipper.gemspec +0 -1
- data/lib/flipper.rb +3 -2
- data/lib/flipper/adapters/dual_write.rb +67 -0
- data/lib/flipper/adapters/operation_logger.rb +5 -0
- data/lib/flipper/adapters/sync.rb +7 -7
- data/lib/flipper/adapters/sync/synchronizer.rb +1 -0
- data/lib/flipper/dsl.rb +8 -0
- data/lib/flipper/feature.rb +2 -2
- data/lib/flipper/middleware/memoizer.rb +1 -1
- data/lib/flipper/middleware/setup_env.rb +13 -3
- data/lib/flipper/test/shared_adapter_test.rb +0 -1
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/adapter_spec.rb +2 -2
- data/spec/flipper/adapters/dual_write_spec.rb +71 -0
- data/spec/flipper/adapters/operation_logger_spec.rb +9 -0
- data/spec/flipper/adapters/sync_spec.rb +4 -4
- data/spec/flipper/feature_spec.rb +5 -5
- data/spec/flipper/middleware/memoizer_spec.rb +1 -1
- data/spec/flipper/middleware/setup_env_spec.rb +39 -3
- data/spec/{integration_spec.rb → flipper_integration_spec.rb} +0 -0
- data/spec/flipper_spec.rb +27 -0
- data/spec/support/descriptions.yml +1 -0
- data/spec/support/spec_helpers.rb +5 -0
- metadata +13 -11
- data/.rubocop.yml +0 -52
- data/.rubocop_todo.yml +0 -562
| @@ -0,0 +1,71 @@ | |
| 1 | 
            +
            require 'helper'
         | 
| 2 | 
            +
            require 'flipper/adapters/dual_write'
         | 
| 3 | 
            +
            require 'flipper/adapters/operation_logger'
         | 
| 4 | 
            +
            require 'flipper/spec/shared_adapter_specs'
         | 
| 5 | 
            +
            require 'active_support/notifications'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            RSpec.describe Flipper::Adapters::DualWrite do
         | 
| 8 | 
            +
              let(:local_adapter) do
         | 
| 9 | 
            +
                Flipper::Adapters::OperationLogger.new Flipper::Adapters::Memory.new
         | 
| 10 | 
            +
              end
         | 
| 11 | 
            +
              let(:remote_adapter) do
         | 
| 12 | 
            +
                Flipper::Adapters::OperationLogger.new Flipper::Adapters::Memory.new
         | 
| 13 | 
            +
              end
         | 
| 14 | 
            +
              let(:local) { Flipper.new(local_adapter) }
         | 
| 15 | 
            +
              let(:remote) { Flipper.new(remote_adapter) }
         | 
| 16 | 
            +
              let(:sync) { Flipper.new(subject) }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
              subject do
         | 
| 19 | 
            +
                described_class.new(local_adapter, remote_adapter)
         | 
| 20 | 
            +
              end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
              it_should_behave_like 'a flipper adapter'
         | 
| 23 | 
            +
             | 
| 24 | 
            +
              it 'only uses local for #features' do
         | 
| 25 | 
            +
                subject.features
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
              it 'only uses local for #get' do
         | 
| 29 | 
            +
                subject.get sync[:search]
         | 
| 30 | 
            +
              end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
              it 'only uses local for #get_multi' do
         | 
| 33 | 
            +
                subject.get_multi [sync[:search]]
         | 
| 34 | 
            +
              end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
              it 'only uses local for #get_all' do
         | 
| 37 | 
            +
                subject.get_all
         | 
| 38 | 
            +
              end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
              it 'updates remote and local for #add' do
         | 
| 41 | 
            +
                subject.add sync[:search]
         | 
| 42 | 
            +
                expect(remote_adapter.count(:add)).to be(1)
         | 
| 43 | 
            +
                expect(local_adapter.count(:add)).to be(1)
         | 
| 44 | 
            +
              end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
              it 'updates remote and local for #remove' do
         | 
| 47 | 
            +
                subject.remove sync[:search]
         | 
| 48 | 
            +
                expect(remote_adapter.count(:remove)).to be(1)
         | 
| 49 | 
            +
                expect(local_adapter.count(:remove)).to be(1)
         | 
| 50 | 
            +
              end
         | 
| 51 | 
            +
             | 
| 52 | 
            +
              it 'updates remote and local for #clear' do
         | 
| 53 | 
            +
                subject.clear sync[:search]
         | 
| 54 | 
            +
                expect(remote_adapter.count(:clear)).to be(1)
         | 
| 55 | 
            +
                expect(local_adapter.count(:clear)).to be(1)
         | 
| 56 | 
            +
              end
         | 
| 57 | 
            +
             | 
| 58 | 
            +
              it 'updates remote and local for #enable' do
         | 
| 59 | 
            +
                feature = sync[:search]
         | 
| 60 | 
            +
                subject.enable feature, feature.gate(:boolean), local.boolean
         | 
| 61 | 
            +
                expect(remote_adapter.count(:enable)).to be(1)
         | 
| 62 | 
            +
                expect(local_adapter.count(:enable)).to be(1)
         | 
| 63 | 
            +
              end
         | 
| 64 | 
            +
             | 
| 65 | 
            +
              it 'updates remote and local for #disable' do
         | 
| 66 | 
            +
                feature = sync[:search]
         | 
| 67 | 
            +
                subject.disable feature, feature.gate(:boolean), local.boolean(false)
         | 
| 68 | 
            +
                expect(remote_adapter.count(:disable)).to be(1)
         | 
| 69 | 
            +
                expect(local_adapter.count(:disable)).to be(1)
         | 
| 70 | 
            +
              end
         | 
| 71 | 
            +
            end
         | 
| @@ -11,6 +11,15 @@ RSpec.describe Flipper::Adapters::OperationLogger do | |
| 11 11 |  | 
| 12 12 | 
             
              it_should_behave_like 'a flipper adapter'
         | 
| 13 13 |  | 
| 14 | 
            +
              it 'shows itself when inspect' do
         | 
| 15 | 
            +
                subject.features
         | 
| 16 | 
            +
                output = subject.inspect
         | 
| 17 | 
            +
                expect(output).to match(/OperationLogger/)
         | 
| 18 | 
            +
                expect(output).to match(/operation_logger/)
         | 
| 19 | 
            +
                expect(output).to match(/@type=:features/)
         | 
| 20 | 
            +
                expect(output).to match(/@adapter=#<Flipper::Adapters::Memory/)
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 14 23 | 
             
              it 'forwards missing methods to underlying adapter' do
         | 
| 15 24 | 
             
                adapter = Class.new do
         | 
| 16 25 | 
             
                  def foo
         | 
| @@ -175,22 +175,22 @@ RSpec.describe Flipper::Adapters::Sync do | |
| 175 175 | 
             
              end
         | 
| 176 176 |  | 
| 177 177 | 
             
              it 'synchronizes for #features' do
         | 
| 178 | 
            -
                expect(subject).to receive(: | 
| 178 | 
            +
                expect(subject).to receive(:synchronize)
         | 
| 179 179 | 
             
                subject.features
         | 
| 180 180 | 
             
              end
         | 
| 181 181 |  | 
| 182 182 | 
             
              it 'synchronizes for #get' do
         | 
| 183 | 
            -
                expect(subject).to receive(: | 
| 183 | 
            +
                expect(subject).to receive(:synchronize)
         | 
| 184 184 | 
             
                subject.get sync[:search]
         | 
| 185 185 | 
             
              end
         | 
| 186 186 |  | 
| 187 187 | 
             
              it 'synchronizes for #get_multi' do
         | 
| 188 | 
            -
                expect(subject).to receive(: | 
| 188 | 
            +
                expect(subject).to receive(:synchronize)
         | 
| 189 189 | 
             
                subject.get_multi [sync[:search]]
         | 
| 190 190 | 
             
              end
         | 
| 191 191 |  | 
| 192 192 | 
             
              it 'synchronizes for #get_all' do
         | 
| 193 | 
            -
                expect(subject).to receive(: | 
| 193 | 
            +
                expect(subject).to receive(:synchronize)
         | 
| 194 194 | 
             
                subject.get_all
         | 
| 195 195 | 
             
              end
         | 
| 196 196 |  | 
| @@ -359,19 +359,19 @@ RSpec.describe Flipper::Feature do | |
| 359 359 | 
             
                  end
         | 
| 360 360 |  | 
| 361 361 | 
             
                  it 'returns :on' do
         | 
| 362 | 
            -
                    expect(subject.state).to be(: | 
| 362 | 
            +
                    expect(subject.state).to be(:conditional)
         | 
| 363 363 | 
             
                  end
         | 
| 364 364 |  | 
| 365 | 
            -
                  it 'returns  | 
| 366 | 
            -
                    expect(subject.on?).to be( | 
| 365 | 
            +
                  it 'returns false for on?' do
         | 
| 366 | 
            +
                    expect(subject.on?).to be(false)
         | 
| 367 367 | 
             
                  end
         | 
| 368 368 |  | 
| 369 369 | 
             
                  it 'returns false for off?' do
         | 
| 370 370 | 
             
                    expect(subject.off?).to be(false)
         | 
| 371 371 | 
             
                  end
         | 
| 372 372 |  | 
| 373 | 
            -
                  it 'returns  | 
| 374 | 
            -
                    expect(subject.conditional?).to be( | 
| 373 | 
            +
                  it 'returns true for conditional?' do
         | 
| 374 | 
            +
                    expect(subject.conditional?).to be(true)
         | 
| 375 375 | 
             
                  end
         | 
| 376 376 | 
             
                end
         | 
| 377 377 |  | 
| @@ -342,7 +342,7 @@ RSpec.describe Flipper::Middleware::Memoizer do | |
| 342 342 | 
             
                it 'eagerly caches known features for duration of request' do
         | 
| 343 343 | 
             
                  memory = Flipper::Adapters::Memory.new
         | 
| 344 344 | 
             
                  logged_memory = Flipper::Adapters::OperationLogger.new(memory)
         | 
| 345 | 
            -
                  cache = ActiveSupport::Cache::DalliStore.new
         | 
| 345 | 
            +
                  cache = ActiveSupport::Cache::DalliStore.new(ENV['MEMCACHED_URL'])
         | 
| 346 346 | 
             
                  cache.clear
         | 
| 347 347 | 
             
                  cached = Flipper::Adapters::ActiveSupportCacheStore.new(logged_memory, cache, expires_in: 10)
         | 
| 348 348 | 
             
                  logged_cached = Flipper::Adapters::OperationLogger.new(cached)
         | 
| @@ -56,21 +56,57 @@ RSpec.describe Flipper::Middleware::SetupEnv do | |
| 56 56 | 
             
                end
         | 
| 57 57 | 
             
              end
         | 
| 58 58 |  | 
| 59 | 
            -
              context 'when flipper instance is  | 
| 59 | 
            +
              context 'when flipper instance or block are nil but env flipper is configured' do
         | 
| 60 60 | 
             
                let(:app) do
         | 
| 61 61 | 
             
                  app = lambda do |env|
         | 
| 62 62 | 
             
                    [200, { 'Content-Type' => 'text/html' }, [env['flipper'].object_id.to_s]]
         | 
| 63 63 | 
             
                  end
         | 
| 64 64 | 
             
                  builder = Rack::Builder.new
         | 
| 65 | 
            -
                  builder.use described_class | 
| 65 | 
            +
                  builder.use described_class
         | 
| 66 66 | 
             
                  builder.run app
         | 
| 67 67 | 
             
                  builder
         | 
| 68 68 | 
             
                end
         | 
| 69 69 |  | 
| 70 | 
            -
                it ' | 
| 70 | 
            +
                it 'can use env flipper' do
         | 
| 71 71 | 
             
                  env_flipper = build_flipper
         | 
| 72 72 | 
             
                  get '/', {}, 'flipper' => env_flipper
         | 
| 73 73 | 
             
                  expect(last_response.body).to eq(env_flipper.object_id.to_s)
         | 
| 74 74 | 
             
                end
         | 
| 75 75 | 
             
              end
         | 
| 76 | 
            +
             | 
| 77 | 
            +
              context 'when flipper instance or block are nil and default Flipper is configured' do
         | 
| 78 | 
            +
                let(:app) do
         | 
| 79 | 
            +
                  Flipper.configure do |config|
         | 
| 80 | 
            +
                    config.default { flipper }
         | 
| 81 | 
            +
                  end
         | 
| 82 | 
            +
                  app = lambda do |env|
         | 
| 83 | 
            +
                    [200, { 'Content-Type' => 'text/html' }, [env['flipper'].object_id.to_s]]
         | 
| 84 | 
            +
                  end
         | 
| 85 | 
            +
                  builder = Rack::Builder.new
         | 
| 86 | 
            +
                  builder.use described_class
         | 
| 87 | 
            +
                  builder.run app
         | 
| 88 | 
            +
                  builder
         | 
| 89 | 
            +
                end
         | 
| 90 | 
            +
             | 
| 91 | 
            +
                it 'can use env flipper' do
         | 
| 92 | 
            +
                  get '/', {}, {}
         | 
| 93 | 
            +
                  expect(last_response.body).to eq(Flipper.object_id.to_s)
         | 
| 94 | 
            +
                end
         | 
| 95 | 
            +
              end
         | 
| 96 | 
            +
             | 
| 97 | 
            +
              context 'when flipper instance or block are nil and default Flipper is NOT configured' do
         | 
| 98 | 
            +
                let(:app) do
         | 
| 99 | 
            +
                  app = lambda do |env|
         | 
| 100 | 
            +
                    [200, { 'Content-Type' => 'text/html' }, [env['flipper'].enabled?(:search)]]
         | 
| 101 | 
            +
                  end
         | 
| 102 | 
            +
                  builder = Rack::Builder.new
         | 
| 103 | 
            +
                  builder.use described_class
         | 
| 104 | 
            +
                  builder.run app
         | 
| 105 | 
            +
                  builder
         | 
| 106 | 
            +
                end
         | 
| 107 | 
            +
             | 
| 108 | 
            +
                it 'can use env flipper' do
         | 
| 109 | 
            +
                  expect { get '/' }.to raise_error(Flipper::DefaultNotSet)
         | 
| 110 | 
            +
                end
         | 
| 111 | 
            +
              end
         | 
| 76 112 | 
             
            end
         | 
| 
            File without changes
         | 
    
        data/spec/flipper_spec.rb
    CHANGED
    
    | @@ -1,4 +1,5 @@ | |
| 1 1 | 
             
            require 'helper'
         | 
| 2 | 
            +
            require 'flipper/cloud'
         | 
| 2 3 |  | 
| 3 4 | 
             
            RSpec.describe Flipper do
         | 
| 4 5 | 
             
              describe '.new' do
         | 
| @@ -215,6 +216,32 @@ RSpec.describe Flipper do | |
| 215 216 | 
             
                it 'delegates memoizing? to instance' do
         | 
| 216 217 | 
             
                  expect(described_class.memoizing?).to eq(described_class.adapter.memoizing?)
         | 
| 217 218 | 
             
                end
         | 
| 219 | 
            +
             | 
| 220 | 
            +
                it 'delegates sync stuff to instance and does nothing' do
         | 
| 221 | 
            +
                  expect(described_class.sync).to be(nil)
         | 
| 222 | 
            +
                  expect(described_class.sync_secret).to be(nil)
         | 
| 223 | 
            +
                end
         | 
| 224 | 
            +
             | 
| 225 | 
            +
                it 'delegates sync stuff to instance for Flipper::Cloud' do
         | 
| 226 | 
            +
                  stub = stub_request(:get, "https://www.flippercloud.io/adapter/features").
         | 
| 227 | 
            +
                    with({
         | 
| 228 | 
            +
                      headers: {
         | 
| 229 | 
            +
                        'Flipper-Cloud-Token'=>'asdf',
         | 
| 230 | 
            +
                      },
         | 
| 231 | 
            +
                    }).to_return(status: 200, body: '{"features": {}}', headers: {})
         | 
| 232 | 
            +
                  cloud_configuration = Flipper::Cloud::Configuration.new({
         | 
| 233 | 
            +
                    token: "asdf",
         | 
| 234 | 
            +
                    sync_secret: "tasty",
         | 
| 235 | 
            +
                    sync_method: :webhook,
         | 
| 236 | 
            +
                  })
         | 
| 237 | 
            +
             | 
| 238 | 
            +
                  described_class.configure do |config|
         | 
| 239 | 
            +
                    config.default { Flipper::Cloud::DSL.new(cloud_configuration) }
         | 
| 240 | 
            +
                  end
         | 
| 241 | 
            +
                  described_class.sync
         | 
| 242 | 
            +
                  expect(described_class.sync_secret).to eq("tasty")
         | 
| 243 | 
            +
                  expect(stub).to have_been_requested
         | 
| 244 | 
            +
                end
         | 
| 218 245 | 
             
              end
         | 
| 219 246 |  | 
| 220 247 | 
             
              describe '.register' do
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            some_awesome_feature: 'Awesome feature description'
         | 
| @@ -1,3 +1,4 @@ | |
| 1 | 
            +
            require 'climate_control'
         | 
| 1 2 | 
             
            require 'json'
         | 
| 2 3 | 
             
            require 'rack/test'
         | 
| 3 4 |  | 
| @@ -56,6 +57,10 @@ module SpecHelpers | |
| 56 57 | 
             
                  'more_info' => api_error_code_reference_url,
         | 
| 57 58 | 
             
                }
         | 
| 58 59 | 
             
              end
         | 
| 60 | 
            +
             | 
| 61 | 
            +
              def with_modified_env(options, &block)
         | 
| 62 | 
            +
                ClimateControl.modify(options, &block)
         | 
| 63 | 
            +
              end
         | 
| 59 64 | 
             
            end
         | 
| 60 65 |  | 
| 61 66 | 
             
            RSpec.configure do |config|
         | 
    
        metadata
    CHANGED
    
    | @@ -1,18 +1,16 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: flipper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.20.0.beta2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - John Nunemaker
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-12-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 | 
            -
            description:  | 
| 14 | 
            -
              ideally without re-deploying or changing anything in your code base. Flipper makes
         | 
| 15 | 
            -
              this extremely easy to do with any backend you would like to use.
         | 
| 13 | 
            +
            description: 
         | 
| 16 14 | 
             
            email:
         | 
| 17 15 | 
             
            - nunemaker@gmail.com
         | 
| 18 16 | 
             
            executables: []
         | 
| @@ -20,8 +18,6 @@ extensions: [] | |
| 20 18 | 
             
            extra_rdoc_files: []
         | 
| 21 19 | 
             
            files:
         | 
| 22 20 | 
             
            - ".codeclimate.yml"
         | 
| 23 | 
            -
            - ".rubocop.yml"
         | 
| 24 | 
            -
            - ".rubocop_todo.yml"
         | 
| 25 21 | 
             
            - CODE_OF_CONDUCT.md
         | 
| 26 22 | 
             
            - Changelog.md
         | 
| 27 23 | 
             
            - Dockerfile
         | 
| @@ -50,6 +46,7 @@ files: | |
| 50 46 | 
             
            - examples/importing.rb
         | 
| 51 47 | 
             
            - examples/individual_actor.rb
         | 
| 52 48 | 
             
            - examples/instrumentation.rb
         | 
| 49 | 
            +
            - examples/memoizing.rb
         | 
| 53 50 | 
             
            - examples/percentage_of_actors.rb
         | 
| 54 51 | 
             
            - examples/percentage_of_actors_enabled_check.rb
         | 
| 55 52 | 
             
            - examples/percentage_of_actors_group.rb
         | 
| @@ -58,6 +55,7 @@ files: | |
| 58 55 | 
             
            - lib/flipper.rb
         | 
| 59 56 | 
             
            - lib/flipper/actor.rb
         | 
| 60 57 | 
             
            - lib/flipper/adapter.rb
         | 
| 58 | 
            +
            - lib/flipper/adapters/dual_write.rb
         | 
| 61 59 | 
             
            - lib/flipper/adapters/http.rb
         | 
| 62 60 | 
             
            - lib/flipper/adapters/http/client.rb
         | 
| 63 61 | 
             
            - lib/flipper/adapters/http/error.rb
         | 
| @@ -107,6 +105,7 @@ files: | |
| 107 105 | 
             
            - spec/fixtures/feature.json
         | 
| 108 106 | 
             
            - spec/flipper/actor_spec.rb
         | 
| 109 107 | 
             
            - spec/flipper/adapter_spec.rb
         | 
| 108 | 
            +
            - spec/flipper/adapters/dual_write_spec.rb
         | 
| 110 109 | 
             
            - spec/flipper/adapters/http_spec.rb
         | 
| 111 110 | 
             
            - spec/flipper/adapters/instrumented_spec.rb
         | 
| 112 111 | 
             
            - spec/flipper/adapters/memoizable_spec.rb
         | 
| @@ -143,9 +142,10 @@ files: | |
| 143 142 | 
             
            - spec/flipper/types/percentage_of_actors_spec.rb
         | 
| 144 143 | 
             
            - spec/flipper/types/percentage_of_time_spec.rb
         | 
| 145 144 | 
             
            - spec/flipper/types/percentage_spec.rb
         | 
| 145 | 
            +
            - spec/flipper_integration_spec.rb
         | 
| 146 146 | 
             
            - spec/flipper_spec.rb
         | 
| 147 147 | 
             
            - spec/helper.rb
         | 
| 148 | 
            -
            - spec/ | 
| 148 | 
            +
            - spec/support/descriptions.yml
         | 
| 149 149 | 
             
            - spec/support/fake_udp_socket.rb
         | 
| 150 150 | 
             
            - spec/support/spec_helpers.rb
         | 
| 151 151 | 
             
            - test/adapters/memory_test.rb
         | 
| @@ -168,9 +168,9 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 168 168 | 
             
                  version: '0'
         | 
| 169 169 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 170 170 | 
             
              requirements:
         | 
| 171 | 
            -
              - - " | 
| 171 | 
            +
              - - ">"
         | 
| 172 172 | 
             
                - !ruby/object:Gem::Version
         | 
| 173 | 
            -
                  version:  | 
| 173 | 
            +
                  version: 1.3.1
         | 
| 174 174 | 
             
            requirements: []
         | 
| 175 175 | 
             
            rubygems_version: 3.0.3
         | 
| 176 176 | 
             
            signing_key: 
         | 
| @@ -180,6 +180,7 @@ test_files: | |
| 180 180 | 
             
            - spec/fixtures/feature.json
         | 
| 181 181 | 
             
            - spec/flipper/actor_spec.rb
         | 
| 182 182 | 
             
            - spec/flipper/adapter_spec.rb
         | 
| 183 | 
            +
            - spec/flipper/adapters/dual_write_spec.rb
         | 
| 183 184 | 
             
            - spec/flipper/adapters/http_spec.rb
         | 
| 184 185 | 
             
            - spec/flipper/adapters/instrumented_spec.rb
         | 
| 185 186 | 
             
            - spec/flipper/adapters/memoizable_spec.rb
         | 
| @@ -216,9 +217,10 @@ test_files: | |
| 216 217 | 
             
            - spec/flipper/types/percentage_of_actors_spec.rb
         | 
| 217 218 | 
             
            - spec/flipper/types/percentage_of_time_spec.rb
         | 
| 218 219 | 
             
            - spec/flipper/types/percentage_spec.rb
         | 
| 220 | 
            +
            - spec/flipper_integration_spec.rb
         | 
| 219 221 | 
             
            - spec/flipper_spec.rb
         | 
| 220 222 | 
             
            - spec/helper.rb
         | 
| 221 | 
            -
            - spec/ | 
| 223 | 
            +
            - spec/support/descriptions.yml
         | 
| 222 224 | 
             
            - spec/support/fake_udp_socket.rb
         | 
| 223 225 | 
             
            - spec/support/spec_helpers.rb
         | 
| 224 226 | 
             
            - test/adapters/memory_test.rb
         | 
    
        data/.rubocop.yml
    DELETED
    
    | @@ -1,52 +0,0 @@ | |
| 1 | 
            -
            # This is the configuration used to check the rubocop source code.
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            require: rubocop-rspec
         | 
| 4 | 
            -
            inherit_from:
         | 
| 5 | 
            -
              - .rubocop_todo.yml
         | 
| 6 | 
            -
             | 
| 7 | 
            -
            AllCops:
         | 
| 8 | 
            -
              Exclude:
         | 
| 9 | 
            -
                - 'docker-compose/**/*'
         | 
| 10 | 
            -
                - 'examples/**/*'
         | 
| 11 | 
            -
                - 'tmp/**/*'
         | 
| 12 | 
            -
                - 'bin/**/*'
         | 
| 13 | 
            -
                - 'vendor/bundle/**/*'
         | 
| 14 | 
            -
              TargetRubyVersion: 2.6
         | 
| 15 | 
            -
            Style/Alias:
         | 
| 16 | 
            -
              Enabled: false
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            Style/Documentation:
         | 
| 19 | 
            -
              Enabled: false
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            Style/Encoding:
         | 
| 22 | 
            -
              Enabled: false
         | 
| 23 | 
            -
             | 
| 24 | 
            -
            Style/NumericLiterals:
         | 
| 25 | 
            -
              Enabled: false
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            Style/StringLiterals:
         | 
| 28 | 
            -
              Enabled: false
         | 
| 29 | 
            -
             | 
| 30 | 
            -
            Style/GuardClause:
         | 
| 31 | 
            -
              Enabled: false
         | 
| 32 | 
            -
             | 
| 33 | 
            -
            Style/IfUnlessModifier:
         | 
| 34 | 
            -
              Enabled: false
         | 
| 35 | 
            -
             | 
| 36 | 
            -
            Layout/LineLength:
         | 
| 37 | 
            -
              Max: 100
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            Style/RegexpLiteral:
         | 
| 40 | 
            -
              EnforcedStyle: mixed
         | 
| 41 | 
            -
             | 
| 42 | 
            -
            Style/TrailingCommaInArrayLiteral:
         | 
| 43 | 
            -
              EnforcedStyleForMultiline: consistent_comma
         | 
| 44 | 
            -
             | 
| 45 | 
            -
            Style/TrailingCommaInHashLiteral:
         | 
| 46 | 
            -
              EnforcedStyleForMultiline: consistent_comma
         | 
| 47 | 
            -
             | 
| 48 | 
            -
            RSpec/InstanceVariable:
         | 
| 49 | 
            -
              Enabled: false
         | 
| 50 | 
            -
             | 
| 51 | 
            -
            Lint/SuppressedException:
         | 
| 52 | 
            -
              Enabled: false
         | 
    
        data/.rubocop_todo.yml
    DELETED
    
    | @@ -1,562 +0,0 @@ | |
| 1 | 
            -
            # This configuration was generated by
         | 
| 2 | 
            -
            # `rubocop --auto-gen-config`
         | 
| 3 | 
            -
            # on 2019-09-13 08:34:35 -0400 using RuboCop version 0.74.0.
         | 
| 4 | 
            -
            # The point is for the user to remove these configuration records
         | 
| 5 | 
            -
            # one by one as the offenses are removed from the code base.
         | 
| 6 | 
            -
            # Note that changes in the inspected code, or installation of new
         | 
| 7 | 
            -
            # versions of RuboCop, may require this file to be generated again.
         | 
| 8 | 
            -
             | 
| 9 | 
            -
            # Offense count: 6
         | 
| 10 | 
            -
            # Cop supports --auto-correct.
         | 
| 11 | 
            -
            # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
         | 
| 12 | 
            -
            # Include: **/*.gemfile, **/Gemfile, **/gems.rb
         | 
| 13 | 
            -
            Bundler/OrderedGems:
         | 
| 14 | 
            -
              Exclude:
         | 
| 15 | 
            -
                - 'Gemfile'
         | 
| 16 | 
            -
             | 
| 17 | 
            -
            # Offense count: 6
         | 
| 18 | 
            -
            # Cop supports --auto-correct.
         | 
| 19 | 
            -
            # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
         | 
| 20 | 
            -
            # Include: **/*.gemspec
         | 
| 21 | 
            -
            Gemspec/OrderedDependencies:
         | 
| 22 | 
            -
              Exclude:
         | 
| 23 | 
            -
                - 'flipper-active_record.gemspec'
         | 
| 24 | 
            -
                - 'flipper-active_support_cache_store.gemspec'
         | 
| 25 | 
            -
                - 'flipper-api.gemspec'
         | 
| 26 | 
            -
                - 'flipper-dalli.gemspec'
         | 
| 27 | 
            -
                - 'flipper-ui.gemspec'
         | 
| 28 | 
            -
             | 
| 29 | 
            -
            # Offense count: 4
         | 
| 30 | 
            -
            # Cop supports --auto-correct.
         | 
| 31 | 
            -
            # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
         | 
| 32 | 
            -
            # SupportedHashRocketStyles: key, separator, table
         | 
| 33 | 
            -
            # SupportedColonStyles: key, separator, table
         | 
| 34 | 
            -
            # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
         | 
| 35 | 
            -
            Layout/HashAlignment:
         | 
| 36 | 
            -
              Exclude:
         | 
| 37 | 
            -
                - 'lib/flipper/typecast.rb'
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            # Offense count: 1
         | 
| 40 | 
            -
            # Cop supports --auto-correct.
         | 
| 41 | 
            -
            Layout/ClosingHeredocIndentation:
         | 
| 42 | 
            -
              Exclude:
         | 
| 43 | 
            -
                - 'test/generators/flipper/active_record_generator_test.rb'
         | 
| 44 | 
            -
             | 
| 45 | 
            -
            # Offense count: 8
         | 
| 46 | 
            -
            # Cop supports --auto-correct.
         | 
| 47 | 
            -
            Layout/EmptyLineAfterGuardClause:
         | 
| 48 | 
            -
              Exclude:
         | 
| 49 | 
            -
                - 'lib/flipper/adapters/sync/feature_synchronizer.rb'
         | 
| 50 | 
            -
                - 'lib/flipper/api/json_params.rb'
         | 
| 51 | 
            -
                - 'lib/flipper/api/v1/actions/feature.rb'
         | 
| 52 | 
            -
                - 'lib/flipper/type.rb'
         | 
| 53 | 
            -
                - 'lib/flipper/types/actor.rb'
         | 
| 54 | 
            -
                - 'lib/flipper/types/group.rb'
         | 
| 55 | 
            -
                - 'lib/flipper/ui/action.rb'
         | 
| 56 | 
            -
             | 
| 57 | 
            -
            # Offense count: 12
         | 
| 58 | 
            -
            # Cop supports --auto-correct.
         | 
| 59 | 
            -
            Layout/EmptyLineAfterMagicComment:
         | 
| 60 | 
            -
              Exclude:
         | 
| 61 | 
            -
                - 'flipper-active_record.gemspec'
         | 
| 62 | 
            -
                - 'flipper-active_support_cache_store.gemspec'
         | 
| 63 | 
            -
                - 'flipper-api.gemspec'
         | 
| 64 | 
            -
                - 'flipper-cloud.gemspec'
         | 
| 65 | 
            -
                - 'flipper-dalli.gemspec'
         | 
| 66 | 
            -
                - 'flipper-moneta.gemspec'
         | 
| 67 | 
            -
                - 'flipper-mongo.gemspec'
         | 
| 68 | 
            -
                - 'flipper-redis.gemspec'
         | 
| 69 | 
            -
                - 'flipper-rollout.gemspec'
         | 
| 70 | 
            -
                - 'flipper-sequel.gemspec'
         | 
| 71 | 
            -
                - 'flipper-ui.gemspec'
         | 
| 72 | 
            -
                - 'flipper.gemspec'
         | 
| 73 | 
            -
             | 
| 74 | 
            -
            # Offense count: 1
         | 
| 75 | 
            -
            # Cop supports --auto-correct.
         | 
| 76 | 
            -
            Layout/EmptyLinesAroundExceptionHandlingKeywords:
         | 
| 77 | 
            -
              Exclude:
         | 
| 78 | 
            -
                - 'test/adapters/active_record_test.rb'
         | 
| 79 | 
            -
             | 
| 80 | 
            -
            # Offense count: 1
         | 
| 81 | 
            -
            # Cop supports --auto-correct.
         | 
| 82 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 83 | 
            -
            # SupportedStyles: squiggly, active_support, powerpack, unindent
         | 
| 84 | 
            -
            Layout/HeredocIndentation:
         | 
| 85 | 
            -
              Exclude:
         | 
| 86 | 
            -
                - 'test/generators/flipper/active_record_generator_test.rb'
         | 
| 87 | 
            -
             | 
| 88 | 
            -
            # Offense count: 2
         | 
| 89 | 
            -
            # Cop supports --auto-correct.
         | 
| 90 | 
            -
            Layout/RescueEnsureAlignment:
         | 
| 91 | 
            -
              Exclude:
         | 
| 92 | 
            -
                - 'lib/flipper/api/v1/actions/percentage_of_actors_gate.rb'
         | 
| 93 | 
            -
                - 'lib/flipper/api/v1/actions/percentage_of_time_gate.rb'
         | 
| 94 | 
            -
             | 
| 95 | 
            -
            # Offense count: 1
         | 
| 96 | 
            -
            Lint/AmbiguousRegexpLiteral:
         | 
| 97 | 
            -
              Exclude:
         | 
| 98 | 
            -
                - 'lib/flipper/instrumentation/statsd.rb'
         | 
| 99 | 
            -
             | 
| 100 | 
            -
            # Offense count: 6
         | 
| 101 | 
            -
            # Configuration parameters: AllowSafeAssignment.
         | 
| 102 | 
            -
            Lint/AssignmentInCondition:
         | 
| 103 | 
            -
              Exclude:
         | 
| 104 | 
            -
                - 'lib/flipper/adapters/active_record.rb'
         | 
| 105 | 
            -
                - 'lib/flipper/adapters/sequel.rb'
         | 
| 106 | 
            -
                - 'lib/flipper/feature.rb'
         | 
| 107 | 
            -
                - 'lib/flipper/gate_values.rb'
         | 
| 108 | 
            -
             | 
| 109 | 
            -
            # Offense count: 2
         | 
| 110 | 
            -
            Lint/DuplicateMethods:
         | 
| 111 | 
            -
              Exclude:
         | 
| 112 | 
            -
                - 'lib/flipper/ui.rb'
         | 
| 113 | 
            -
                - 'lib/flipper/ui/configuration.rb'
         | 
| 114 | 
            -
             | 
| 115 | 
            -
            # Offense count: 3
         | 
| 116 | 
            -
            # Configuration parameters: MaximumRangeSize.
         | 
| 117 | 
            -
            Lint/MissingCopEnableDirective:
         | 
| 118 | 
            -
              Exclude:
         | 
| 119 | 
            -
                - 'lib/flipper/feature.rb'
         | 
| 120 | 
            -
                - 'lib/flipper/spec/shared_adapter_specs.rb'
         | 
| 121 | 
            -
                - 'lib/flipper/test/shared_adapter_test.rb'
         | 
| 122 | 
            -
             | 
| 123 | 
            -
            # Offense count: 1
         | 
| 124 | 
            -
            # Cop supports --auto-correct.
         | 
| 125 | 
            -
            Lint/ScriptPermission:
         | 
| 126 | 
            -
              Exclude:
         | 
| 127 | 
            -
                - 'Rakefile'
         | 
| 128 | 
            -
             | 
| 129 | 
            -
            # Offense count: 21
         | 
| 130 | 
            -
            Lint/ShadowingOuterLocalVariable:
         | 
| 131 | 
            -
              Exclude:
         | 
| 132 | 
            -
                - 'spec/flipper/api/v1/actions/actors_gate_spec.rb'
         | 
| 133 | 
            -
                - 'spec/flipper/api/v1/actions/percentage_of_actors_gate_spec.rb'
         | 
| 134 | 
            -
                - 'spec/flipper/api/v1/actions/percentage_of_time_gate_spec.rb'
         | 
| 135 | 
            -
                - 'spec/flipper/dsl_spec.rb'
         | 
| 136 | 
            -
                - 'spec/flipper/feature_spec.rb'
         | 
| 137 | 
            -
                - 'spec/flipper/types/group_spec.rb'
         | 
| 138 | 
            -
             | 
| 139 | 
            -
            # Offense count: 2
         | 
| 140 | 
            -
            # Cop supports --auto-correct.
         | 
| 141 | 
            -
            Lint/RedundantCopDisableDirective:
         | 
| 142 | 
            -
              Exclude:
         | 
| 143 | 
            -
                - 'spec/flipper/adapter_spec.rb'
         | 
| 144 | 
            -
             | 
| 145 | 
            -
            # Offense count: 1
         | 
| 146 | 
            -
            # Cop supports --auto-correct.
         | 
| 147 | 
            -
            Lint/RedundantRequireStatement:
         | 
| 148 | 
            -
              Exclude:
         | 
| 149 | 
            -
                - 'lib/flipper/registry.rb'
         | 
| 150 | 
            -
             | 
| 151 | 
            -
            # Offense count: 27
         | 
| 152 | 
            -
            Lint/UselessAssignment:
         | 
| 153 | 
            -
              Exclude:
         | 
| 154 | 
            -
                - 'lib/flipper/instrumentation/log_subscriber.rb'
         | 
| 155 | 
            -
                - 'lib/flipper/instrumentation/subscriber.rb'
         | 
| 156 | 
            -
                - 'spec/flipper/api/action_spec.rb'
         | 
| 157 | 
            -
                - 'spec/flipper/dsl_spec.rb'
         | 
| 158 | 
            -
                - 'spec/flipper/feature_spec.rb'
         | 
| 159 | 
            -
                - 'spec/flipper/gates/group_spec.rb'
         | 
| 160 | 
            -
                - 'spec/flipper/instrumentation/statsd_subscriber_spec.rb'
         | 
| 161 | 
            -
                - 'spec/flipper/middleware/memoizer_spec.rb'
         | 
| 162 | 
            -
                - 'spec/flipper_spec.rb'
         | 
| 163 | 
            -
             | 
| 164 | 
            -
            # Offense count: 35
         | 
| 165 | 
            -
            Metrics/AbcSize:
         | 
| 166 | 
            -
              Max: 29
         | 
| 167 | 
            -
             | 
| 168 | 
            -
            # Offense count: 136
         | 
| 169 | 
            -
            # Configuration parameters: CountComments, ExcludedMethods.
         | 
| 170 | 
            -
            # ExcludedMethods: refine
         | 
| 171 | 
            -
            Metrics/BlockLength:
         | 
| 172 | 
            -
              Max: 683
         | 
| 173 | 
            -
             | 
| 174 | 
            -
            # Offense count: 11
         | 
| 175 | 
            -
            # Configuration parameters: CountComments.
         | 
| 176 | 
            -
            Metrics/ClassLength:
         | 
| 177 | 
            -
              Max: 160
         | 
| 178 | 
            -
             | 
| 179 | 
            -
            # Offense count: 20
         | 
| 180 | 
            -
            # Cop supports --auto-correct.
         | 
| 181 | 
            -
            # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
         | 
| 182 | 
            -
            # URISchemes: http, https
         | 
| 183 | 
            -
            Layout/LineLength:
         | 
| 184 | 
            -
              Max: 251
         | 
| 185 | 
            -
             | 
| 186 | 
            -
            # Offense count: 59
         | 
| 187 | 
            -
            # Configuration parameters: CountComments, ExcludedMethods.
         | 
| 188 | 
            -
            Metrics/MethodLength:
         | 
| 189 | 
            -
              Max: 23
         | 
| 190 | 
            -
             | 
| 191 | 
            -
            # Offense count: 18
         | 
| 192 | 
            -
            Naming/AccessorMethodName:
         | 
| 193 | 
            -
              Enabled: false
         | 
| 194 | 
            -
             | 
| 195 | 
            -
            # Offense count: 25
         | 
| 196 | 
            -
            Naming/ConstantName:
         | 
| 197 | 
            -
              Exclude:
         | 
| 198 | 
            -
                - 'lib/flipper.rb'
         | 
| 199 | 
            -
                - 'lib/flipper/adapters/active_support_cache_store.rb'
         | 
| 200 | 
            -
                - 'lib/flipper/adapters/dalli.rb'
         | 
| 201 | 
            -
                - 'lib/flipper/adapters/instrumented.rb'
         | 
| 202 | 
            -
                - 'lib/flipper/adapters/memoizable.rb'
         | 
| 203 | 
            -
                - 'lib/flipper/adapters/memory.rb'
         | 
| 204 | 
            -
                - 'lib/flipper/adapters/mongo.rb'
         | 
| 205 | 
            -
                - 'lib/flipper/adapters/operation_logger.rb'
         | 
| 206 | 
            -
                - 'lib/flipper/adapters/pstore.rb'
         | 
| 207 | 
            -
                - 'lib/flipper/adapters/redis.rb'
         | 
| 208 | 
            -
                - 'lib/flipper/adapters/redis_cache.rb'
         | 
| 209 | 
            -
                - 'lib/flipper/feature.rb'
         | 
| 210 | 
            -
                - 'lib/flipper/gate_values.rb'
         | 
| 211 | 
            -
                - 'lib/flipper/typecast.rb'
         | 
| 212 | 
            -
                - 'lib/flipper/ui/decorators/feature.rb'
         | 
| 213 | 
            -
             | 
| 214 | 
            -
            # Offense count: 9
         | 
| 215 | 
            -
            # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
         | 
| 216 | 
            -
            # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
         | 
| 217 | 
            -
            Naming/FileName:
         | 
| 218 | 
            -
              Exclude:
         | 
| 219 | 
            -
                - 'lib/flipper-active_record.rb'
         | 
| 220 | 
            -
                - 'lib/flipper-active_support_cache_store.rb'
         | 
| 221 | 
            -
                - 'lib/flipper-api.rb'
         | 
| 222 | 
            -
                - 'lib/flipper-cloud.rb'
         | 
| 223 | 
            -
                - 'lib/flipper-dalli.rb'
         | 
| 224 | 
            -
                - 'lib/flipper-mongo.rb'
         | 
| 225 | 
            -
                - 'lib/flipper-redis.rb'
         | 
| 226 | 
            -
                - 'lib/flipper-sequel.rb'
         | 
| 227 | 
            -
                - 'lib/flipper-ui.rb'
         | 
| 228 | 
            -
             | 
| 229 | 
            -
            # Offense count: 1
         | 
| 230 | 
            -
            # Configuration parameters: Blacklist.
         | 
| 231 | 
            -
            # Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
         | 
| 232 | 
            -
            Naming/HeredocDelimiterNaming:
         | 
| 233 | 
            -
              Exclude:
         | 
| 234 | 
            -
                - 'test/generators/flipper/active_record_generator_test.rb'
         | 
| 235 | 
            -
             | 
| 236 | 
            -
            # Offense count: 4
         | 
| 237 | 
            -
            # Cop supports --auto-correct.
         | 
| 238 | 
            -
            # Configuration parameters: PreferredName.
         | 
| 239 | 
            -
            Naming/RescuedExceptionsVariableName:
         | 
| 240 | 
            -
              Exclude:
         | 
| 241 | 
            -
                - 'lib/flipper/adapters/active_record.rb'
         | 
| 242 | 
            -
                - 'lib/flipper/adapters/sync/synchronizer.rb'
         | 
| 243 | 
            -
                - 'lib/flipper/ui/actions/percentage_of_actors_gate.rb'
         | 
| 244 | 
            -
                - 'lib/flipper/ui/actions/percentage_of_time_gate.rb'
         | 
| 245 | 
            -
             | 
| 246 | 
            -
            # Offense count: 3
         | 
| 247 | 
            -
            RSpec/BeforeAfterAll:
         | 
| 248 | 
            -
              Exclude:
         | 
| 249 | 
            -
                - 'spec/spec_helper.rb'
         | 
| 250 | 
            -
                - 'spec/rails_helper.rb'
         | 
| 251 | 
            -
                - 'spec/support/**/*.rb'
         | 
| 252 | 
            -
                - 'spec/flipper/adapters/active_record_spec.rb'
         | 
| 253 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 254 | 
            -
             | 
| 255 | 
            -
            # Offense count: 76
         | 
| 256 | 
            -
            # Configuration parameters: Prefixes.
         | 
| 257 | 
            -
            # Prefixes: when, with, without
         | 
| 258 | 
            -
            RSpec/ContextWording:
         | 
| 259 | 
            -
              Enabled: false
         | 
| 260 | 
            -
             | 
| 261 | 
            -
            # Offense count: 1
         | 
| 262 | 
            -
            # Configuration parameters: CustomIncludeMethods.
         | 
| 263 | 
            -
            RSpec/EmptyExampleGroup:
         | 
| 264 | 
            -
              Exclude:
         | 
| 265 | 
            -
                - 'spec/flipper/gates/actor_spec.rb'
         | 
| 266 | 
            -
             | 
| 267 | 
            -
            # Offense count: 3
         | 
| 268 | 
            -
            # Cop supports --auto-correct.
         | 
| 269 | 
            -
            RSpec/EmptyLineAfterFinalLet:
         | 
| 270 | 
            -
              Exclude:
         | 
| 271 | 
            -
                - 'spec/flipper/adapters/moneta_spec.rb'
         | 
| 272 | 
            -
                - 'spec/flipper/ui/actions/features_spec.rb'
         | 
| 273 | 
            -
             | 
| 274 | 
            -
            # Offense count: 2
         | 
| 275 | 
            -
            # Cop supports --auto-correct.
         | 
| 276 | 
            -
            RSpec/EmptyLineAfterSubject:
         | 
| 277 | 
            -
              Exclude:
         | 
| 278 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 279 | 
            -
                - 'spec/flipper/types/percentage_spec.rb'
         | 
| 280 | 
            -
             | 
| 281 | 
            -
            # Offense count: 138
         | 
| 282 | 
            -
            # Configuration parameters: Max.
         | 
| 283 | 
            -
            RSpec/ExampleLength:
         | 
| 284 | 
            -
              Enabled: false
         | 
| 285 | 
            -
             | 
| 286 | 
            -
            # Offense count: 1
         | 
| 287 | 
            -
            # Configuration parameters: CustomTransform, IgnoreMethods.
         | 
| 288 | 
            -
            RSpec/FilePath:
         | 
| 289 | 
            -
              Exclude:
         | 
| 290 | 
            -
                - 'spec/flipper/adapters/pstore_spec.rb'
         | 
| 291 | 
            -
             | 
| 292 | 
            -
            # Offense count: 6
         | 
| 293 | 
            -
            # Cop supports --auto-correct.
         | 
| 294 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 295 | 
            -
            # SupportedStyles: implicit, each, example
         | 
| 296 | 
            -
            RSpec/HookArgument:
         | 
| 297 | 
            -
              Exclude:
         | 
| 298 | 
            -
                - 'spec/flipper/adapters/active_record_spec.rb'
         | 
| 299 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 300 | 
            -
                - 'spec/flipper/adapters/sequel_spec.rb'
         | 
| 301 | 
            -
                - 'spec/helper.rb'
         | 
| 302 | 
            -
             | 
| 303 | 
            -
            # Offense count: 4
         | 
| 304 | 
            -
            # Cop supports --auto-correct.
         | 
| 305 | 
            -
            RSpec/HooksBeforeExamples:
         | 
| 306 | 
            -
              Exclude:
         | 
| 307 | 
            -
                - 'spec/flipper/ui_spec.rb'
         | 
| 308 | 
            -
             | 
| 309 | 
            -
            # Offense count: 22
         | 
| 310 | 
            -
            # Cop supports --auto-correct.
         | 
| 311 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 312 | 
            -
            # SupportedStyles: it_behaves_like, it_should_behave_like
         | 
| 313 | 
            -
            RSpec/ItBehavesLike:
         | 
| 314 | 
            -
              Enabled: false
         | 
| 315 | 
            -
             | 
| 316 | 
            -
            # Offense count: 4
         | 
| 317 | 
            -
            RSpec/IteratedExpectation:
         | 
| 318 | 
            -
              Exclude:
         | 
| 319 | 
            -
                - 'spec/flipper/dsl_spec.rb'
         | 
| 320 | 
            -
                - 'spec/flipper/feature_spec.rb'
         | 
| 321 | 
            -
                - 'spec/flipper/gates/percentage_of_actors_spec.rb'
         | 
| 322 | 
            -
                - 'spec/flipper/registry_spec.rb'
         | 
| 323 | 
            -
             | 
| 324 | 
            -
            # Offense count: 26
         | 
| 325 | 
            -
            # Cop supports --auto-correct.
         | 
| 326 | 
            -
            RSpec/LeadingSubject:
         | 
| 327 | 
            -
              Enabled: false
         | 
| 328 | 
            -
             | 
| 329 | 
            -
            # Offense count: 17
         | 
| 330 | 
            -
            # Configuration parameters: .
         | 
| 331 | 
            -
            # SupportedStyles: have_received, receive
         | 
| 332 | 
            -
            RSpec/MessageSpies:
         | 
| 333 | 
            -
              EnforcedStyle: receive
         | 
| 334 | 
            -
             | 
| 335 | 
            -
            # Offense count: 233
         | 
| 336 | 
            -
            # Configuration parameters: AggregateFailuresByDefault.
         | 
| 337 | 
            -
            RSpec/MultipleExpectations:
         | 
| 338 | 
            -
              Max: 20
         | 
| 339 | 
            -
             | 
| 340 | 
            -
            # Offense count: 449
         | 
| 341 | 
            -
            # Configuration parameters: IgnoreSharedExamples.
         | 
| 342 | 
            -
            RSpec/NamedSubject:
         | 
| 343 | 
            -
              Enabled: false
         | 
| 344 | 
            -
             | 
| 345 | 
            -
            # Offense count: 25
         | 
| 346 | 
            -
            RSpec/NestedGroups:
         | 
| 347 | 
            -
              Max: 5
         | 
| 348 | 
            -
             | 
| 349 | 
            -
            # Offense count: 19
         | 
| 350 | 
            -
            # Cop supports --auto-correct.
         | 
| 351 | 
            -
            # Configuration parameters: Strict, EnforcedStyle.
         | 
| 352 | 
            -
            # SupportedStyles: inflected, explicit
         | 
| 353 | 
            -
            RSpec/PredicateMatcher:
         | 
| 354 | 
            -
              Exclude:
         | 
| 355 | 
            -
                - 'spec/flipper/api/v1/actions/actors_gate_spec.rb'
         | 
| 356 | 
            -
                - 'spec/flipper/api/v1/actions/boolean_gate_spec.rb'
         | 
| 357 | 
            -
                - 'spec/flipper/api/v1/actions/clear_feature_spec.rb'
         | 
| 358 | 
            -
                - 'spec/flipper/api/v1/actions/features_spec.rb'
         | 
| 359 | 
            -
                - 'spec/flipper/api/v1/actions/groups_gate_spec.rb'
         | 
| 360 | 
            -
                - 'spec/flipper/types/group_spec.rb'
         | 
| 361 | 
            -
             | 
| 362 | 
            -
            # Offense count: 1
         | 
| 363 | 
            -
            # Cop supports --auto-correct.
         | 
| 364 | 
            -
            RSpec/ReceiveNever:
         | 
| 365 | 
            -
              Exclude:
         | 
| 366 | 
            -
                - 'spec/flipper/middleware/memoizer_spec.rb'
         | 
| 367 | 
            -
             | 
| 368 | 
            -
            # Offense count: 2
         | 
| 369 | 
            -
            RSpec/RepeatedDescription:
         | 
| 370 | 
            -
              Exclude:
         | 
| 371 | 
            -
                - 'spec/flipper/gates/boolean_spec.rb'
         | 
| 372 | 
            -
             | 
| 373 | 
            -
            # Offense count: 4
         | 
| 374 | 
            -
            RSpec/RepeatedExample:
         | 
| 375 | 
            -
              Exclude:
         | 
| 376 | 
            -
                - 'spec/flipper/cloud_spec.rb'
         | 
| 377 | 
            -
                - 'spec/integration_spec.rb'
         | 
| 378 | 
            -
             | 
| 379 | 
            -
            # Offense count: 2
         | 
| 380 | 
            -
            RSpec/ScatteredLet:
         | 
| 381 | 
            -
              Exclude:
         | 
| 382 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 383 | 
            -
                - 'spec/flipper/instrumentation/log_subscriber_spec.rb'
         | 
| 384 | 
            -
             | 
| 385 | 
            -
            # Offense count: 4
         | 
| 386 | 
            -
            RSpec/SubjectStub:
         | 
| 387 | 
            -
              Exclude:
         | 
| 388 | 
            -
                - 'spec/flipper/adapters/sync_spec.rb'
         | 
| 389 | 
            -
             | 
| 390 | 
            -
            # Offense count: 17
         | 
| 391 | 
            -
            # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
         | 
| 392 | 
            -
            RSpec/VerifiedDoubles:
         | 
| 393 | 
            -
              Exclude:
         | 
| 394 | 
            -
                - 'spec/flipper/api/v1/actions/features_spec.rb'
         | 
| 395 | 
            -
                - 'spec/flipper/dsl_spec.rb'
         | 
| 396 | 
            -
                - 'spec/flipper/feature_spec.rb'
         | 
| 397 | 
            -
                - 'spec/flipper/types/group_spec.rb'
         | 
| 398 | 
            -
                - 'spec/flipper_spec.rb'
         | 
| 399 | 
            -
                - 'spec/integration_spec.rb'
         | 
| 400 | 
            -
             | 
| 401 | 
            -
            # Offense count: 1
         | 
| 402 | 
            -
            Security/Eval:
         | 
| 403 | 
            -
              Exclude:
         | 
| 404 | 
            -
                - 'flipper.gemspec'
         | 
| 405 | 
            -
             | 
| 406 | 
            -
            # Offense count: 5
         | 
| 407 | 
            -
            Security/MarshalLoad:
         | 
| 408 | 
            -
              Exclude:
         | 
| 409 | 
            -
                - 'lib/flipper/adapters/redis_cache.rb'
         | 
| 410 | 
            -
                - 'spec/flipper/adapters/redis_cache_spec.rb'
         | 
| 411 | 
            -
             | 
| 412 | 
            -
            # Offense count: 2
         | 
| 413 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 414 | 
            -
            # SupportedStyles: inline, group
         | 
| 415 | 
            -
            Style/AccessModifierDeclarations:
         | 
| 416 | 
            -
              Exclude:
         | 
| 417 | 
            -
                - 'lib/flipper/api/action.rb'
         | 
| 418 | 
            -
                - 'lib/flipper/ui/action.rb'
         | 
| 419 | 
            -
             | 
| 420 | 
            -
            # Offense count: 3
         | 
| 421 | 
            -
            Style/DoubleNegation:
         | 
| 422 | 
            -
              Exclude:
         | 
| 423 | 
            -
                - 'lib/flipper/adapters/memoizable.rb'
         | 
| 424 | 
            -
                - 'lib/flipper/gates/boolean.rb'
         | 
| 425 | 
            -
                - 'lib/flipper/typecast.rb'
         | 
| 426 | 
            -
             | 
| 427 | 
            -
            # Offense count: 1
         | 
| 428 | 
            -
            # Cop supports --auto-correct.
         | 
| 429 | 
            -
            Style/EmptyLambdaParameter:
         | 
| 430 | 
            -
              Exclude:
         | 
| 431 | 
            -
                - 'lib/flipper/ui.rb'
         | 
| 432 | 
            -
             | 
| 433 | 
            -
            # Offense count: 1
         | 
| 434 | 
            -
            # Cop supports --auto-correct.
         | 
| 435 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 436 | 
            -
            # SupportedStyles: compact, expanded
         | 
| 437 | 
            -
            Style/EmptyMethod:
         | 
| 438 | 
            -
              Exclude:
         | 
| 439 | 
            -
                - 'lib/flipper/gate.rb'
         | 
| 440 | 
            -
             | 
| 441 | 
            -
            # Offense count: 27
         | 
| 442 | 
            -
            # Cop supports --auto-correct.
         | 
| 443 | 
            -
            Style/ExpandPathArguments:
         | 
| 444 | 
            -
              Enabled: false
         | 
| 445 | 
            -
             | 
| 446 | 
            -
            # Offense count: 2
         | 
| 447 | 
            -
            # Cop supports --auto-correct.
         | 
| 448 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 449 | 
            -
            # SupportedStyles: format, sprintf, percent
         | 
| 450 | 
            -
            Style/FormatString:
         | 
| 451 | 
            -
              Exclude:
         | 
| 452 | 
            -
                - 'lib/flipper/instrumentation/log_subscriber.rb'
         | 
| 453 | 
            -
             | 
| 454 | 
            -
            # Offense count: 2
         | 
| 455 | 
            -
            # Configuration parameters: .
         | 
| 456 | 
            -
            # SupportedStyles: annotated, template, unannotated
         | 
| 457 | 
            -
            Style/FormatStringToken:
         | 
| 458 | 
            -
              EnforcedStyle: unannotated
         | 
| 459 | 
            -
             | 
| 460 | 
            -
            # Offense count: 219
         | 
| 461 | 
            -
            # Cop supports --auto-correct.
         | 
| 462 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 463 | 
            -
            # SupportedStyles: always, never
         | 
| 464 | 
            -
            Style/FrozenStringLiteralComment:
         | 
| 465 | 
            -
              Enabled: false
         | 
| 466 | 
            -
             | 
| 467 | 
            -
            # Offense count: 1
         | 
| 468 | 
            -
            # Configuration parameters: AllowIfModifier.
         | 
| 469 | 
            -
            Style/IfInsideElse:
         | 
| 470 | 
            -
              Exclude:
         | 
| 471 | 
            -
                - 'lib/flipper/gates/actor.rb'
         | 
| 472 | 
            -
             | 
| 473 | 
            -
            # Offense count: 1
         | 
| 474 | 
            -
            Style/MethodMissingSuper:
         | 
| 475 | 
            -
              Exclude:
         | 
| 476 | 
            -
                - 'lib/flipper/types/actor.rb'
         | 
| 477 | 
            -
             | 
| 478 | 
            -
            # Offense count: 1
         | 
| 479 | 
            -
            Style/MissingRespondToMissing:
         | 
| 480 | 
            -
              Exclude:
         | 
| 481 | 
            -
                - 'lib/flipper/types/actor.rb'
         | 
| 482 | 
            -
             | 
| 483 | 
            -
            # Offense count: 1
         | 
| 484 | 
            -
            # Cop supports --auto-correct.
         | 
| 485 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 486 | 
            -
            # SupportedStyles: literals, strict
         | 
| 487 | 
            -
            Style/MutableConstant:
         | 
| 488 | 
            -
              Exclude:
         | 
| 489 | 
            -
                - 'lib/flipper/ui/util.rb'
         | 
| 490 | 
            -
             | 
| 491 | 
            -
            # Offense count: 5
         | 
| 492 | 
            -
            # Cop supports --auto-correct.
         | 
| 493 | 
            -
            # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
         | 
| 494 | 
            -
            # SupportedStyles: predicate, comparison
         | 
| 495 | 
            -
            Style/NumericPredicate:
         | 
| 496 | 
            -
              Exclude:
         | 
| 497 | 
            -
                - 'spec/**/*'
         | 
| 498 | 
            -
                - 'lib/flipper/api/v1/actions/percentage_of_actors_gate.rb'
         | 
| 499 | 
            -
                - 'lib/flipper/api/v1/actions/percentage_of_time_gate.rb'
         | 
| 500 | 
            -
                - 'lib/flipper/gates/percentage_of_actors.rb'
         | 
| 501 | 
            -
                - 'lib/flipper/gates/percentage_of_time.rb'
         | 
| 502 | 
            -
                - 'lib/flipper/types/percentage.rb'
         | 
| 503 | 
            -
             | 
| 504 | 
            -
            # Offense count: 34
         | 
| 505 | 
            -
            # Cop supports --auto-correct.
         | 
| 506 | 
            -
            # Configuration parameters: PreferredDelimiters.
         | 
| 507 | 
            -
            Style/PercentLiteralDelimiters:
         | 
| 508 | 
            -
              Exclude:
         | 
| 509 | 
            -
                - 'Rakefile'
         | 
| 510 | 
            -
                - 'lib/flipper/spec/shared_adapter_specs.rb'
         | 
| 511 | 
            -
                - 'lib/flipper/test/shared_adapter_test.rb'
         | 
| 512 | 
            -
                - 'lib/flipper/ui.rb'
         | 
| 513 | 
            -
                - 'lib/flipper/ui/configuration.rb'
         | 
| 514 | 
            -
                - 'spec/flipper/adapter_spec.rb'
         | 
| 515 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 516 | 
            -
                - 'spec/flipper/adapters/memoizable_spec.rb'
         | 
| 517 | 
            -
                - 'spec/flipper/adapters/sync/synchronizer_spec.rb'
         | 
| 518 | 
            -
                - 'spec/flipper/adapters/sync_spec.rb'
         | 
| 519 | 
            -
                - 'spec/flipper/api/v1/actions/features_spec.rb'
         | 
| 520 | 
            -
                - 'spec/flipper/api_spec.rb'
         | 
| 521 | 
            -
                - 'spec/flipper/dsl_spec.rb'
         | 
| 522 | 
            -
                - 'spec/flipper/middleware/memoizer_spec.rb'
         | 
| 523 | 
            -
                - 'spec/flipper/registry_spec.rb'
         | 
| 524 | 
            -
             | 
| 525 | 
            -
            # Offense count: 3
         | 
| 526 | 
            -
            # Cop supports --auto-correct.
         | 
| 527 | 
            -
            Style/RedundantBegin:
         | 
| 528 | 
            -
              Exclude:
         | 
| 529 | 
            -
                - 'spec/flipper/middleware/memoizer_spec.rb'
         | 
| 530 | 
            -
                - 'spec/flipper/ui/actions/feature_spec.rb'
         | 
| 531 | 
            -
                - 'spec/flipper/ui_spec.rb'
         | 
| 532 | 
            -
             | 
| 533 | 
            -
            # Offense count: 2
         | 
| 534 | 
            -
            # Cop supports --auto-correct.
         | 
| 535 | 
            -
            # Configuration parameters: EnforcedStyle.
         | 
| 536 | 
            -
            # SupportedStyles: implicit, explicit
         | 
| 537 | 
            -
            Style/RescueStandardError:
         | 
| 538 | 
            -
              Exclude:
         | 
| 539 | 
            -
                - 'lib/flipper/adapters/sync/synchronizer.rb'
         | 
| 540 | 
            -
                - 'spec/flipper/middleware/memoizer_spec.rb'
         | 
| 541 | 
            -
             | 
| 542 | 
            -
            # Offense count: 4
         | 
| 543 | 
            -
            # Cop supports --auto-correct.
         | 
| 544 | 
            -
            # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
         | 
| 545 | 
            -
            # Whitelist: present?, blank?, presence, try, try!
         | 
| 546 | 
            -
            Style/SafeNavigation:
         | 
| 547 | 
            -
              Exclude:
         | 
| 548 | 
            -
                - 'lib/flipper/instrumentation/statsd_subscriber.rb'
         | 
| 549 | 
            -
                - 'lib/flipper/middleware/memoizer.rb'
         | 
| 550 | 
            -
                - 'spec/flipper/adapters/http_spec.rb'
         | 
| 551 | 
            -
             | 
| 552 | 
            -
            # Offense count: 8
         | 
| 553 | 
            -
            # Cop supports --auto-correct.
         | 
| 554 | 
            -
            # Configuration parameters: EnforcedStyle, MinSize.
         | 
| 555 | 
            -
            # SupportedStyles: percent, brackets
         | 
| 556 | 
            -
            Style/SymbolArray:
         | 
| 557 | 
            -
              Exclude:
         | 
| 558 | 
            -
                - 'Rakefile'
         | 
| 559 | 
            -
                - 'lib/flipper/adapters/operation_logger.rb'
         | 
| 560 | 
            -
                - 'lib/generators/flipper/templates/sequel_migration.rb'
         | 
| 561 | 
            -
                - 'spec/flipper/adapters/rollout_spec.rb'
         | 
| 562 | 
            -
                - 'spec/flipper/gate_values_spec.rb'
         |