chgk_rating 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/CODE_OF_CONDUCT.md +46 -0
- data/.github/ISSUE_TEMPLATE.md +13 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- data/CHANGELOG.md +17 -0
- data/CONTRIBUTING.md +13 -0
- data/Gemfile +7 -0
- data/LICENSE +22 -0
- data/README.md +557 -0
- data/Rakefile +13 -0
- data/chgk_rating.gemspec +29 -0
- data/lib/chgk_rating.rb +53 -0
- data/lib/chgk_rating/attribute_mappings.rb +138 -0
- data/lib/chgk_rating/chgk_object.rb +13 -0
- data/lib/chgk_rating/client.rb +173 -0
- data/lib/chgk_rating/collections/base.rb +79 -0
- data/lib/chgk_rating/collections/players.rb +17 -0
- data/lib/chgk_rating/collections/ratings.rb +23 -0
- data/lib/chgk_rating/collections/recaps.rb +25 -0
- data/lib/chgk_rating/collections/teams.rb +17 -0
- data/lib/chgk_rating/collections/tournament_players.rb +24 -0
- data/lib/chgk_rating/collections/tournament_team_results.rb +24 -0
- data/lib/chgk_rating/collections/tournament_teams.rb +22 -0
- data/lib/chgk_rating/collections/tournaments.rb +47 -0
- data/lib/chgk_rating/concerns/searching.rb +21 -0
- data/lib/chgk_rating/connection.rb +19 -0
- data/lib/chgk_rating/error.rb +46 -0
- data/lib/chgk_rating/models/base.rb +90 -0
- data/lib/chgk_rating/models/player.rb +11 -0
- data/lib/chgk_rating/models/rating.rb +19 -0
- data/lib/chgk_rating/models/recap.rb +19 -0
- data/lib/chgk_rating/models/team.rb +62 -0
- data/lib/chgk_rating/models/tournament.rb +46 -0
- data/lib/chgk_rating/models/tournament_player.rb +8 -0
- data/lib/chgk_rating/models/tournament_team.rb +29 -0
- data/lib/chgk_rating/models/tournament_team_result.rb +8 -0
- data/lib/chgk_rating/request.rb +32 -0
- data/lib/chgk_rating/utils/snakecase.rb +16 -0
- data/lib/chgk_rating/utils/transformations.rb +83 -0
- data/lib/chgk_rating/version.rb +3 -0
- data/lib/ext/date.rb +11 -0
- data/lib/ext/date_time.rb +5 -0
- data/lib/ext/uri.rb +9 -0
- data/spec/lib/chgk_rating/client_spec.rb +198 -0
- data/spec/lib/chgk_rating/collections/players_spec.rb +45 -0
- data/spec/lib/chgk_rating/collections/ratings_spec.rb +25 -0
- data/spec/lib/chgk_rating/collections/recaps_spec.rb +21 -0
- data/spec/lib/chgk_rating/collections/teams_spec.rb +42 -0
- data/spec/lib/chgk_rating/collections/tournament_players_spec.rb +18 -0
- data/spec/lib/chgk_rating/collections/tournament_team_results_spec.rb +17 -0
- data/spec/lib/chgk_rating/collections/tournament_teams_spec.rb +58 -0
- data/spec/lib/chgk_rating/collections/tournaments_spec.rb +62 -0
- data/spec/lib/chgk_rating/models/base_spec.rb +34 -0
- data/spec/lib/chgk_rating/models/player_spec.rb +35 -0
- data/spec/lib/chgk_rating/models/rating_spec.rb +27 -0
- data/spec/lib/chgk_rating/models/recap_spec.rb +35 -0
- data/spec/lib/chgk_rating/models/team_spec.rb +89 -0
- data/spec/lib/chgk_rating/models/tournament_player_spec.rb +21 -0
- data/spec/lib/chgk_rating/models/tournament_spec.rb +92 -0
- data/spec/lib/chgk_rating/models/tournament_team_result_spec.rb +19 -0
- data/spec/lib/chgk_rating/models/tournament_team_spec.rb +36 -0
- data/spec/lib/chgk_rating/utils/snakecase_spec.rb +12 -0
- data/spec/lib/chgk_rating/utils/transformations_spec.rb +16 -0
- data/spec/lib/chgk_rating_spec.rb +5 -0
- data/spec/lib/ext/date_spec.rb +7 -0
- data/spec/lib/ext/date_time_spec.rb +11 -0
- data/spec/lib/ext/uri_spec.rb +7 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/support/shared_examples.rb +63 -0
- data/spec/support/test_client.rb +6 -0
- data/spec/support/vcr.rb +10 -0
- metadata +228 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
RSpec.describe ChgkRating::Models::TournamentPlayer do
|
2
|
+
subject do
|
3
|
+
VCR.use_cassette 'team_players_at_tournament' do
|
4
|
+
test_client.team_players_at_tournament(3506, 52853)[0]
|
5
|
+
end
|
6
|
+
end
|
7
|
+
let(:tournament_player_h) { subject.to_h }
|
8
|
+
|
9
|
+
it_behaves_like 'model without eager loading'
|
10
|
+
it_behaves_like 'model without lazy support'
|
11
|
+
it_behaves_like 'tournament team player' do
|
12
|
+
let(:player) { subject }
|
13
|
+
end
|
14
|
+
|
15
|
+
specify '#to_h' do
|
16
|
+
expect(tournament_player_h['idplayer']).to eq '51249'
|
17
|
+
expect(tournament_player_h['is_captain']).to eq '1'
|
18
|
+
expect(tournament_player_h['is_base']).to eq '1'
|
19
|
+
expect(tournament_player_h['is_foreign']).to eq '0'
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
RSpec.describe ChgkRating::Models::Tournament do
|
2
|
+
subject do
|
3
|
+
VCR.use_cassette 'tournament' do
|
4
|
+
described_class.new 3506
|
5
|
+
end
|
6
|
+
end
|
7
|
+
let(:lazy_tournament) { described_class.new 3506, lazy: true }
|
8
|
+
let(:tournament_h) { subject.to_h }
|
9
|
+
|
10
|
+
it_behaves_like 'model with eager loading'
|
11
|
+
it_behaves_like 'model with lazy support'
|
12
|
+
|
13
|
+
specify('#id') { expect(subject.id).to eq '3506' }
|
14
|
+
specify('#name') { expect(subject.name).to eq 'Чемпионат Перми и Пермского края' }
|
15
|
+
specify('#long_name') { expect(subject.long_name).to eq 'XV Чемпионат Перми и Пермского края по игре "Что? Где? Когда?"' }
|
16
|
+
specify('#date_start') { expect(subject.date_start).to eq DateTime.parse('2015-11-08 14:00:00') }
|
17
|
+
specify('#date_end') { expect(subject.date_end).to eq DateTime.parse('2015-11-08 18:00:00') }
|
18
|
+
specify('#tour_count') { expect(subject.tour_count).to eq 4 }
|
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 }
|
21
|
+
specify('#questions_total') { expect(subject.questions_total).to eq 48 }
|
22
|
+
specify('#type_name') { expect(subject.type_name).to eq 'Обычный' }
|
23
|
+
specify('#main_payment_value') { expect(subject.main_payment_value).to eq 660 }
|
24
|
+
specify('#discounted_payment_value') { expect(subject.discounted_payment_value).to eq 360 }
|
25
|
+
specify('#discounted_payment_reason') { expect(subject.discounted_payment_reason).to eq 'для детских команд; 480 - для студенческих' }
|
26
|
+
specify('#date_requests_allowed_to') { expect(subject.date_requests_allowed_to).to be_nil }
|
27
|
+
specify('#comment') { expect(subject.comment).to eq '' }
|
28
|
+
specify('#town') { expect(subject.town).to eq 'Пермь' }
|
29
|
+
specify('#site_url') { expect(subject.site_url).to eq URI.parse('https://vk.com/chgk.perm.championship') }
|
30
|
+
specify '#to_h' do
|
31
|
+
expect(tournament_h['idtournament']).to eq '3506'
|
32
|
+
expect(tournament_h['date_start']).to eq '2015-11-08T14:00:00+00:00'
|
33
|
+
expect(tournament_h['date_end']).to eq '2015-11-08T18:00:00+00:00'
|
34
|
+
expect(tournament_h['tour_count']).to eq '4'
|
35
|
+
expect(tournament_h['tour_questions']).to eq '12'
|
36
|
+
expect(tournament_h['tour_ques_per_tour']).to eq '0'
|
37
|
+
expect(tournament_h['questions_total']).to eq '48'
|
38
|
+
expect(tournament_h['main_payment_value']).to eq '660.0'
|
39
|
+
expect(tournament_h['discounted_payment_value']).to eq '360.0'
|
40
|
+
expect(tournament_h['date_requests_allowed_to']).to eq ''
|
41
|
+
expect(tournament_h['site_url']).to eq 'https://vk.com/chgk.perm.championship'
|
42
|
+
expect(tournament_h['name']).to eq 'Чемпионат Перми и Пермского края'
|
43
|
+
expect(tournament_h['town']).to eq 'Пермь'
|
44
|
+
expect(tournament_h['long_name']).to eq 'XV Чемпионат Перми и Пермского края по игре "Что? Где? Когда?"'
|
45
|
+
expect(tournament_h['type_name']).to eq 'Обычный'
|
46
|
+
expect(tournament_h['discounted_payment_reason']).to eq 'для детских команд; 480 - для студенческих'
|
47
|
+
expect(tournament_h['comment']).to eq ''
|
48
|
+
end
|
49
|
+
|
50
|
+
specify '#eager_load!' do
|
51
|
+
VCR.use_cassette 'tournament' do
|
52
|
+
lazy_tournament.eager_load!
|
53
|
+
end
|
54
|
+
expect(lazy_tournament.name).to eq 'Чемпионат Перми и Пермского края'
|
55
|
+
end
|
56
|
+
|
57
|
+
describe '#team_results' do
|
58
|
+
let(:team_results) do
|
59
|
+
VCR.use_cassette 'team_results_at_tournament' do
|
60
|
+
subject.team_results(52853)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
it { expect(team_results).to be_an_instance_of ChgkRating::Collections::TournamentTeamResults }
|
65
|
+
end
|
66
|
+
|
67
|
+
describe '#team_players' do
|
68
|
+
let(:players) do
|
69
|
+
VCR.use_cassette 'team_players_at_tournament' do
|
70
|
+
subject.team_players(52853)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
it { expect(players).to be_an_instance_of ChgkRating::Collections::TournamentPlayers }
|
75
|
+
end
|
76
|
+
|
77
|
+
describe '#team' do
|
78
|
+
let(:team) { subject.team 52853 }
|
79
|
+
|
80
|
+
it { expect(team).to be_an_instance_of ChgkRating::Models::TournamentTeam }
|
81
|
+
end
|
82
|
+
|
83
|
+
describe '#team_list' do
|
84
|
+
let(:team_list) do
|
85
|
+
VCR.use_cassette 'teams_at_tournament' do
|
86
|
+
subject.team_list
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
it { expect(team_list).to be_an_instance_of ChgkRating::Collections::TournamentTeams }
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
RSpec.describe ChgkRating::Models::TournamentTeamResult do
|
2
|
+
subject do
|
3
|
+
VCR.use_cassette 'team_results_at_tournament' do
|
4
|
+
test_client.team_results_at_tournament(3506, 52853)[0]
|
5
|
+
end
|
6
|
+
end
|
7
|
+
let(:tournament_team_result_h) { subject.to_h }
|
8
|
+
|
9
|
+
it_behaves_like 'model without eager loading'
|
10
|
+
it_behaves_like 'model without lazy support'
|
11
|
+
it_behaves_like 'tournament team result' do
|
12
|
+
let(:team_result) { subject }
|
13
|
+
end
|
14
|
+
|
15
|
+
specify '#to_h' do
|
16
|
+
expect(tournament_team_result_h['tour']).to eq '1'
|
17
|
+
expect(tournament_team_result_h['mask']).to eq %w(0 0 0 0 1 1 1 0 0 1 0 0)
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
RSpec.describe ChgkRating::Models::TournamentTeam do
|
2
|
+
# this is always a lazily-loaded object as
|
3
|
+
# we cannot get info about a specific team participating in a tournament!
|
4
|
+
subject { described_class.new '52853', tournament: '3506', lazy: true }
|
5
|
+
let(:tournament_team_h) { subject.to_h }
|
6
|
+
|
7
|
+
it_behaves_like 'model without eager loading'
|
8
|
+
it_behaves_like 'model with lazy support'
|
9
|
+
|
10
|
+
specify('#tournament') { expect(subject.tournament.id).to eq '3506' }
|
11
|
+
specify('#team') { expect(subject.team.id).to eq '52853' }
|
12
|
+
specify('#id') { expect(subject.id).to eq '52853' }
|
13
|
+
specify '#to_h' do
|
14
|
+
expect(tournament_team_h['idteam']).to eq '52853'
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '#players' do
|
18
|
+
let(:players) do
|
19
|
+
VCR.use_cassette 'team_players_at_tournament' do
|
20
|
+
subject.players
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it { expect(players).to be_an_instance_of ChgkRating::Collections::TournamentPlayers }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#results' do
|
28
|
+
let(:results) do
|
29
|
+
VCR.use_cassette 'team_results_at_tournament' do
|
30
|
+
subject.results
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
it { expect(results).to be_an_instance_of ChgkRating::Collections::TournamentTeamResults }
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
RSpec.describe String do
|
2
|
+
describe '#snakecase_upcase' do
|
3
|
+
let(:result) { 'SNAKE_CASE' }
|
4
|
+
|
5
|
+
it 'should convert the string properly' do
|
6
|
+
expect('SnakeCase'.snakecase_upcase).to eq result
|
7
|
+
expect('Snake-Case'.snakecase_upcase).to eq result
|
8
|
+
expect('Snake Case'.snakecase_upcase).to eq result
|
9
|
+
expect('Snake - Case'.snakecase_upcase).to eq result
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
RSpec.describe ChgkRating::Utils::Transformations do
|
2
|
+
specify '.to_boolean' do
|
3
|
+
expect(described_class.send(:to_boolean).call('1')).to eq(true)
|
4
|
+
expect(described_class.send(:to_boolean).call('0')).to eq(false)
|
5
|
+
end
|
6
|
+
|
7
|
+
specify '.to_binary_boolean' do
|
8
|
+
expect(described_class.send(:to_binary_boolean).call(true)).to eq('1')
|
9
|
+
expect(described_class.send(:to_binary_boolean).call(false)).to eq('0')
|
10
|
+
end
|
11
|
+
|
12
|
+
specify '.to_star' do
|
13
|
+
expect(described_class.send(:to_star, :to_i).call('1')).to eq(1)
|
14
|
+
expect(described_class.send(:to_star, :to_sym, true).call(%w(one two apple))).to eq(%i(one two apple))
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
RSpec.describe DateTime do
|
2
|
+
subject { DateTime.new(2018,01,24,16,58,34) }
|
3
|
+
|
4
|
+
specify '#to_s_chgk' do
|
5
|
+
expect(subject.to_s_chgk).to eq '2018-01-24 16:58:34'
|
6
|
+
end
|
7
|
+
|
8
|
+
specify '.parse_safely' do
|
9
|
+
expect(described_class.parse_safely('2017-09-28 12:00:33').to_s).to eq('2017-09-28T12:00:33+00:00')
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
RSpec.describe URI do
|
2
|
+
specify '.parse_safely' do
|
3
|
+
expect(described_class.parse_safely('http://example.com/test').to_s).to eq('http://example.com/test')
|
4
|
+
expect(described_class.parse_safely('gibberish').to_s).to eq 'gibberish'
|
5
|
+
expect(described_class.parse_safely(nil)).to be_nil
|
6
|
+
end
|
7
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start do
|
3
|
+
add_filter "spec/"
|
4
|
+
end
|
5
|
+
|
6
|
+
require 'chgk_rating'
|
7
|
+
|
8
|
+
# Support files
|
9
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.include TestClient
|
13
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
RSpec.shared_examples_for 'an array' do
|
2
|
+
it { is_expected.to respond_to :to_a }
|
3
|
+
end
|
4
|
+
|
5
|
+
RSpec.shared_examples_for 'not a hash' do
|
6
|
+
it { is_expected.not_to respond_to :to_h }
|
7
|
+
it { expect( -> {subject.to_h} ).to raise_error(ChgkRating::Error::NotHashType).
|
8
|
+
with_message('This is not a hash-like collection, so it cannot be converted to an ordinary hash.')}
|
9
|
+
end
|
10
|
+
|
11
|
+
RSpec.shared_examples_for 'not an array' do
|
12
|
+
it { is_expected.not_to respond_to :to_a }
|
13
|
+
it { expect( -> {subject.to_a} ).to raise_error(ChgkRating::Error::NotArrayType).
|
14
|
+
with_message('This is not an array-like collection, so it cannot be converted to an ordinary array.')}
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.shared_examples_for 'a hash' do
|
18
|
+
it { is_expected.to respond_to :to_h }
|
19
|
+
end
|
20
|
+
|
21
|
+
RSpec.shared_examples_for 'tournament team player' do
|
22
|
+
specify('#id') { expect(player.id).to eq '51249' }
|
23
|
+
specify('#is_captain') { expect(player.is_captain).to eq true }
|
24
|
+
specify('#is_base') { expect(player.is_base).to eq true }
|
25
|
+
specify('#is_foreign') { expect(player.is_foreign).to eq false }
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.shared_examples_for 'tournament team result' do
|
29
|
+
specify('#result') { expect(team_result.result).to eq [false, false, false, false, true, true,
|
30
|
+
true, false, false, true, false, false] }
|
31
|
+
specify('#tour') { expect(team_result.tour).to eq 1 }
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec.shared_examples_for 'model without eager loading' do
|
35
|
+
it 'should raise an EagerLoadingNotSupported error' do
|
36
|
+
expect( -> { subject.eager_load! }).to raise_error(ChgkRating::Error::EagerLoadingNotSupported).
|
37
|
+
with_message 'Eager loading is not supported for this resource.'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
RSpec.shared_examples_for 'model with eager loading' do
|
42
|
+
it 'should not raise an EagerLoadingNotSupported error' do
|
43
|
+
expect( -> { subject.eager_load! }).not_to raise_error
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
RSpec.shared_examples_for 'model without lazy support' do
|
48
|
+
it { is_expected.not_to respond_to(:lazy) }
|
49
|
+
|
50
|
+
it 'should define NO_LAZY_SUPPORT constant' do
|
51
|
+
expect(subject.class::NO_LAZY_SUPPORT).to eq true
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
RSpec.shared_examples_for 'model with lazy support' do
|
56
|
+
it { is_expected.to respond_to(:lazy) }
|
57
|
+
|
58
|
+
it 'should not define NO_LAZY_SUPPORT constant' do
|
59
|
+
klass = subject.class
|
60
|
+
expect( -> { klass::NO_LAZY_SUPPORT }).to raise_error(NameError).
|
61
|
+
with_message "uninitialized constant #{klass}::NO_LAZY_SUPPORT"
|
62
|
+
end
|
63
|
+
end
|
data/spec/support/vcr.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.ignore_hosts 'codeclimate.com'
|
5
|
+
c.hook_into :faraday
|
6
|
+
c.cassette_library_dir = File.join(File.dirname(__FILE__), '..', 'fixtures', 'vcr_cassettes')
|
7
|
+
c.before_record do |i|
|
8
|
+
i.response.body.force_encoding("UTF-8")
|
9
|
+
end
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chgk_rating
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ilya Bodrov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.13'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: multi_json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.12'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.12'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: vcr
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: codeclimate-test-reporter
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.0'
|
97
|
+
description: Opinionated Ruby client for the competitive What? Where? When? rating
|
98
|
+
WebAPI (rating.chgk.info) that allows to work with data as with Ruby objects
|
99
|
+
email:
|
100
|
+
- golosizpru@gmail.com
|
101
|
+
executables: []
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files:
|
104
|
+
- README.md
|
105
|
+
files:
|
106
|
+
- ".github/CODE_OF_CONDUCT.md"
|
107
|
+
- ".github/ISSUE_TEMPLATE.md"
|
108
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
109
|
+
- CHANGELOG.md
|
110
|
+
- CONTRIBUTING.md
|
111
|
+
- Gemfile
|
112
|
+
- LICENSE
|
113
|
+
- README.md
|
114
|
+
- Rakefile
|
115
|
+
- chgk_rating.gemspec
|
116
|
+
- lib/chgk_rating.rb
|
117
|
+
- lib/chgk_rating/attribute_mappings.rb
|
118
|
+
- lib/chgk_rating/chgk_object.rb
|
119
|
+
- lib/chgk_rating/client.rb
|
120
|
+
- lib/chgk_rating/collections/base.rb
|
121
|
+
- lib/chgk_rating/collections/players.rb
|
122
|
+
- lib/chgk_rating/collections/ratings.rb
|
123
|
+
- lib/chgk_rating/collections/recaps.rb
|
124
|
+
- lib/chgk_rating/collections/teams.rb
|
125
|
+
- lib/chgk_rating/collections/tournament_players.rb
|
126
|
+
- lib/chgk_rating/collections/tournament_team_results.rb
|
127
|
+
- lib/chgk_rating/collections/tournament_teams.rb
|
128
|
+
- lib/chgk_rating/collections/tournaments.rb
|
129
|
+
- lib/chgk_rating/concerns/searching.rb
|
130
|
+
- lib/chgk_rating/connection.rb
|
131
|
+
- lib/chgk_rating/error.rb
|
132
|
+
- lib/chgk_rating/models/base.rb
|
133
|
+
- lib/chgk_rating/models/player.rb
|
134
|
+
- lib/chgk_rating/models/rating.rb
|
135
|
+
- lib/chgk_rating/models/recap.rb
|
136
|
+
- lib/chgk_rating/models/team.rb
|
137
|
+
- lib/chgk_rating/models/tournament.rb
|
138
|
+
- lib/chgk_rating/models/tournament_player.rb
|
139
|
+
- lib/chgk_rating/models/tournament_team.rb
|
140
|
+
- lib/chgk_rating/models/tournament_team_result.rb
|
141
|
+
- lib/chgk_rating/request.rb
|
142
|
+
- lib/chgk_rating/utils/snakecase.rb
|
143
|
+
- lib/chgk_rating/utils/transformations.rb
|
144
|
+
- lib/chgk_rating/version.rb
|
145
|
+
- lib/ext/date.rb
|
146
|
+
- lib/ext/date_time.rb
|
147
|
+
- lib/ext/uri.rb
|
148
|
+
- spec/lib/chgk_rating/client_spec.rb
|
149
|
+
- spec/lib/chgk_rating/collections/players_spec.rb
|
150
|
+
- spec/lib/chgk_rating/collections/ratings_spec.rb
|
151
|
+
- spec/lib/chgk_rating/collections/recaps_spec.rb
|
152
|
+
- spec/lib/chgk_rating/collections/teams_spec.rb
|
153
|
+
- spec/lib/chgk_rating/collections/tournament_players_spec.rb
|
154
|
+
- spec/lib/chgk_rating/collections/tournament_team_results_spec.rb
|
155
|
+
- spec/lib/chgk_rating/collections/tournament_teams_spec.rb
|
156
|
+
- spec/lib/chgk_rating/collections/tournaments_spec.rb
|
157
|
+
- spec/lib/chgk_rating/models/base_spec.rb
|
158
|
+
- spec/lib/chgk_rating/models/player_spec.rb
|
159
|
+
- spec/lib/chgk_rating/models/rating_spec.rb
|
160
|
+
- spec/lib/chgk_rating/models/recap_spec.rb
|
161
|
+
- spec/lib/chgk_rating/models/team_spec.rb
|
162
|
+
- spec/lib/chgk_rating/models/tournament_player_spec.rb
|
163
|
+
- spec/lib/chgk_rating/models/tournament_spec.rb
|
164
|
+
- spec/lib/chgk_rating/models/tournament_team_result_spec.rb
|
165
|
+
- spec/lib/chgk_rating/models/tournament_team_spec.rb
|
166
|
+
- spec/lib/chgk_rating/utils/snakecase_spec.rb
|
167
|
+
- spec/lib/chgk_rating/utils/transformations_spec.rb
|
168
|
+
- spec/lib/chgk_rating_spec.rb
|
169
|
+
- spec/lib/ext/date_spec.rb
|
170
|
+
- spec/lib/ext/date_time_spec.rb
|
171
|
+
- spec/lib/ext/uri_spec.rb
|
172
|
+
- spec/spec_helper.rb
|
173
|
+
- spec/support/shared_examples.rb
|
174
|
+
- spec/support/test_client.rb
|
175
|
+
- spec/support/vcr.rb
|
176
|
+
homepage: https://github.com/bodrovis/chgk_rating
|
177
|
+
licenses:
|
178
|
+
- MIT
|
179
|
+
metadata: {}
|
180
|
+
post_install_message:
|
181
|
+
rdoc_options: []
|
182
|
+
require_paths:
|
183
|
+
- lib
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 2.4.0
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: 1.3.1
|
194
|
+
requirements: []
|
195
|
+
rubyforge_project:
|
196
|
+
rubygems_version: 2.7.6
|
197
|
+
signing_key:
|
198
|
+
specification_version: 4
|
199
|
+
summary: Ruby interface to the competitive What? Where? When? rating API
|
200
|
+
test_files:
|
201
|
+
- spec/lib/chgk_rating/client_spec.rb
|
202
|
+
- spec/lib/chgk_rating/collections/players_spec.rb
|
203
|
+
- spec/lib/chgk_rating/collections/ratings_spec.rb
|
204
|
+
- spec/lib/chgk_rating/collections/recaps_spec.rb
|
205
|
+
- spec/lib/chgk_rating/collections/teams_spec.rb
|
206
|
+
- spec/lib/chgk_rating/collections/tournaments_spec.rb
|
207
|
+
- spec/lib/chgk_rating/collections/tournament_players_spec.rb
|
208
|
+
- spec/lib/chgk_rating/collections/tournament_teams_spec.rb
|
209
|
+
- spec/lib/chgk_rating/collections/tournament_team_results_spec.rb
|
210
|
+
- spec/lib/chgk_rating/models/base_spec.rb
|
211
|
+
- spec/lib/chgk_rating/models/player_spec.rb
|
212
|
+
- spec/lib/chgk_rating/models/rating_spec.rb
|
213
|
+
- spec/lib/chgk_rating/models/recap_spec.rb
|
214
|
+
- spec/lib/chgk_rating/models/team_spec.rb
|
215
|
+
- spec/lib/chgk_rating/models/tournament_player_spec.rb
|
216
|
+
- spec/lib/chgk_rating/models/tournament_spec.rb
|
217
|
+
- spec/lib/chgk_rating/models/tournament_team_result_spec.rb
|
218
|
+
- spec/lib/chgk_rating/models/tournament_team_spec.rb
|
219
|
+
- spec/lib/chgk_rating/utils/snakecase_spec.rb
|
220
|
+
- spec/lib/chgk_rating/utils/transformations_spec.rb
|
221
|
+
- spec/lib/chgk_rating_spec.rb
|
222
|
+
- spec/lib/ext/date_spec.rb
|
223
|
+
- spec/lib/ext/date_time_spec.rb
|
224
|
+
- spec/lib/ext/uri_spec.rb
|
225
|
+
- spec/spec_helper.rb
|
226
|
+
- spec/support/shared_examples.rb
|
227
|
+
- spec/support/test_client.rb
|
228
|
+
- spec/support/vcr.rb
|