minver 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d4c1636a148271f9102e1c53bbb4eb9c6404523
4
- data.tar.gz: 6d8aee43656fb56755daecf1e51c83ff49cc94a0
3
+ metadata.gz: d4eb7552a96f75a365abcb4bcf4806c449f5375b
4
+ data.tar.gz: b383a17c922df0d75ee7447f24e93b6b04170ba8
5
5
  SHA512:
6
- metadata.gz: 9d63a5e430c927c335d5693206a928f6055b1d46869e1cffe739c47cf4216e2d21d030082351b944872636432aa5cda2844699218957d4898354b40397505ebf
7
- data.tar.gz: fe2978bf5237e338584c54210d06a1dace55f5360b8ee94b2b7707812e0ae8eb07180eab00284c58119a8616b973adc5604c0d008a21c2c360f0000a8d1f85cc
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/[my-github-username]/minver/fork )
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 ||= request_url.split('?')[0]
40
+ @path ||= request_uri.first
45
41
  end
46
42
 
47
43
  def query_string
48
- @query_string ||= request_url.split('?')[1] || ''
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
@@ -1,3 +1,3 @@
1
1
  module Minver
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danyel Bayraktar