codeforces 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +8 -2
- data/README.md +36 -5
- data/Rakefile +17 -0
- data/codeforces.gemspec +14 -2
- data/lib/codeforces.rb +18 -1
- data/lib/codeforces/api.rb +25 -0
- data/lib/codeforces/api/contest.rb +44 -0
- data/lib/codeforces/api/problem_set.rb +38 -0
- data/lib/codeforces/api/user.rb +44 -0
- data/lib/codeforces/client.rb +81 -0
- data/lib/codeforces/helper.rb +15 -0
- data/lib/codeforces/models.rb +5 -0
- data/lib/codeforces/models/base.rb +14 -0
- data/lib/codeforces/models/submission.rb +27 -0
- data/lib/codeforces/version.rb +2 -1
- data/spec/api_fixtures/Codeforces_Client/_contest_hacks/hacks_374/.yml +10311 -0
- data/spec/api_fixtures/Codeforces_Client/_contest_list/list/.yml +2080 -0
- data/spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374/.yml +743 -0
- data/spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374_offset_1/.yml +707 -0
- data/spec/api_fixtures/Codeforces_Client/_contest_status/status_374/.yml +640 -0
- data/spec/api_fixtures/Codeforces_Client/_contest_status/status_374_offset_1/.yml +625 -0
- data/spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics/.yml +8435 -0
- data/spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_/.yml +1608 -0
- data/spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_implementation_/.yml +252 -0
- data/spec/api_fixtures/Codeforces_Client/_problemset_problems/problems/.yml +8435 -0
- data/spec/api_fixtures/Codeforces_Client/_problemset_recent_status/recent_status/.yml +614 -0
- data/spec/api_fixtures/Codeforces_Client/_user_info/info_test_tarou/.yml +49 -0
- data/spec/api_fixtures/Codeforces_Client/_user_rating/rating_Fefer_Ivan/.yml +260 -0
- data/spec/api_fixtures/Codeforces_Client/_user_status/status_Fefer_Ivan/.yml +635 -0
- data/spec/api_fixtures/Codeforces_Helper/_each_contest/.yml +2080 -0
- data/spec/api_fixtures/Codeforces_Helper/_each_contest/it_is_called_450_or_more_times.yml +2080 -0
- data/spec/api_fixtures/Codeforces_Helper/_each_status/first_user/.yml +664 -0
- data/spec/api_fixtures/Codeforces_Helper/_each_status/it_is_called_50_times.yml +614 -0
- data/spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_country/.yml +52 -0
- data/spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_rating/.yml +52 -0
- data/spec/client_spec.rb +178 -0
- data/spec/helper_spec.rb +47 -0
- data/spec/spec_helper.rb +36 -0
- metadata +131 -6
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://codeforces.com/api/user.info?handles=DmitriyH
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
base64_string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 30 Jan 2015 13:21:53 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
Content-Length:
|
28
|
+
- '304'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- 39ce7=CFuWBdeF; Expires=Wed, 11-Feb-2015 03:08:33 GMT; Path=/
|
33
|
+
- JSESSIONID=320BB7E11A4B48299708EEA77278FE69-n1; Path=/; HttpOnly
|
34
|
+
Cache-Control:
|
35
|
+
- private,no-cache,no-store,max-age=0,must-revalidate
|
36
|
+
Expires:
|
37
|
+
- "-1"
|
38
|
+
Pragma:
|
39
|
+
- no-cache
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
base64_string: |
|
43
|
+
eyJzdGF0dXMiOiJPSyIsInJlc3VsdCI6W3siaGFuZGxlIjoiRG1pdHJpeUgi
|
44
|
+
LCJmaXJzdE5hbWUiOiJEbWl0cml5IiwibGFzdE5hbWUiOiJLaG9keXJldiIs
|
45
|
+
ImNvdW50cnkiOiJSdXNzaWEiLCJjaXR5IjoiTW9zY293Iiwib3JnYW5pemF0
|
46
|
+
aW9uIjoiS0wiLCJjb250cmlidXRpb24iOjEzMCwicmFuayI6Im1hc3RlciIs
|
47
|
+
InJhdGluZyI6MTk0MSwibWF4UmFuayI6Im1hc3RlciIsIm1heFJhdGluZyI6
|
48
|
+
MTk0NywibGFzdE9ubGluZVRpbWVTZWNvbmRzIjoxNDIyNjE1NTc4LCJyZWdp
|
49
|
+
c3RyYXRpb25UaW1lU2Vjb25kcyI6MTI2ODU3MDMxMX1dfQ==
|
50
|
+
http_version:
|
51
|
+
recorded_at: Fri, 30 Jan 2015 13:21:53 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://codeforces.com/api/user.info?handles=DmitriyH
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
base64_string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Server:
|
22
|
+
- nginx/1.6.2
|
23
|
+
Date:
|
24
|
+
- Fri, 30 Jan 2015 13:21:52 GMT
|
25
|
+
Content-Type:
|
26
|
+
- application/json;charset=UTF-8
|
27
|
+
Content-Length:
|
28
|
+
- '304'
|
29
|
+
Connection:
|
30
|
+
- keep-alive
|
31
|
+
Set-Cookie:
|
32
|
+
- 39ce7=CF57BxYp; Expires=Wed, 11-Feb-2015 03:08:32 GMT; Path=/
|
33
|
+
- JSESSIONID=5F98B4BA6F68B0CE66F258EC9ABD4758-n1; Path=/; HttpOnly
|
34
|
+
Cache-Control:
|
35
|
+
- private,no-cache,no-store,max-age=0,must-revalidate
|
36
|
+
Expires:
|
37
|
+
- "-1"
|
38
|
+
Pragma:
|
39
|
+
- no-cache
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
base64_string: |
|
43
|
+
eyJzdGF0dXMiOiJPSyIsInJlc3VsdCI6W3siaGFuZGxlIjoiRG1pdHJpeUgi
|
44
|
+
LCJmaXJzdE5hbWUiOiJEbWl0cml5IiwibGFzdE5hbWUiOiJLaG9keXJldiIs
|
45
|
+
ImNvdW50cnkiOiJSdXNzaWEiLCJjaXR5IjoiTW9zY293Iiwib3JnYW5pemF0
|
46
|
+
aW9uIjoiS0wiLCJjb250cmlidXRpb24iOjEzMCwicmFuayI6Im1hc3RlciIs
|
47
|
+
InJhdGluZyI6MTk0MSwibWF4UmFuayI6Im1hc3RlciIsIm1heFJhdGluZyI6
|
48
|
+
MTk0NywibGFzdE9ubGluZVRpbWVTZWNvbmRzIjoxNDIyNjE1NTc4LCJyZWdp
|
49
|
+
c3RyYXRpb25UaW1lU2Vjb25kcyI6MTI2ODU3MDMxMX1dfQ==
|
50
|
+
http_version:
|
51
|
+
recorded_at: Fri, 30 Jan 2015 13:21:52 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Codeforces::Client, :vcr do
|
4
|
+
|
5
|
+
let!(:client) { Codeforces::Client.new }
|
6
|
+
# before { client.logger.level = ::Logger::DEBUG }
|
7
|
+
|
8
|
+
describe "#contest.hacks" do
|
9
|
+
|
10
|
+
context "hacks 374" do
|
11
|
+
subject! { client.api.contest.hacks 374 }
|
12
|
+
it { should be_a Array }
|
13
|
+
it { should_not be_empty }
|
14
|
+
it { expect(subject.map &:id).to include 88042 }
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#contest.list" do
|
20
|
+
|
21
|
+
context "list" do
|
22
|
+
subject! { client.api.contest.list }
|
23
|
+
it { should be_a Array }
|
24
|
+
it { expect(client.last_response.status).to eq 200 }
|
25
|
+
end
|
26
|
+
|
27
|
+
end # contest.list
|
28
|
+
|
29
|
+
describe "#contest.standings" do
|
30
|
+
|
31
|
+
context "standings 374" do
|
32
|
+
subject! { client.api.contest.standings 374 }
|
33
|
+
it { should be_a Array }
|
34
|
+
it { should_not be_empty }
|
35
|
+
it { expect(client.last_response.status).to eq 200 }
|
36
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
37
|
+
it { expect(subject.map &:rank).to include 1 }
|
38
|
+
it { expect(subject.map &:rank).to include 50 }
|
39
|
+
it { expect(subject.map &:rank).to_not include 51 }
|
40
|
+
end
|
41
|
+
|
42
|
+
context "standings 374, :offset => 1" do
|
43
|
+
subject! { client.api.contest.standings 374, :offset => 1 }
|
44
|
+
it { should be_a Array }
|
45
|
+
it { should_not be_empty }
|
46
|
+
it { expect(client.last_response.status).to eq 200 }
|
47
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
48
|
+
it { expect(subject.map &:rank).to_not include 1 }
|
49
|
+
it { expect(subject.map &:rank).to_not include 50 }
|
50
|
+
it { expect(subject.map &:rank).to include 51 }
|
51
|
+
end
|
52
|
+
|
53
|
+
end # contest.standings
|
54
|
+
|
55
|
+
describe "#contest.status" do
|
56
|
+
|
57
|
+
context "status 374" do
|
58
|
+
subject! { client.api.contest.status 374 }
|
59
|
+
it { should be_a Array }
|
60
|
+
it { should_not be_empty }
|
61
|
+
it { expect(client.last_response.status).to eq 200 }
|
62
|
+
it { expect(subject.map &:id).to include 9617687 }
|
63
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
64
|
+
end
|
65
|
+
|
66
|
+
context "status 374, :offset => 1" do
|
67
|
+
subject! { client.api.contest.status 374, :offset => 1 }
|
68
|
+
it { should be_a Array }
|
69
|
+
it { should_not be_empty }
|
70
|
+
it { expect(client.last_response.status).to eq 200 }
|
71
|
+
it { expect(subject.map &:id).to_not include 9617687 }
|
72
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
73
|
+
end
|
74
|
+
|
75
|
+
end # contest.status
|
76
|
+
|
77
|
+
describe "#problemset.problems" do
|
78
|
+
|
79
|
+
context "problems" do
|
80
|
+
subject! { client.api.problemset.problems }
|
81
|
+
it { should be_a Array }
|
82
|
+
it { should_not be_empty }
|
83
|
+
it { expect(client.last_response.status).to eq 200 }
|
84
|
+
it { expect(subject.map &:name).to include "Spreadsheet" }
|
85
|
+
it { expect(subject.map &:name).to include "Tic-tac-toe" }
|
86
|
+
end
|
87
|
+
|
88
|
+
end # problemset.problems
|
89
|
+
|
90
|
+
describe "#problemset.problem_statices" do
|
91
|
+
|
92
|
+
context "problem_statistics" do
|
93
|
+
subject! { client.api.problemset.problem_statistics }
|
94
|
+
it { should be_a Array }
|
95
|
+
it { should_not be_empty }
|
96
|
+
it { expect(client.last_response.status).to eq 200 }
|
97
|
+
it { expect(subject.select {|x| x.contestId === 1 && x.index === "B" }.first.solvedCount).to be > 4000 }
|
98
|
+
end
|
99
|
+
|
100
|
+
context "problem_statistics :query => { :tags => [dp] }" do
|
101
|
+
subject! { client.api.problemset.problem_statistics :query => { :tags => ["dp"] } }
|
102
|
+
it { should be_a Array }
|
103
|
+
it { should_not be_empty }
|
104
|
+
it { expect(client.last_response.status).to eq 200 }
|
105
|
+
it { expect(subject.select {|x| x.contestId === 1 && x.index === "B" }).to be_empty }
|
106
|
+
it { expect(subject.select {|x| x.contestId === 507 && x.index === "D" }.first.solvedCount).to be > 400 }
|
107
|
+
end
|
108
|
+
|
109
|
+
context "problem_statistics :query => { :tags => [dp, implementation] }" do
|
110
|
+
subject! { client.api.problemset.problem_statistics :query => { :tags => ["dp", "implementation"] } }
|
111
|
+
it { should be_a Array }
|
112
|
+
it { should_not be_empty }
|
113
|
+
it { expect(client.last_response.status).to eq 200 }
|
114
|
+
it { expect(subject.select {|x| x.contestId === 1 && x.index === "B" }).to be_empty }
|
115
|
+
it { expect(subject.select {|x| x.contestId === 507 && x.index === "D" }.first.solvedCount).to be > 400 }
|
116
|
+
end
|
117
|
+
|
118
|
+
end # problemset.problems
|
119
|
+
|
120
|
+
describe "#problemset.recent_status" do
|
121
|
+
|
122
|
+
context "recent_status" do
|
123
|
+
subject! { client.api.problemset.recent_status }
|
124
|
+
it { should be_a Array }
|
125
|
+
it { should_not be_empty }
|
126
|
+
it { expect(client.last_response.status).to eq 200 }
|
127
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
128
|
+
end
|
129
|
+
|
130
|
+
end # problemset.recent_status
|
131
|
+
|
132
|
+
describe "#user.info" do
|
133
|
+
|
134
|
+
context "info test_tarou" do
|
135
|
+
subject! { client.api.user.info "test_tarou" }
|
136
|
+
it { should be_a Array }
|
137
|
+
it { should_not be_empty }
|
138
|
+
it { expect(client.last_response.status).to eq 200 }
|
139
|
+
it { expect(subject.length).to eq 1 }
|
140
|
+
it { expect(subject.first.handle).to eq "test_tarou" }
|
141
|
+
end
|
142
|
+
|
143
|
+
context "rated_list" do
|
144
|
+
subject! { client.api.user.rated_list }
|
145
|
+
it { should be_a Array }
|
146
|
+
it { should_not be_empty }
|
147
|
+
it { expect(client.last_response.status).to eq 200 }
|
148
|
+
it { expect(subject.map &:handle).to include "tourist" }
|
149
|
+
it { expect(subject.map &:handle).to_not include "test_tarou" }
|
150
|
+
end
|
151
|
+
|
152
|
+
end # user.info
|
153
|
+
|
154
|
+
describe "#user.rating" do
|
155
|
+
|
156
|
+
context "rating Fefer_Ivan" do
|
157
|
+
subject! { client.api.user.rating "Fefer_Ivan" }
|
158
|
+
it { should be_a Array }
|
159
|
+
it { should_not be_empty }
|
160
|
+
it { expect(client.last_response.status).to eq 200 }
|
161
|
+
it { expect(subject.map &:contestName).to include "Codeforces Round #109 (Div. 1)" }
|
162
|
+
end
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
describe "#user.status" do
|
167
|
+
|
168
|
+
context "status Fefer_Ivan" do
|
169
|
+
subject! { client.api.user.status "Fefer_Ivan" }
|
170
|
+
it { should be_a Array }
|
171
|
+
it { should_not be_empty }
|
172
|
+
it { expect(client.last_response.status).to eq 200 }
|
173
|
+
it { expect(subject.length).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT }
|
174
|
+
end
|
175
|
+
|
176
|
+
end
|
177
|
+
|
178
|
+
end # Codeforces::Client
|
data/spec/helper_spec.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Codeforces::Helper, :vcr => true do
|
4
|
+
|
5
|
+
let!(:client) { Codeforces::Client.new }
|
6
|
+
|
7
|
+
describe "#each_contest" do
|
8
|
+
|
9
|
+
example "it is called 450 or more times" do
|
10
|
+
cnt = 0
|
11
|
+
client.each_contest { cnt += 1 }
|
12
|
+
expect(cnt).to be > 450
|
13
|
+
end
|
14
|
+
|
15
|
+
it { expect(client.each_contest.map &:name).to include "Codeforces Beta Round #2" }
|
16
|
+
|
17
|
+
end # each_contest
|
18
|
+
|
19
|
+
describe "#user" do
|
20
|
+
|
21
|
+
context "user(DmitriyH).rating" do
|
22
|
+
subject! { client.user("DmitriyH").rating }
|
23
|
+
it { should eq 1941 }
|
24
|
+
end
|
25
|
+
|
26
|
+
context "user(DmitriyH).country" do
|
27
|
+
subject! { client.user("DmitriyH").country }
|
28
|
+
it { should eq "Russia" }
|
29
|
+
end
|
30
|
+
|
31
|
+
end # user
|
32
|
+
|
33
|
+
describe "#each_status" do
|
34
|
+
|
35
|
+
example "it is called #{::Codeforces::Client::DEFAULT_PAGE_COUNT} times" do
|
36
|
+
cnt = 0
|
37
|
+
client.each_status { cnt += 1 }
|
38
|
+
expect(cnt).to eq ::Codeforces::Client::DEFAULT_PAGE_COUNT
|
39
|
+
end
|
40
|
+
|
41
|
+
context "first user" do
|
42
|
+
it { expect(client.each_status.first.user.handle).to be_a(String) }
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "codeforces"
|
3
|
+
|
4
|
+
require "vcr"
|
5
|
+
VCR.configure do |conf|
|
6
|
+
conf.cassette_library_dir = "spec/api_fixtures"
|
7
|
+
conf.hook_into :webmock
|
8
|
+
conf.configure_rspec_metadata!
|
9
|
+
conf.preserve_exact_body_bytes { true }
|
10
|
+
conf.default_cassette_options = {
|
11
|
+
:serialize_with => :psych,
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
require "webmock"
|
16
|
+
RSpec.configure do |conf|
|
17
|
+
|
18
|
+
conf.before do
|
19
|
+
WebMock.stub_request(
|
20
|
+
:get,
|
21
|
+
"http://codeforces.com/api/user.ratedList",
|
22
|
+
).to_return(
|
23
|
+
:status => 200,
|
24
|
+
:body => '{"status":"OK","result":[{"handle":"tourist","firstName":"Gennady","lastName":"Korotkevich","country":"Belarus","city":"Gomel","organization":"NRU ITMO","contribution":33,"rank":"international grandmaster","rating":3254,"maxRank":"international grandmaster","maxRating":3299,"lastOnlineTimeSeconds":1422146844,"registrationTimeSeconds":1265987288},{"handle":"Petr","firstName":"Petr","lastName":"Mitrichev","country":"Russia","city":"Moscow","organization":"Google","contribution":143,"rank":"international grandmaster","rating":2893,"maxRank":"international grandmaster","maxRating":3002,"lastOnlineTimeSeconds":1422429465,"registrationTimeSeconds":1267103024},{"handle":"yeputons","firstName":"Egor","lastName":"Suvorov","country":"Russia","city":"Saint Petersburg","organization":"Saint-Petersburg SU","contribution":114,"rank":"international grandmaster","rating":2742,"maxRank":"international grandmaster","maxRating":2773,"lastOnlineTimeSeconds":1422572943,"registrationTimeSeconds":1270712095},{"handle":"subscriber","firstName":"Adam","lastName":"Bardashevich","country":"Belarus","city":"BLR","organization":"NRU ITMO","contribution":35,"rank":"international grandmaster","rating":2685,"maxRank":"international grandmaster","maxRating":2685,"lastOnlineTimeSeconds":1422600030,"registrationTimeSeconds":1270566853}]}',
|
25
|
+
:headers => {
|
26
|
+
"Content-Type" => "application/json",
|
27
|
+
},
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
if ENV["CODEFORCES_DEBUG"] === "yes"
|
34
|
+
require "byebug"
|
35
|
+
end
|
36
|
+
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeforces
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki Sano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sawyer
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: addressable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.3.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.3.6
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: bundler
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +66,48 @@ dependencies:
|
|
38
66
|
- - ~>
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: vcr
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
41
111
|
description:
|
42
112
|
email:
|
43
113
|
- sh19910711@gmail.com
|
@@ -53,8 +123,40 @@ files:
|
|
53
123
|
- Rakefile
|
54
124
|
- codeforces.gemspec
|
55
125
|
- lib/codeforces.rb
|
126
|
+
- lib/codeforces/api.rb
|
127
|
+
- lib/codeforces/api/contest.rb
|
128
|
+
- lib/codeforces/api/problem_set.rb
|
129
|
+
- lib/codeforces/api/user.rb
|
130
|
+
- lib/codeforces/client.rb
|
131
|
+
- lib/codeforces/helper.rb
|
132
|
+
- lib/codeforces/models.rb
|
133
|
+
- lib/codeforces/models/base.rb
|
134
|
+
- lib/codeforces/models/submission.rb
|
56
135
|
- lib/codeforces/version.rb
|
57
|
-
|
136
|
+
- spec/api_fixtures/Codeforces_Client/_contest_hacks/hacks_374/.yml
|
137
|
+
- spec/api_fixtures/Codeforces_Client/_contest_list/list/.yml
|
138
|
+
- spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374/.yml
|
139
|
+
- spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374_offset_1/.yml
|
140
|
+
- spec/api_fixtures/Codeforces_Client/_contest_status/status_374/.yml
|
141
|
+
- spec/api_fixtures/Codeforces_Client/_contest_status/status_374_offset_1/.yml
|
142
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics/.yml
|
143
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_/.yml
|
144
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_implementation_/.yml
|
145
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problems/problems/.yml
|
146
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_recent_status/recent_status/.yml
|
147
|
+
- spec/api_fixtures/Codeforces_Client/_user_info/info_test_tarou/.yml
|
148
|
+
- spec/api_fixtures/Codeforces_Client/_user_rating/rating_Fefer_Ivan/.yml
|
149
|
+
- spec/api_fixtures/Codeforces_Client/_user_status/status_Fefer_Ivan/.yml
|
150
|
+
- spec/api_fixtures/Codeforces_Helper/_each_contest/.yml
|
151
|
+
- spec/api_fixtures/Codeforces_Helper/_each_contest/it_is_called_450_or_more_times.yml
|
152
|
+
- spec/api_fixtures/Codeforces_Helper/_each_status/first_user/.yml
|
153
|
+
- spec/api_fixtures/Codeforces_Helper/_each_status/it_is_called_50_times.yml
|
154
|
+
- spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_country/.yml
|
155
|
+
- spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_rating/.yml
|
156
|
+
- spec/client_spec.rb
|
157
|
+
- spec/helper_spec.rb
|
158
|
+
- spec/spec_helper.rb
|
159
|
+
homepage: https://github.com/sh19910711/codeforces-api-client
|
58
160
|
licenses:
|
59
161
|
- MIT
|
60
162
|
metadata: {}
|
@@ -66,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
168
|
requirements:
|
67
169
|
- - ! '>='
|
68
170
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
171
|
+
version: 1.9.3
|
70
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
173
|
requirements:
|
72
174
|
- - ! '>='
|
@@ -77,5 +179,28 @@ rubyforge_project:
|
|
77
179
|
rubygems_version: 2.4.5
|
78
180
|
signing_key:
|
79
181
|
specification_version: 4
|
80
|
-
summary:
|
81
|
-
test_files:
|
182
|
+
summary: The wrapper library for Codeforces API.
|
183
|
+
test_files:
|
184
|
+
- spec/api_fixtures/Codeforces_Client/_contest_hacks/hacks_374/.yml
|
185
|
+
- spec/api_fixtures/Codeforces_Client/_contest_list/list/.yml
|
186
|
+
- spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374/.yml
|
187
|
+
- spec/api_fixtures/Codeforces_Client/_contest_standings/standings_374_offset_1/.yml
|
188
|
+
- spec/api_fixtures/Codeforces_Client/_contest_status/status_374/.yml
|
189
|
+
- spec/api_fixtures/Codeforces_Client/_contest_status/status_374_offset_1/.yml
|
190
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics/.yml
|
191
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_/.yml
|
192
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problem_statices/problem_statistics_query_tags_dp_implementation_/.yml
|
193
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_problems/problems/.yml
|
194
|
+
- spec/api_fixtures/Codeforces_Client/_problemset_recent_status/recent_status/.yml
|
195
|
+
- spec/api_fixtures/Codeforces_Client/_user_info/info_test_tarou/.yml
|
196
|
+
- spec/api_fixtures/Codeforces_Client/_user_rating/rating_Fefer_Ivan/.yml
|
197
|
+
- spec/api_fixtures/Codeforces_Client/_user_status/status_Fefer_Ivan/.yml
|
198
|
+
- spec/api_fixtures/Codeforces_Helper/_each_contest/.yml
|
199
|
+
- spec/api_fixtures/Codeforces_Helper/_each_contest/it_is_called_450_or_more_times.yml
|
200
|
+
- spec/api_fixtures/Codeforces_Helper/_each_status/first_user/.yml
|
201
|
+
- spec/api_fixtures/Codeforces_Helper/_each_status/it_is_called_50_times.yml
|
202
|
+
- spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_country/.yml
|
203
|
+
- spec/api_fixtures/Codeforces_Helper/_user/user_DmitriyH_rating/.yml
|
204
|
+
- spec/client_spec.rb
|
205
|
+
- spec/helper_spec.rb
|
206
|
+
- spec/spec_helper.rb
|