cuba 3.8.1 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -0
- data/cuba.gemspec +1 -1
- data/lib/cuba.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a0f252d0cdb3d4dc2a109fbf9c23b79d5b9a25a
|
4
|
+
data.tar.gz: 174baccd84a96ae2f0844decaa081b72ff1633cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 821b6dfa92e9c2a5ae19953e44823b2de138521a2cd722b48b4ed6c0e3900a29027f32cc38e84c90f9add8752e908b05460782b21cfbc9e0b5780a3e307667f0
|
7
|
+
data.tar.gz: 4d3ca82b85b09f7257e993fd8f3eb1ef59a69c5a42993646c468bc0c831c6429934de245addcbe7d643cd3be22f247f8cf30be726dd2a630aeb8a22edfde51af
|
data/CHANGELOG
CHANGED
data/cuba.gemspec
CHANGED
data/lib/cuba.rb
CHANGED
@@ -5,6 +5,7 @@ class Cuba
|
|
5
5
|
EMPTY = "".freeze
|
6
6
|
SEGMENT = "([^\\/]+)".freeze
|
7
7
|
DEFAULT = "text/html; charset=utf-8".freeze
|
8
|
+
REGEXES = Hash.new { |h, pattern| h[pattern] = /\A\/(#{pattern})(\/|\z)/ }
|
8
9
|
|
9
10
|
class Response
|
10
11
|
LOCATION = "Location".freeze
|
@@ -211,7 +212,7 @@ class Cuba
|
|
211
212
|
private :try
|
212
213
|
|
213
214
|
def consume(pattern)
|
214
|
-
matchdata = env[Rack::PATH_INFO].match(
|
215
|
+
matchdata = env[Rack::PATH_INFO].match(REGEXES[pattern])
|
215
216
|
|
216
217
|
return false unless matchdata
|
217
218
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|