http-negotiate 0.2.1 → 0.2.3

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
  SHA256:
3
- metadata.gz: 1e27b1c078a2a7afaf0787772a0c48086fc5b6a108f04a87e64ed247f26e7f3d
4
- data.tar.gz: a26e38a5eece61435947e558db362d706299a5c48ac64bad54012a52dc0850c1
3
+ metadata.gz: daa52cb041be61e4a511c50c85d67f15367e51228556431cf0aa23c0ff6a67d5
4
+ data.tar.gz: 0eb3eb4562172041e3518bed6d3cc4cb7ca194e8b1a9dba3d796308c3a98aa9a
5
5
  SHA512:
6
- metadata.gz: 6234e7a39672c501cdfb69fbbdd620c9ca7ca4c9978a714f2b0e2425d80a2dd67c111837e30a72c375a8d308ae7dae02a60ddd2d6981ed342f70ec8db8a0ba27
7
- data.tar.gz: a2e8a89a8a226dc0ec9a15ceca62055705bd7903a4939907b17f4b6f23f1d3dda5bf5801308dda797348410bed6481961139462e87c535de7559efaf393f779f
6
+ metadata.gz: cb0b4ca34c79b34ad64abd140906deaca1486df9a92e2399f1637fb70af3de87158cedc0ded65c6830ced6c31614136f7ef4d43233a7d754ef5ce396f4e351e6
7
+ data.tar.gz: c1852a2e1017074ac0361607fed44d3a79129d3967da2a6aa78eab7d014d4378562401df0a9e2589ae37a71a93e77522fda528dcd6660c8a5c69d777d8bcfdf8
@@ -1,5 +1,5 @@
1
1
  module HTTP
2
2
  module Negotiate
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
@@ -213,9 +213,9 @@ module HTTP::Negotiate
213
213
  end
214
214
 
215
215
  # XXX we do not actually try to do the params this time
216
- mt, *params = type.split(/;+/)
217
- maj, min = mt.split(/\/+/)
218
- params = params.map { |p| p.split(/=+/, 2) }
216
+ mt, *params = type.split(/\s*;+\s*/)
217
+ maj, min = mt.to_s.split(/\/+/, 2)
218
+ params = params.map { |p| p.to_s.split(/\s*=+\s*/, 2) }
219
219
 
220
220
  # warn maj.inspect, min.inspect
221
221
 
@@ -229,12 +229,14 @@ module HTTP::Negotiate
229
229
  else
230
230
  0.1
231
231
  end
232
-
233
232
  end
234
233
 
235
234
  scores[var] = [qs * qe * qc * ql * qt, size]
236
235
  end
237
236
 
237
+ # DUH DON'T FORGET TO NUKE THE ZERO SCORES
238
+ scores.reject! { |_, s| s.first == 0 }
239
+
238
240
  # XXX do something smarter here for secondary comparison
239
241
  cmp ||= -> a, b { 0 }
240
242
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-negotiate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Taylor
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-02-14 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -52,7 +51,6 @@ dependencies:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
53
  version: '3.12'
55
- description:
56
54
  email:
57
55
  - code@doriantaylor.com
58
56
  executables: []
@@ -79,7 +77,6 @@ licenses:
79
77
  metadata:
80
78
  homepage_uri: https://github.com/doriantaylor/rb-http-negotiate
81
79
  source_code_uri: https://github.com/doriantaylor/rb-http-negotiate
82
- post_install_message:
83
80
  rdoc_options: []
84
81
  require_paths:
85
82
  - lib
@@ -94,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
91
  - !ruby/object:Gem::Version
95
92
  version: '0'
96
93
  requirements: []
97
- rubygems_version: 3.3.15
98
- signing_key:
94
+ rubygems_version: 3.6.7
99
95
  specification_version: 4
100
96
  summary: An implementation of Gisle Aas's HTTP::Negotiate
101
97
  test_files: []