Sha256: 702591d0313d821be54cbf376698075127a100dc4f7b22b31155cf9ec7452f75

Contents?: true

Size: 545 Bytes

Versions: 13

Compression:

Stored size: 545 Bytes

Contents

module Superstore
  class Railtie < Rails::Railtie
    initializer "superstore.config" do |app|
      ActiveSupport.on_load :superstore do
        pathname = Rails.root.join('config', 'superstore.yml')
        if pathname.exist?
          config = ERB.new(pathname.read).result
          config = YAML.load(config)

          if config = config[Rails.env]
            self.config = config.symbolize_keys!
          else
            raise "Missing environment #{Rails.env} in superstore.yml"
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
superstore-2.4.4 lib/superstore/railtie.rb
superstore-2.4.3 lib/superstore/railtie.rb
superstore-2.4.2 lib/superstore/railtie.rb
superstore-2.4.1 lib/superstore/railtie.rb
superstore-2.4.0 lib/superstore/railtie.rb
superstore-2.3.0 lib/superstore/railtie.rb
superstore-2.2.0 lib/superstore/railtie.rb
superstore-2.1.3 lib/superstore/railtie.rb
superstore-2.1.2 lib/superstore/railtie.rb
superstore-2.1.1 lib/superstore/railtie.rb
superstore-2.1.0 lib/superstore/railtie.rb
superstore-2.0.1 lib/superstore/railtie.rb
superstore-2.0.0 lib/superstore/railtie.rb