Added preferences for click amount and valid days on digital links. Tests for authorization are now running
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
module Spree
|
||||
class SpreeDigitalConfiguration < Preferences::Configuration
|
||||
preference :authorized_clicks, :integer, :default => 3
|
||||
preference :authorized_days, :integer, :default => 2
|
||||
end
|
||||
end
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user