Sha256: 976ab6bacbc1191cb9e88ed08aa513b5c29de4136936805ee437a53de761ab32

Contents?: true

Size: 674 Bytes

Versions: 15

Compression:

Stored size: 674 Bytes

Contents

require 'logger'

module CypressOnRails
  class Configuration
    attr_accessor :cypress_folder
    attr_accessor :use_middleware
    attr_accessor :logger

    def initialize
      reset
    end

    alias :use_middleware? :use_middleware

    def reset
      self.cypress_folder = 'spec/cypress'
      self.use_middleware = true
      self.logger = Logger.new(STDOUT)
    end

    def tagged_logged
      if logger.respond_to?(:tagged)
        logger.tagged('CY_DEV') { yield }
      else
        yield
      end
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration if block_given?
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
cypress-on-rails-1.12.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.12.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.11.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.10.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.9.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.9.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.8.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.8.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.7.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.6.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.5.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.5.0 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.4.2 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.4.1 lib/cypress_on_rails/configuration.rb
cypress-on-rails-1.4.0 lib/cypress_on_rails/configuration.rb