minver 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/minver/parser.rb +6 -6
- data/lib/minver/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4eb7552a96f75a365abcb4bcf4806c449f5375b
|
4
|
+
data.tar.gz: b383a17c922df0d75ee7447f24e93b6b04170ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 358c864b1a488f634db46645b192f13d4b6c404d9bfecc45b4085ab60db493c132b0c0cf5b67ace3e7efdca51d21686dbadd35119dc00402122cfcbaa7b025a2
|
7
|
+
data.tar.gz: 66051a3c43efd4391104cb63adae4fcfa7666f0f6f31203953d6809c3a7c20522e0f8d32735d9d200ebf9e3bd10cfd4d2718fea22618133cb69c8d25724e47c7
|
data/README.md
CHANGED
@@ -78,7 +78,7 @@ server.stop
|
|
78
78
|
|
79
79
|
## Contributing
|
80
80
|
|
81
|
-
1. Fork it ( https://github.com/
|
81
|
+
1. Fork it ( https://github.com/muja/minver/fork )
|
82
82
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
83
83
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
84
84
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/minver/parser.rb
CHANGED
@@ -14,10 +14,6 @@ module Minver
|
|
14
14
|
@http_method ||= request_match[1]
|
15
15
|
end
|
16
16
|
|
17
|
-
def request_url
|
18
|
-
@request_url ||= request_match[2]
|
19
|
-
end
|
20
|
-
|
21
17
|
def request_http_version
|
22
18
|
@request_http_version ||= request_match[3]
|
23
19
|
end
|
@@ -41,14 +37,18 @@ module Minver
|
|
41
37
|
end
|
42
38
|
|
43
39
|
def path
|
44
|
-
@path ||=
|
40
|
+
@path ||= request_uri.first
|
45
41
|
end
|
46
42
|
|
47
43
|
def query_string
|
48
|
-
@query_string ||=
|
44
|
+
@query_string ||= request_uri[1] || ''
|
49
45
|
end
|
50
46
|
|
51
47
|
protected
|
48
|
+
def request_uri
|
49
|
+
@request_uri ||= request_match[2].split('?', 2)
|
50
|
+
end
|
51
|
+
|
52
52
|
def request_match
|
53
53
|
@request_match ||= request_line.match(/(\S+)\s+(\S+)(?:\s+HTTP\/(\S+)?)/)
|
54
54
|
end
|
data/lib/minver/version.rb
CHANGED