Sha256: 959da082a7ab266072657b01632e6360240ffaf1fe5b66a7007ffe08e1b8e121

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

# frozen_string_literal: true

require "active_support/ordered_options"

module Quilt
  class Configuration < ActiveSupport::OrderedOptions
    def initialize
      super
      react_server_ip   = ENV["REACT_SERVER_IP"] || "localhost"
      react_server_port = ENV["REACT_SERVER_PORT"] || 8081

      self.react_server_host     = "#{react_server_ip}:#{react_server_port}"
      self.react_server_protocol = ENV["REACT_SERVER_PROTOCOL"] || "http"
      self.logger                = ::Logger.new($stdout)
      self.mount                 = true
      self.allow_integration_test = false
    end

    def mount?
      mount
    end
  end

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

    def configure
      yield(configuration)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
quilt_rails-3.6.0 lib/quilt_rails/configuration.rb
quilt_rails-3.5.6 lib/quilt_rails/configuration.rb