weighted_list_rank 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/weighted_list_rank/context.rb +2 -1
- data/lib/weighted_list_rank/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a649927ba7b5ed331d9721b6a9ba7aa044017956b0aec6484649ee7c9d8d55e1
|
4
|
+
data.tar.gz: '01833e4d548f1df8c2428dcce387bf57652c91ea1bf53044420d8720e2137d10'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fec2c7d118e678ee0284e9db56e99125681f5d67268250a3e0db142ea76edf1e9dd58f9b0c53fdfdb3f560feb25e5a731fb33ad71164f0ab45e9ca601ec9be4
|
7
|
+
data.tar.gz: d24a0349aeec1813215a3b842a22729de2f90c144a75944872bf000e46008567fee30d8fccfb1b209051cf34d54a616c1faa5411ac2f135d9cfc2bc5eef7371e
|
data/CHANGELOG.md
CHANGED
@@ -34,7 +34,8 @@ module WeightedListRank
|
|
34
34
|
sorted_items = items.map do |id, details|
|
35
35
|
{
|
36
36
|
id: id,
|
37
|
-
score_details
|
37
|
+
# Sort the score_details array by score in descending order before including it
|
38
|
+
score_details: details[:list_details].sort_by { |detail| -detail[:score] },
|
38
39
|
total_score: details[:total_score]
|
39
40
|
}
|
40
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weighted_list_rank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Sherman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|