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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f50527ee43cba5bd55144f8c76bc4b702cd2e84a797008aa4bed9cfa9b055a9
4
- data.tar.gz: 0427e71591900a28fadcc5e68dae0bfbd71c7b97b00896953b5ecaec80ccbad7
3
+ metadata.gz: a649927ba7b5ed331d9721b6a9ba7aa044017956b0aec6484649ee7c9d8d55e1
4
+ data.tar.gz: '01833e4d548f1df8c2428dcce387bf57652c91ea1bf53044420d8720e2137d10'
5
5
  SHA512:
6
- metadata.gz: 2da62414b58dafb3ac4e49cbc18e0cb1b24c09edb78e0888365a3ac68e16e764974a83be8379dabe3a4291673170d7d1e80429a1a1c97189aa7ee3f1edbae597
7
- data.tar.gz: 545f22a6c95c3713698c743e7f5fb1f2495034fc57ee81b4a745a8d064594cc9fa818fd5481d6443152a51e1fdaa5a7f1f362e17297f72a345a6e59a36255d12
6
+ metadata.gz: 4fec2c7d118e678ee0284e9db56e99125681f5d67268250a3e0db142ea76edf1e9dd58f9b0c53fdfdb3f560feb25e5a731fb33ad71164f0ab45e9ca601ec9be4
7
+ data.tar.gz: d24a0349aeec1813215a3b842a22729de2f90c144a75944872bf000e46008567fee30d8fccfb1b209051cf34d54a616c1faa5411ac2f135d9cfc2bc5eef7371e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.3] - 2024-02-03
4
+
5
+ - sprt the score_details by the highest score from each list first
6
+
3
7
  ## [0.1.2] - 2024-02-03
4
8
 
5
9
  - Added list weight to rank result
@@ -34,7 +34,8 @@ module WeightedListRank
34
34
  sorted_items = items.map do |id, details|
35
35
  {
36
36
  id: id,
37
- score_details: details[:list_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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WeightedListRank
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  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.2
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-03 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop