sliver 0.2.1 → 0.2.2

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: a60f68bd365f418ada42e9e99afdfd0c68687628
4
- data.tar.gz: 0dc49aa25e7da640a73a94b883c2a39c0c0d4b50
3
+ metadata.gz: 62e18bf6b83082bb11e2c86ee25a98175a3ba17f
4
+ data.tar.gz: 8fcf8e7c3821264435e5ca43e72956ca33e83235
5
5
  SHA512:
6
- metadata.gz: 0139f2e011b65fa3fea1405bc6ded129da80b42450c2b2e464ab30ae2f5d850aa85fe7be41a236b0f981222498178c1169c33ce24354f55c7b34c50290b52628
7
- data.tar.gz: de84f54e7202e0bcd4c2c75000b23f847a2aa7ed7703a997948d3aaf45b0e9d800e36633f9bc0dd56e55ca0f0f5a5d55a530206e6f2c4984954bd17956b19e95
6
+ metadata.gz: 4fd5f69b2bd489c67e9c2b424b9cc4cf892af72362931f04b63dc117566f2732630b09179c1cafbae73a49db88bc95d9c6ec75922e66fdf9055a0b3eccf00fa2
7
+ data.tar.gz: d6def9714ba4c73d2a59716ef0be3251cf28d139f678ea9fd7bbd83e843f7dd6e76a11f366625449e58f55744ea2ce649ec0444ee71d4ad9b2c1d4e17eb35cf6
data/README.md CHANGED
@@ -13,7 +13,7 @@ Early days of development, so things may change dramatically. Or not. Who knows.
13
13
  Add it to your Gemfile like any other gem, or install it manually.
14
14
 
15
15
  ```ruby
16
- gem 'sliver', '~> 0.2.1'
16
+ gem 'sliver', '~> 0.2.2'
17
17
  ```
18
18
 
19
19
  ## Usage
data/lib/sliver/path.rb CHANGED
@@ -45,7 +45,7 @@ class Sliver::Path
45
45
 
46
46
  def string_to_regexp
47
47
  @string_to_regexp ||= Regexp.new(
48
- "\\A" + string.to_s.gsub(/:[\w-]+/, "([\\w-]+)") + "\\z"
48
+ "\\A" + string.to_s.gsub(/:[\w-]+/, "([\\w\\-\\.\\\\+]+)") + "\\z"
49
49
  )
50
50
  end
51
51
  end
data/sliver.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = 'sliver'
4
- spec.version = '0.2.1'
4
+ spec.version = '0.2.2'
5
5
  spec.authors = ['Pat Allan']
6
6
  spec.email = ['pat@freelancing-gods.com']
7
7
  spec.summary = %q{Lightweight, simple Rack APIs}
@@ -179,6 +179,20 @@ describe 'Class-based Sliver API' do
179
179
  expect(last_response.body).to eq('10')
180
180
  end
181
181
 
182
+ it 'handles path parameters with full stops' do
183
+ get '/my/10.1'
184
+
185
+ expect(last_response.status).to eq(200)
186
+ expect(last_response.body).to eq('10.1')
187
+ end
188
+
189
+ it 'handles path parameters with pluses' do
190
+ get '/my/10+1'
191
+
192
+ expect(last_response.status).to eq(200)
193
+ expect(last_response.body).to eq('10+1')
194
+ end
195
+
182
196
  it 'handles multiple path parameter markers' do
183
197
  get '/my/10/foo'
184
198
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack