http-negotiate 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 +4 -4
- data/lib/http/negotiate/version.rb +1 -1
- data/lib/http/negotiate.rb +3 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d699dd657fff5ae1a330a54f83b33b9d091a455e052566270e3ff697e4eedc97
|
4
|
+
data.tar.gz: baae101cbbe136cf67f698eb4fb6990fc43e6194f4dbebcd7acc786911ec5c2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef0b67b2cb482168f9effe5900efb1f1be8c24a42fde4ddb3d51669b950d63e42f651c5b5cd6062172dff940ad4b27741b24648560a7d72343354969bdb7bafb
|
7
|
+
data.tar.gz: bd297a0bb246293fb405da83eafdf5226ffd38aedabf648c1d88234177c12a63a59e9cdb0ca7dc6e0462b0a1c4ac55707ffa0a8a4fd6cbe74fc53f0dd0ebec42
|
data/lib/http/negotiate.rb
CHANGED
@@ -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
|
|