Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing the default supported versions #13

Merged
merged 1 commit into from
Sep 19, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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