Skip to content

Commit

Permalink
Merge 7efb172 into 8a36c48
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémie Meyer de Ville committed Sep 19, 2013
2 parents 8a36c48 + 7efb172 commit e166f71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/versioncake/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
require 'active_support/core_ext/module/attribute_accessors.rb'
require 'active_support/core_ext/array/wrap.rb'

module VersionCake
module Configuration

SUPPORTED_VERSIONS_DEFAULT = (1..10)

mattr_accessor :supported_version_numbers
self.supported_version_numbers = SUPPORTED_VERSIONS_DEFAULT
mattr_reader :supported_version_numbers

mattr_accessor :extraction_strategies
self.extraction_strategies = [VersionCake::QueryParameterStrategy.new]
self.extraction_strategies = []

mattr_accessor :default_version
self.default_version = nil
Expand Down Expand Up @@ -42,5 +42,7 @@ def self.latest_version
supported_version_numbers.first
end

self.extraction_strategy = :query_parameter
self.supported_version_numbers = SUPPORTED_VERSIONS_DEFAULT
end
end
1 change: 1 addition & 0 deletions lib/versioncake/strategies/extraction_strategy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'active_support/core_ext/class/attribute_accessors.rb'
require 'active_support/core_ext/string/inflections.rb'

module VersionCake
class ExtractionStrategy
Expand Down

0 comments on commit e166f71

Please sign in to comment.