Sha256: ec8c14687e1f4f3eedcedd044c6122d85b373b7f923491882bcbaa14c1b03965

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

module Piggybak
  module Config
    class << self
      attr_accessor :payment_calculators
      attr_accessor :shipping_calculators
      attr_accessor :tax_calculators
      attr_accessor :default_country
      attr_accessor :activemerchant_mode
      attr_accessor :email_sender
      attr_accessor :order_cc
      attr_accessor :logging
      attr_accessor :logging_file
      attr_accessor :whois_url

      def reset
        @email_sender = "support@piggybak.org"
        @order_cc = nil

        @payment_calculators = ["::Piggybak::PaymentCalculator::Fake",
                                "::Piggybak::PaymentCalculator::AuthorizeNet"]
        @shipping_calculators = ["::Piggybak::ShippingCalculator::FlatRate",
                                 "::Piggybak::ShippingCalculator::Free",
                                 "::Piggybak::ShippingCalculator::Range"]
        @tax_calculators = ["::Piggybak::TaxCalculator::Percent"]

        @default_country = "US"

        @activemerchant_mode = :production

        @logging = false
        @logging_file = "/log/orders.log"

        @whois_url = nil
      end
    end

    self.reset
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
piggybak-0.5.5 lib/piggybak/config.rb
piggybak-0.5.4 lib/piggybak/config.rb