Sha256: 91e92a82f6440291fd1216611a32ea24b472b2f84d86a5f4d322213371c8a48c

Contents?: true

Size: 1.18 KB

Versions: 15

Compression:

Stored size: 1.18 KB

Contents

require "saucy"
require "rails"
require "braintree"

module Saucy
  class Engine < Rails::Engine
    config.saucy = Configuration.new

    initializer :braintree_logger, :after => :initialize_logger do
      Braintree::Configuration.logger = Rails.logger
    end

    initializer :filter_credit_card_info do
      Rails.configuration.filter_parameters += [:password,
                                                :card_number,
                                                :cardholder_name,
                                                :verification_code,
                                                :expiration_month,
                                                :expiration_year]
    end

    initializer 'limits.helper' do |app|
      ActionView::Base.send :include, LimitsHelper
    end

    initializer 'static assets' do |app|
      app.middleware.insert_before ::Rack::Lock, ::ActionDispatch::Static, "#{root}/public"
    end

    initializer 'coupons.helper' do |app|
      ActionView::Base.send :include, CouponsHelper
    end

    {:short_date => "%x"}.each do |k, v|
      Time::DATE_FORMATS[k] = v
    end

    rake_tasks do
      load "saucy/railties/tasks.rake"
    end 
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
saucy-0.13.0 lib/saucy/engine.rb
saucy-0.12.5 lib/saucy/engine.rb
saucy-0.12.4 lib/saucy/engine.rb
saucy-0.12.3 lib/saucy/engine.rb
saucy-0.12.2 lib/saucy/engine.rb
saucy-0.12.1 lib/saucy/engine.rb
saucy-0.12.0 lib/saucy/engine.rb
saucy-0.11.5 lib/saucy/engine.rb
saucy-0.11.3 lib/saucy/engine.rb
saucy-0.11.2 lib/saucy/engine.rb
saucy-0.10.7 lib/saucy/engine.rb
saucy-0.10.6 lib/saucy/engine.rb
saucy-0.10.5 lib/saucy/engine.rb
saucy-0.10.4 lib/saucy/engine.rb
saucy-0.10.3 lib/saucy/engine.rb