sorare-rewards 1.4.3 → 1.4.4

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: 8641fffa2c82df83b2e775393fbc68ae16d99857695061d1a8b8af33017c4971
4
- data.tar.gz: dc828084b6b07733bb8725e3d62d302ab3601c260c5ed7fbaf81039167df4a07
3
+ metadata.gz: 64ce3ebddf119cf93cc3cb87a87576be330a1cea5673a91c4403c0be574ce484
4
+ data.tar.gz: 3d5aedfa9b6b3a5bfef3793d62900c17a4ede3bb86eeed164a305173d43146b6
5
5
  SHA512:
6
- metadata.gz: ce2bd4d025e0d1efcf6bf8bbefa6e9ff992d751cedaed1a582e07ebe380a6eae2cc4148ebc49be595a5345e8bda235096e287f0cb549a5f9b01f237c86b3d496
7
- data.tar.gz: 6a9d835f7cd4c8237676c5b47e7ee6e122162ae1606062a9521754cca70d392941ff0a94413ba69c8e5bbd5dff29fe703dcc009290c766a3422b757e2d81319f
6
+ metadata.gz: 9255987966f248d9c46040efd606c2ed718953cd089d96692c982f6294fb16803b6d687c1e047f45c5142b50cf0a86cb51ca6d3dae1f4a6c072f8423bc22eb45
7
+ data.tar.gz: 9ba2bb81da433811b482e721994035b03d96534d299ee513f96d7768cd3649a5604428a2625480a795049d84027635edce480f5deb36e21e1e646be9dcc2cd98
data/.gitlab-ci.yml CHANGED
@@ -1,4 +1,4 @@
1
- image: ruby:3.0
1
+ image: ruby:3.1.0
2
2
 
3
3
  workflow:
4
4
  rules:
data/.rubocop.yml CHANGED
@@ -86,3 +86,6 @@ RSpec/StubbedMock:
86
86
  Style/ExpandPathArguments:
87
87
  Exclude:
88
88
  - "*.gemspec"
89
+
90
+ Style/OpenStructUse:
91
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sorare-rewards (1.4.3)
4
+ sorare-rewards (1.4.4)
5
5
  activesupport (~> 6.1.4)
6
6
  interactor (~> 3.1.2)
7
7
  json (~> 2)
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (6.1.4.3)
13
+ activesupport (6.1.4.4)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 1.6, < 2)
16
16
  minitest (>= 5.1)
@@ -27,16 +27,16 @@ GEM
27
27
  i18n (1.8.11)
28
28
  concurrent-ruby (~> 1.0)
29
29
  interactor (3.1.2)
30
- json (2.6.0)
30
+ json (2.6.1)
31
31
  minitest (5.15.0)
32
32
  ostruct (0.4.0)
33
33
  parallel (1.21.0)
34
- parser (3.0.2.0)
34
+ parser (3.1.0.0)
35
35
  ast (~> 2.4.1)
36
36
  public_suffix (4.0.6)
37
37
  rainbow (3.0.0)
38
38
  rake (12.3.3)
39
- regexp_parser (2.1.1)
39
+ regexp_parser (2.2.0)
40
40
  rexml (3.2.5)
41
41
  rspec (3.10.0)
42
42
  rspec-core (~> 3.10.0)
@@ -51,16 +51,16 @@ GEM
51
51
  diff-lcs (>= 1.2.0, < 2.0)
52
52
  rspec-support (~> 3.10.0)
53
53
  rspec-support (3.10.2)
54
- rubocop (1.22.1)
54
+ rubocop (1.24.1)
55
55
  parallel (~> 1.10)
56
56
  parser (>= 3.0.0.0)
57
57
  rainbow (>= 2.2.2, < 4.0)
58
58
  regexp_parser (>= 1.8, < 3.0)
59
59
  rexml
60
- rubocop-ast (>= 1.12.0, < 2.0)
60
+ rubocop-ast (>= 1.15.1, < 2.0)
61
61
  ruby-progressbar (~> 1.7)
62
62
  unicode-display_width (>= 1.4.0, < 3.0)
63
- rubocop-ast (1.12.0)
63
+ rubocop-ast (1.15.1)
64
64
  parser (>= 3.0.1.1)
65
65
  rubocop-rake (0.6.0)
66
66
  rubocop (~> 1.0)
@@ -75,7 +75,7 @@ GEM
75
75
  crack (>= 0.3.2)
76
76
  hashdiff (>= 0.4.0, < 2.0.0)
77
77
  yaml (0.2.0)
78
- zeitwerk (2.5.1)
78
+ zeitwerk (2.5.3)
79
79
 
80
80
  PLATFORMS
81
81
  ruby
@@ -84,7 +84,7 @@ DEPENDENCIES
84
84
  ostruct (~> 0.4.0)
85
85
  rake (~> 12.0)
86
86
  rspec (~> 3.10)
87
- rubocop (~> 1.22.1)
87
+ rubocop (~> 1.24.1)
88
88
  rubocop-rake (~> 0.6.0)
89
89
  rubocop-rspec (~> 2.5.0)
90
90
  sorare-rewards!
@@ -19,7 +19,7 @@ module Sorare
19
19
  end
20
20
 
21
21
  def load_yaml_configuration_file(filename)
22
- YAML.safe_load(File.read("#{File.dirname(__FILE__)}/#{filename}"), [], [], true)
22
+ YAML.safe_load(File.read("#{File.dirname(__FILE__)}/#{filename}"), aliases: true)
23
23
  .with_indifferent_access
24
24
  end
25
25
  end
@@ -19,9 +19,9 @@ module Sorare
19
19
  def allocate_and_format!
20
20
  each_rarity_allocation do |rarity|
21
21
  (allocations[rarity].first || {}).keys.index_with do |division|
22
- allocations[rarity].each_with_index.map do |qualified_allocations, tier|
22
+ allocations[rarity].each_with_index.to_h do |qualified_allocations, tier|
23
23
  [Sorare::Rewards.configuration.transform_tier.call(tier), qualified_allocations[division]]
24
- end.to_h
24
+ end
25
25
  end
26
26
  end
27
27
  end
@@ -20,9 +20,9 @@ module Sorare
20
20
  end
21
21
 
22
22
  def allocations
23
- config.length.times.map do |division|
23
+ config.length.times.to_h do |division|
24
24
  [Sorare::Rewards.configuration.transform_division.call(division + 1), allocated[division]]
25
- end.to_h
25
+ end
26
26
  end
27
27
 
28
28
  def allocate!
@@ -16,13 +16,13 @@ module Sorare
16
16
  end
17
17
 
18
18
  def prize_pools!
19
- league.each_division_prize_pools.map do |division, prize_pools|
19
+ league.each_division_prize_pools.to_h do |division, prize_pools|
20
20
  [
21
21
  Sorare::Rewards.configuration.transform_division.call(division),
22
22
  ComputeForDivision.call!(playing_rate: league.playing_rate, available_prize_pools: prize_pools)
23
23
  .division_prize_pools
24
24
  ]
25
- end.to_h
25
+ end
26
26
  end
27
27
  end
28
28
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sorare
4
4
  module Rewards
5
- VERSION = '1.4.3'
5
+ VERSION = '1.4.4'
6
6
  end
7
7
  end
@@ -35,8 +35,9 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency 'yaml', '~> 0.2.0'
36
36
  spec.add_development_dependency 'ostruct', '~> 0.4.0'
37
37
  spec.add_development_dependency 'rspec', '~> 3.10'
38
- spec.add_development_dependency 'rubocop', '~> 1.22.1'
38
+ spec.add_development_dependency 'rubocop', '~> 1.24.1'
39
39
  spec.add_development_dependency 'rubocop-rake', '~> 0.6.0'
40
40
  spec.add_development_dependency 'rubocop-rspec', '~> 2.5.0'
41
41
  spec.add_development_dependency 'webmock', '~> 3.14.0'
42
+ spec.metadata['rubygems_mfa_required'] = 'true'
42
43
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorare-rewards
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sorare team
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.22.1
103
+ version: 1.24.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.22.1
110
+ version: 1.24.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-rake
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -211,6 +211,7 @@ licenses:
211
211
  metadata:
212
212
  homepage_uri: https://gitlab.com/sorare/sorare-rewards
213
213
  source_code_uri: https://gitlab.com/sorare/sorare-rewards
214
+ rubygems_mfa_required: 'true'
214
215
  post_install_message:
215
216
  rdoc_options: []
216
217
  require_paths:
@@ -226,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
227
  - !ruby/object:Gem::Version
227
228
  version: '0'
228
229
  requirements: []
229
- rubygems_version: 3.2.22
230
+ rubygems_version: 3.3.3
230
231
  signing_key:
231
232
  specification_version: 4
232
233
  summary: '["Sorare", "reward", "allocation", "algorithm"]'