lib/quilt_rails/configuration.rb in quilt_rails-3.3.0 vs lib/quilt_rails/configuration.rb in quilt_rails-3.3.1

- old
+ new

@@ -1,16 +1,22 @@ # frozen_string_literal: true -module Quilt - class Configuration - attr_accessor :react_server_host, :react_server_protocol +require "active_support/ordered_options" +module Quilt + class Configuration < ActiveSupport::OrderedOptions def initialize - ip = ENV['REACT_SERVER_IP'] || 'localhost' - port = ENV['REACT_SERVER_PORT'] || 8081 + super + react_server_ip = ENV['REACT_SERVER_IP'] || "localhost" + react_server_port = ENV['REACT_SERVER_PORT'] || 8081 - @react_server_host = "#{ip}:#{port}" - @react_server_protocol = ENV['REACT_SERVER_PROTOCOL'] || 'http' + self.react_server_host = "#{react_server_ip}:#{react_server_port}" + self.react_server_protocol = ENV['REACT_SERVER_PROTOCOL'] || "http" + self.mount = true + end + + def mount? + mount end end def self.configuration @configuration ||= Configuration.new