sorare-rewards 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -3
- data/lib/sorare/rewards/interactors/allocations/compute_for_game_week.rb +2 -1
- data/lib/sorare/rewards/interactors/allocations/compute_for_league.rb +2 -1
- data/lib/sorare/rewards/interactors/allocations/compute_for_quality.rb +2 -1
- data/lib/sorare/rewards/interactors/allocations/compute_for_rarity.rb +2 -1
- data/lib/sorare/rewards/interactors/build.rb +2 -1
- data/lib/sorare/rewards/interactors/cards/pick_for_division.rb +2 -1
- data/lib/sorare/rewards/interactors/cards/pick_for_division_and_rarity.rb +2 -1
- data/lib/sorare/rewards/interactors/cards/pick_for_division_rarity_and_quality.rb +3 -1
- data/lib/sorare/rewards/interactors/cards/pick_for_game_week.rb +2 -1
- data/lib/sorare/rewards/interactors/cards/pick_for_league.rb +3 -1
- data/lib/sorare/rewards/interactors/pick.rb +2 -1
- data/lib/sorare/rewards/interactors/prize_pools/compute_for_division.rb +2 -1
- data/lib/sorare/rewards/interactors/prize_pools/compute_for_game_week.rb +2 -1
- data/lib/sorare/rewards/interactors/prize_pools/compute_for_league.rb +2 -1
- data/lib/sorare/rewards/interactors/supply/compute_for_game_week.rb +2 -1
- data/lib/sorare/rewards/interactors/supply/compute_for_quality.rb +2 -1
- data/lib/sorare/rewards/interactors/supply/compute_for_rarity.rb +3 -2
- data/lib/sorare/rewards/interactors/tiers/qualify_players.rb +2 -1
- data/lib/sorare/rewards/interactors/tiers/qualify_supply.rb +2 -1
- data/lib/sorare/rewards/version.rb +1 -1
- data/sorare-rewards.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a96e240df1e7ffc11d06b265919c29f86d1f74d07ec4878443276412bf1f9e95
|
4
|
+
data.tar.gz: f9e83487cad5213f909663cc0d903a6a7f9f92f09c48ea5cbdd8481f17b10a09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82a5ec0fc133697cb3e111a424a023c997eea978a0b04739b8dbc381849f6f3dd09d39d18a01c56876b4eab439bbe289043d36c9f5f82a1cf607402031303375
|
7
|
+
data.tar.gz: 6d73ca65887ad1a5c7aaf73b091f0b724db86cee40e702e017326b6650275305f69e41a087c42c06d6e1d11969d7b99127c66f53945f7b00076b5c4e446d8d93
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sorare-rewards (1.4.
|
4
|
+
sorare-rewards (1.4.5)
|
5
5
|
activesupport (~> 6.1.4)
|
6
|
-
|
6
|
+
interactor_with_steroids (~> 1.0.0)
|
7
7
|
json (~> 2)
|
8
8
|
yaml (~> 0.2.0)
|
9
9
|
|
@@ -26,7 +26,8 @@ GEM
|
|
26
26
|
hashdiff (1.0.1)
|
27
27
|
i18n (1.8.11)
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
|
-
|
29
|
+
interactor_with_steroids (1.0.0)
|
30
|
+
activesupport
|
30
31
|
json (2.6.1)
|
31
32
|
minitest (5.15.0)
|
32
33
|
ostruct (0.4.0)
|
@@ -10,7 +10,8 @@ module Sorare
|
|
10
10
|
class ComputeForGameWeek
|
11
11
|
include Interactor
|
12
12
|
|
13
|
-
|
13
|
+
receive :supply, :public_seed, :salt
|
14
|
+
hold :randomizer, :game_week_allocations
|
14
15
|
|
15
16
|
def call
|
16
17
|
context.randomizer = Sorare::Rewards::Random.new(public_seed, salt)
|
@@ -22,7 +22,8 @@ module Sorare
|
|
22
22
|
class PickForDivision
|
23
23
|
include Interactor
|
24
24
|
|
25
|
-
|
25
|
+
receive :league, :allocations, :pickers
|
26
|
+
hold :cards_picked
|
26
27
|
|
27
28
|
def call
|
28
29
|
context.cards_picked = allocations.keys.index_with do |rarity|
|
@@ -17,7 +17,8 @@ module Sorare
|
|
17
17
|
class PickForDivisionAndRarity
|
18
18
|
include Interactor
|
19
19
|
|
20
|
-
|
20
|
+
receive :league, :rarity, :allocations, :pickers
|
21
|
+
hold :cards_picked
|
21
22
|
|
22
23
|
def call
|
23
24
|
context.cards_picked = supply!
|
@@ -15,7 +15,9 @@ module Sorare
|
|
15
15
|
|
16
16
|
MISSING_CARDS = 'There are not enough cards to fulfill the requirements'
|
17
17
|
|
18
|
-
|
18
|
+
receive :picker, :allocations, :league, :rarity, force: false
|
19
|
+
hold :cards_picked
|
20
|
+
|
19
21
|
delegate :game_week, to: :league
|
20
22
|
|
21
23
|
def call
|
@@ -17,7 +17,9 @@ module Sorare
|
|
17
17
|
class PickForLeague
|
18
18
|
include Interactor
|
19
19
|
|
20
|
-
|
20
|
+
receive :league, :allocations
|
21
|
+
hold :pickers, :cards_picked
|
22
|
+
|
21
23
|
delegate :game_week, to: :league
|
22
24
|
delegate :public_seed, :salt, to: :game_week
|
23
25
|
|
@@ -19,7 +19,8 @@ module Sorare
|
|
19
19
|
class Pick
|
20
20
|
include Interactor
|
21
21
|
|
22
|
-
|
22
|
+
receive :card_allocations, :game_week, :salt
|
23
|
+
hold :cards_picked
|
23
24
|
|
24
25
|
# Depending on the way the allocations interpreter is implemented it could be done by him or we
|
25
26
|
# update the allocations process to match the structure
|
@@ -9,7 +9,8 @@ module Sorare
|
|
9
9
|
class ComputeForDivision
|
10
10
|
include Interactor
|
11
11
|
|
12
|
-
|
12
|
+
receive :playing_rate, :available_prize_pools
|
13
|
+
hold :division_prize_pools
|
13
14
|
|
14
15
|
def call
|
15
16
|
context.division_prize_pools = available_prize_pools.map do |available_prize_pool|
|
@@ -9,7 +9,8 @@ module Sorare
|
|
9
9
|
class ComputeForQuality
|
10
10
|
include Interactor
|
11
11
|
|
12
|
-
|
12
|
+
receive :randomizer, :total_supply, :tier_supply, :rewarded, :rewardable
|
13
|
+
hold :quality_supply
|
13
14
|
|
14
15
|
def call
|
15
16
|
context.quality_supply = total_supply.zero? ? 0 : quality_supply
|
@@ -9,8 +9,9 @@ module Sorare
|
|
9
9
|
class ComputeForRarity
|
10
10
|
include Interactor
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
receive :randomizer, :league, :rarity, :supply
|
13
|
+
hold :rarity_supply, :rewardable
|
14
|
+
|
14
15
|
delegate :game_week, to: :league
|
15
16
|
|
16
17
|
def call
|
data/sorare-rewards.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
32
|
spec.add_dependency 'activesupport', '~> 6.1.4'
|
33
|
-
spec.add_dependency '
|
33
|
+
spec.add_dependency 'interactor_with_steroids', '~> 1.0.0'
|
34
34
|
spec.add_dependency 'json', '~> 2'
|
35
35
|
spec.add_dependency 'yaml', '~> 0.2.0'
|
36
36
|
spec.add_development_dependency 'ostruct', '~> 0.4.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorare-rewards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sorare team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 6.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: interactor_with_steroids
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
230
|
+
rubygems_version: 3.1.6
|
231
231
|
signing_key:
|
232
232
|
specification_version: 4
|
233
233
|
summary: '["Sorare", "reward", "allocation", "algorithm"]'
|