chgk_rating 2.0.0 → 2.1.0

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: e4f4ca06ab6d5493cf307d4d0c69a9286d6306e821ee186a1efa5f59ee90e6ac
4
- data.tar.gz: fe44eff613828362a3bd6e1347d1bffcb3eddaf9ec6b2ab74974271526e3c29e
3
+ metadata.gz: 2beed511c09dac149040e3ef7aa8b77b6544812b36b51edac684e59d31b3d13a
4
+ data.tar.gz: 9095b4e10577fcce79635959cf5c59e6735991a542529d9297055f7d16f31619
5
5
  SHA512:
6
- metadata.gz: bf3d999776bcf5f32a2f2f763c7d04b47a4ee32738b526da7de9b54c0d8a79ddddc7d499dc0d251c3d7d02be9ce2e87b08afcef61c9e94788f25ac3d498d7012
7
- data.tar.gz: fef80b06f8457b2ce82a58a5fb8b183d5bab8c88c53e0c6de80462bba6822157ec53b19283f27c8d67f2e2fbabec8f6fcb47567c9e59e375861cdefccdaadaca
6
+ metadata.gz: 3b46e4c6bc5bee3671c6a7eea8f01acc9de7eaba69d507e1c2c4dab48c03f8ec207f581e9c72adcb492146d036fb9357527e392604406a90e48e0327095f546a
7
+ data.tar.gz: 959bf5cdc7e97d4448afdd7798fff377ce6101d546d33bf28df0b4944a24bdddf9cd08b9041a81d337e25d0321aa808411b84ca6b81997642b2535a9ac0357d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.1.0 (2021-12-29)
4
+
5
+ * Updated API mappings (thanks, @L-Eugene)
6
+
3
7
  ## v2.0.0 (2021-12-28)
4
8
 
5
9
  Breaking changes:
@@ -73,6 +73,7 @@ module ChgkRating
73
73
  release_id: 'idrelease',
74
74
  rating: [],
75
75
  rating_position: [],
76
+ tech_rating: [],
76
77
  date: ['date', :date]
77
78
  },
78
79
  PLAYER_RATING: {
@@ -106,14 +107,19 @@ module ChgkRating
106
107
  questions_total: [],
107
108
  main_payment_value: ['main_payment_value', :float],
108
109
  discounted_payment_value: ['discounted_payment_value', :float],
110
+ tournament_in_rating: ['tournament_in_rating', :boolean_binboolean],
109
111
  date_requests_allowed_to: ['date_requests_allowed_to', :datetime],
110
- site_url: ['site_url', :uri]
112
+ site_url: ['site_url', :uri],
113
+ date_archived_at: ['date_archived_at', :datetime]
111
114
  },
112
115
  :name,
113
116
  :town,
114
117
  :long_name,
115
118
  :type_name,
119
+ :main_payment_currency,
120
+ :discounted_payment_currency,
116
121
  :discounted_payment_reason,
122
+ :archive,
117
123
  :comment
118
124
  ],
119
125
  TOURNAMENT_TEAM_PLAYER: {
@@ -128,22 +134,28 @@ module ChgkRating
128
134
  position: ['position', :float],
129
135
  questions_total: [],
130
136
  result: ['mask', :splitboolean_arraystrboolean],
131
- bonus_a: [],
132
137
  bonus_b: [],
133
- tech_rating: [],
138
+ tech_rating_rt: [],
139
+ tech_rating_rg: [],
140
+ tech_rating_rb: [],
141
+ rating_r: [],
134
142
  predicted_position: [],
135
- d_bonus_a: [],
136
- d_bonus_b: [],
137
- d_diff_bonus: [],
143
+ diff_bonus: [],
138
144
  included_in_rating: ['included_in_rating', :boolean_binboolean]
139
145
  },
140
146
  :current_name,
141
147
  :base_name
142
148
  ],
143
149
  TEAM: [
144
- { id: 'idteam' },
150
+ {
151
+ id: 'idteam',
152
+ tournaments_this_season: [],
153
+ tournaments_total: []
154
+ },
145
155
  :name,
146
156
  :town,
157
+ :region_name,
158
+ :country_name,
147
159
  :comment
148
160
  ],
149
161
  TOURNAMENT_TEAM_RESULT: {
@@ -152,4 +164,4 @@ module ChgkRating
152
164
  }
153
165
  })
154
166
  end
155
- end
167
+ end
@@ -1,3 +1,3 @@
1
1
  module ChgkRating
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
@@ -15,13 +15,12 @@ RSpec.describe ChgkRating::Collections::TournamentTeams do
15
15
  specify('#base_name') { expect(team.base_name).to eq 'Полосатый мамонт' }
16
16
  specify('#position') { expect(team.position).to eq 3 }
17
17
  specify('#questions_total') { expect(team.questions_total).to eq 34 }
18
- specify('#bonus_a') { expect(team.bonus_a).to eq 1575 }
19
- specify('#bonus_b') { expect(team.bonus_b).to eq -47 }
20
- specify('#tech_rating') { expect(team.tech_rating).to eq 2549 }
18
+ specify('#bonus_b') { expect(team.bonus_b).to eq 421 }
19
+ specify('#tech_rating_rt') { expect(team.tech_rating_rt).to eq 2583 }
20
+ specify('#tech_rating_rg') { expect(team.tech_rating_rg).to eq 2583 }
21
+ specify('#tech_rating_rb') { expect(team.tech_rating_rb).to eq 2525 }
21
22
  specify('#predicted_position') { expect(team.predicted_position).to eq 2 }
22
- specify('#d_bonus_a') { expect(team.d_bonus_a).to eq 1575 }
23
- specify('#d_bonus_b') { expect(team.d_bonus_b).to eq 420 }
24
- specify('#d_diff_bonus') { expect(team.d_diff_bonus).to eq -47 }
23
+ specify('#diff_bonus') { expect(team.diff_bonus).to eq -48 }
25
24
  specify('#included_in_rating') { expect(team.included_in_rating).to eq true }
26
25
  specify('#result') { expect(team.result).to eq [true, true, true, false, true, true,
27
26
  true, true, true, true, true,
@@ -46,15 +45,14 @@ RSpec.describe ChgkRating::Collections::TournamentTeams do
46
45
  "0", "1", "1", "1", "0", "0", "1", "0", "1", "1", "0",
47
46
  "1", "1", "0", "1", "0", "1", "0", "1", "1", "1", "0",
48
47
  "1", "1", "1", "1"]
49
- expect(tournament_team_h['bonus_a']).to eq '1575'
50
- expect(tournament_team_h['bonus_b']).to eq '-47'
51
- expect(tournament_team_h['tech_rating']).to eq '2549'
52
- expect(tournament_team_h['d_bonus_a']).to eq '1575'
53
- expect(tournament_team_h['d_bonus_b']).to eq '420'
54
- expect(tournament_team_h['d_diff_bonus']).to eq '-47'
48
+ expect(tournament_team_h['bonus_b']).to eq '421'
49
+ expect(tournament_team_h['tech_rating_rt']).to eq '2583'
50
+ expect(tournament_team_h['tech_rating_rg']).to eq '2583'
51
+ expect(tournament_team_h['tech_rating_rb']).to eq '2525'
52
+ expect(tournament_team_h['diff_bonus']).to eq '-48'
55
53
  expect(tournament_team_h['predicted_position']).to eq '2'
56
54
  expect(tournament_team_h['included_in_rating']).to eq '1'
57
55
  expect(tournament_team_h['current_name']).to eq 'Полосатый мамонт'
58
56
  expect(tournament_team_h['base_name']).to eq 'Полосатый мамонт'
59
57
  end
60
- end
58
+ end
@@ -12,6 +12,10 @@ RSpec.describe ChgkRating::Models::Team do
12
12
 
13
13
  specify('#id') { expect(subject.id).to eq '1' }
14
14
  specify('#town') { expect(subject.town).to eq 'Москва' }
15
+ specify('#region_name') { expect(subject.region_name).to eq 'Москва' }
16
+ specify('#country_name') { expect(subject.country_name).to eq 'Россия' }
17
+ specify('#tournaments_total') { expect(subject.tournaments_total).to eq 101 }
18
+ specify('#tournaments_this_season') { expect(subject.tournaments_this_season).to eq 0 }
15
19
  specify('#name') { expect(subject.name).to eq 'Неспроста' }
16
20
  specify('#comment') { expect(subject.comment).to eq '' }
17
21
 
@@ -28,6 +32,10 @@ RSpec.describe ChgkRating::Models::Team do
28
32
  expect(team_h['idteam']).to eq '1'
29
33
  expect(team_h['name']).to eq 'Неспроста'
30
34
  expect(team_h['town']).to eq 'Москва'
35
+ expect(team_h['region_name']).to eq 'Москва'
36
+ expect(team_h['country_name']).to eq 'Россия'
37
+ expect(team_h['tournaments_total']).to eq '101'
38
+ expect(team_h['tournaments_this_season']).to eq '0'
31
39
  expect(team_h['comment']).to eq ''
32
40
  end
33
41
 
@@ -86,4 +94,4 @@ RSpec.describe ChgkRating::Models::Team do
86
94
  end
87
95
  it { expect(team_ratings).to be_an_instance_of ChgkRating::Collections::TeamRatings }
88
96
  end
89
- end
97
+ end
@@ -17,14 +17,17 @@ RSpec.describe ChgkRating::Models::Tournament do
17
17
  specify('#date_end') { expect(subject.date_end).to eq DateTime.parse('2015-11-08 18:00:00') }
18
18
  specify('#tour_count') { expect(subject.tour_count).to eq 4 }
19
19
  specify('#tour_questions') { expect(subject.tour_questions).to eq 12 }
20
- specify('#tour_ques_per_tour') { expect(subject.tour_ques_per_tour).to eq 0 }
20
+ specify('#tour_ques_per_tour') { expect(subject.tour_ques_per_tour).to be_nil }
21
21
  specify('#questions_total') { expect(subject.questions_total).to eq 48 }
22
22
  specify('#type_name') { expect(subject.type_name).to eq 'Обычный' }
23
23
  specify('#main_payment_value') { expect(subject.main_payment_value).to eq 660 }
24
+ specify('#main_payment_currency') { expect(subject.main_payment_currency).to eq 'руб' }
24
25
  specify('#discounted_payment_value') { expect(subject.discounted_payment_value).to eq 360 }
26
+ specify('#discounted_payment_currency') { expect(subject.discounted_payment_currency).to eq 'руб' }
25
27
  specify('#discounted_payment_reason') { expect(subject.discounted_payment_reason).to eq 'для детских команд; 480 - для студенческих' }
28
+ specify('#tournament_in_rating') { expect(subject.tournament_in_rating).to eq true }
26
29
  specify('#date_requests_allowed_to') { expect(subject.date_requests_allowed_to).to be_nil }
27
- specify('#comment') { expect(subject.comment).to eq '' }
30
+ specify('#comment') { expect(subject.comment).to be_nil }
28
31
  specify('#town') { expect(subject.town).to eq 'Пермь' }
29
32
  specify('#site_url') { expect(subject.site_url).to eq URI.parse('https://vk.com/chgk.perm.championship') }
30
33
  specify '#to_h' do
@@ -33,7 +36,7 @@ RSpec.describe ChgkRating::Models::Tournament do
33
36
  expect(tournament_h['date_end']).to eq '2015-11-08T18:00:00+00:00'
34
37
  expect(tournament_h['tour_count']).to eq '4'
35
38
  expect(tournament_h['tour_questions']).to eq '12'
36
- expect(tournament_h['tour_ques_per_tour']).to eq '0'
39
+ expect(tournament_h['tour_ques_per_tour']).to eq ''
37
40
  expect(tournament_h['questions_total']).to eq '48'
38
41
  expect(tournament_h['main_payment_value']).to eq '660.0'
39
42
  expect(tournament_h['discounted_payment_value']).to eq '360.0'
@@ -44,7 +47,7 @@ RSpec.describe ChgkRating::Models::Tournament do
44
47
  expect(tournament_h['long_name']).to eq 'XV Чемпионат Перми и Пермского края по игре "Что? Где? Когда?"'
45
48
  expect(tournament_h['type_name']).to eq 'Обычный'
46
49
  expect(tournament_h['discounted_payment_reason']).to eq 'для детских команд; 480 - для студенческих'
47
- expect(tournament_h['comment']).to eq ''
50
+ expect(tournament_h['comment']).to be_nil
48
51
  end
49
52
 
50
53
  specify '#eager_load!' do
@@ -89,4 +92,4 @@ RSpec.describe ChgkRating::Models::Tournament do
89
92
 
90
93
  it { expect(team_list).to be_an_instance_of ChgkRating::Collections::TournamentTeams }
91
94
  end
92
- end
95
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chgk_rating
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Bodrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2021-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday