Sha256: c4eee94764533dfc77494be51ca8cde5c8f9c26b90776d5310841d6c4a4c3c4d

Contents?: true

Size: 868 Bytes

Versions: 4

Compression:

Stored size: 868 Bytes

Contents

require 'haml'
require 'bcrypt'
require 'dynamic_form'
require 'kaminari'
require 'ransack'
require 'nifty/utils'
require 'nifty/key_value_store'
require 'nifty/attachments'

module Shoppe
  
  class Error < StandardError; end
  
  class << self
    def root
      File.expand_path('../../', __FILE__)
    end
    
    def config
      @config ||= begin
        path = Rails.root.join('config', 'shoppe.yml')
        if File.exist?(path)
          config = YAML.load_file(path).with_indifferent_access
          setup_config(config)
          config
        else
          $stderr.puts "Shoppe configuration file missing at #{path}"
          {}
        end
      end
    end
    
    def setup_config(config)
      ActionMailer::Base.smtp_settings = config[:smtp_settings] if config[:smtp_settings]
    end
  end
  
end

# Start your engines.
require "shoppe/engine"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shoppe-0.0.8 lib/shoppe.rb
shoppe-0.0.7 lib/shoppe.rb
shoppe-0.0.6 lib/shoppe.rb
shoppe-0.0.5 lib/shoppe.rb