Sha256: ac3fdd1e0943a6c99ccdddfd2cf134e2ae7fbbeb9f16c0c4302ff41bd9d93e7e

Contents?: true

Size: 382 Bytes

Versions: 10

Compression:

Stored size: 382 Bytes

Contents

require 'eeny-meeny/models/cookie'

module EenyMeeny
  class SmokeTestConstraint

    def initialize(smoke_test_id, version: 1)
      @smoke_test_cookie_name = EenyMeeny::Cookie.smoke_test_name(smoke_test_id, version: version)
    end

    def matches?(request)
      cookie = EenyMeeny::Cookie.read(request.cookie_jar[@smoke_test_cookie_name])
      !cookie.nil?
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
eeny-meeny-2.3.0 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.2.2 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.2.1 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.2.0 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.1.4 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.1.3 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.1.2 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.1.1 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.1.0 lib/eeny-meeny/routing/smoke_test_constraint.rb
eeny-meeny-2.0.0 lib/eeny-meeny/routing/smoke_test_constraint.rb