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: 1b5c535cb0295dd9f754cbc768f477f41c1eceba
4
- data.tar.gz: fd5eba81cb242cb16659fd3844cdc2aa1edc88c3
3
+ metadata.gz: 79025e4811f04b23c550fe9eb4085da059dea0d7
4
+ data.tar.gz: 9c5713500f5ce3319611c0295eec11c01c79bd12
5
5
  SHA512:
6
- metadata.gz: e2bc89898339843db99474b12c2f1a75dc9a11edb5420121f9d72408b9597095fa28c521e11df989280e0c0891ba91001ee11a142e84e84c0e771ad5dc1b7dfb
7
- data.tar.gz: a301536d126da37b17023960862f26bf67286ef5a6bda0e95650b57fcfb5c0b669e8692f31d677587c727237bce2b11f5345f1469f5a772f64445d9717f54da0
6
+ metadata.gz: c19020f11bb02e8ad0dcb2af8e26a1fae860af7b212aec5557dae1db65bcc56d885f14e95d025cb9b1d95d98fc9eb3075b8636c37cfdb46a81ce7af90b6f7ab3
7
+ data.tar.gz: f7db2e66ee2c3180268d15b5d04c1e510abd2e2ab593cf58bb29657699cf63390aa26403e8dd34011a749412c854583744d990b836b5d8aaca270ea7192cbf52
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Versionist
2
- VERSION = '1.7.0'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -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: 1.7.0
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: 2017-12-21 00:00:00.000000000 Z
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-1.7.0
127
+ summary: versionist-2.0.0
128
128
  test_files: []