versionist 1.7.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79025e4811f04b23c550fe9eb4085da059dea0d7
|
4
|
+
data.tar.gz: 9c5713500f5ce3319611c0295eec11c01c79bd12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c19020f11bb02e8ad0dcb2af8e26a1fae860af7b212aec5557dae1db65bcc56d885f14e95d025cb9b1d95d98fc9eb3075b8636c37cfdb46a81ce7af90b6f7ab3
|
7
|
+
data.tar.gz: f7db2e66ee2c3180268d15b5d04c1e510abd2e2ab593cf58bb29657699cf63390aa26403e8dd34011a749412c854583744d990b836b5d8aaca270ea7192cbf52
|
data/lib/versionist/routing.rb
CHANGED
@@ -57,7 +57,7 @@ module Versionist
|
|
57
57
|
|
58
58
|
def configure_parameter(config, &block)
|
59
59
|
parameter = Versionist::VersioningStrategy::Parameter.new(config)
|
60
|
-
route_hash = {:module => config[:module], :constraints => parameter}
|
60
|
+
route_hash = {:module => config[:module], :constraints => parameter, :as => config[:parameter][:value].gsub(/\W/, '_')}
|
61
61
|
route_hash.merge!({:defaults => config[:defaults]}) if config.has_key?(:defaults)
|
62
62
|
scope(route_hash, &block)
|
63
63
|
end
|
data/lib/versionist/version.rb
CHANGED
@@ -9,6 +9,7 @@ module Versionist
|
|
9
9
|
super
|
10
10
|
raise ArgumentError, "you must specify :name in the :header configuration Hash" if !config[:header].has_key?(:name)
|
11
11
|
raise ArgumentError, "you must specify :value in the :header configuration Hash" if !config[:header].has_key?(:value)
|
12
|
+
raise ArgumentError, "a header :name of 'version' will clash with the built in rack header \"HTTP_VERSION\". You must use a different header name" if config[:header][:name].downcase == "version"
|
12
13
|
Versionist.configuration.header_versions << self if !Versionist.configuration.header_versions.include?(self)
|
13
14
|
end
|
14
15
|
|
@@ -35,7 +36,7 @@ module Versionist
|
|
35
36
|
def ==(other)
|
36
37
|
super
|
37
38
|
return false if !other.is_a?(Versionist::VersioningStrategy::Header)
|
38
|
-
return config[:header][:name] == other.config[:header][:name] && self.config[:header][:value] == other.config[:header][:value]
|
39
|
+
return self.config[:header][:name] == other.config[:header][:name] && self.config[:header][:value] == other.config[:header][:value]
|
39
40
|
end
|
40
41
|
end
|
41
42
|
end
|
@@ -20,7 +20,7 @@ module Versionist
|
|
20
20
|
def ==(other)
|
21
21
|
super
|
22
22
|
return false if !other.is_a?(Versionist::VersioningStrategy::Parameter)
|
23
|
-
return config[:parameter][:name] == other.config[:parameter][:name] && self.config[:parameter][:value] == other.config[:parameter][:value]
|
23
|
+
return self.config[:parameter][:name] == other.config[:parameter][:name] && self.config[:parameter][:value] == other.config[:parameter][:value]
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -15,7 +15,7 @@ module Versionist
|
|
15
15
|
def ==(other)
|
16
16
|
super
|
17
17
|
return false if !other.is_a?(Versionist::VersioningStrategy::Path)
|
18
|
-
return config[:path][:value] == other.config[:path][:value]
|
18
|
+
return self.config[:path][:value] == other.config[:path][:value]
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versionist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Ploetz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -124,5 +124,5 @@ rubyforge_project:
|
|
124
124
|
rubygems_version: 2.4.8
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary: versionist-
|
127
|
+
summary: versionist-2.0.0
|
128
128
|
test_files: []
|