Added preferences for click amount and valid days on digital links. Tests for authorization are now running

This commit is contained in:
Michael Bianco
2012-03-31 11:07:52 -04:00
parent c4a85b71d7
commit e652835a5f
4 changed files with 45 additions and 57 deletions
+6
View File
@@ -0,0 +1,6 @@
module Spree
class SpreeDigitalConfiguration < Preferences::Configuration
preference :authorized_clicks, :integer, :default => 3
preference :authorized_days, :integer, :default => 2
end
end
+5 -1
View File
@@ -8,7 +8,11 @@ module SpreeDigital
config.generators do |g|
g.test_framework :rspec
end
initializer "spree.spree_digital.preferences", :after => "spree.environment" do |app|
Spree::DigitalConfiguration = Spree::SpreeDigitalConfiguration.new
end
def self.activate
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
Rails.application.config.cache_classes ? require(c) : load(c)