open_dota_api 0.3.0 → 0.3.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b3fb07b5b8dff4bb3ad89a8d3f7564aa9af5e66
|
4
|
+
data.tar.gz: 5aaafc7b6a1d5aa5ffa39d01aa4a510b53a52b2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b77d3d1701b986a56004a2204e6bba657cae959aa82dbb303935cf195bcdf595056205689278d5644728b17af9eafad107c770e499109518ae4bb47368d3f1e
|
7
|
+
data.tar.gz: 58b5cf4b4a761c6f2dbb026a77b7c67e82ffe1fbacd9efb3475d61196fec146c08488c0b6b1ba3dc4be9e5fcfb882f024c2b6ef170e9275ee4b1e3c31120588e
|
@@ -7,7 +7,7 @@ module OpenDotaApi
|
|
7
7
|
def self.instantiate(_ = nil)
|
8
8
|
raise NotImplementedError
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
def self.query_params(league_id)
|
12
12
|
{
|
13
13
|
sql: "SELECT matches.match_id FROM matches WHERE matches.leagueid = #{league_id} ORDER BY matches.match_id LIMIT 20000"
|
@@ -15,7 +15,7 @@ module OpenDotaApi
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def league_matches_ids
|
18
|
-
data['rows'].map
|
18
|
+
data['rows'].map { |obj| obj['match_id'] }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -114,14 +114,6 @@ describe OpenDotaApi::Client do
|
|
114
114
|
it 'returns array of match ids' do
|
115
115
|
expect(client.explorer(league_id).league_matches_ids.kind_of? Array).to be_truthy
|
116
116
|
end
|
117
|
-
|
118
|
-
context 'league id is missing' do
|
119
|
-
let(:league_id) { nil }
|
120
|
-
|
121
|
-
it 'returns array of match ids' do
|
122
|
-
expect(client.explorer(league_id).league_matches_ids.kind_of? Array).to be_truthy
|
123
|
-
end
|
124
|
-
end
|
125
117
|
end
|
126
118
|
end
|
127
119
|
end
|
@@ -19,10 +19,6 @@ describe OpenDotaApi::Explorer do
|
|
19
19
|
expect(explorer).to be_a OpenDotaApi::Entity
|
20
20
|
end
|
21
21
|
|
22
|
-
it 'is not instantiable' do
|
23
|
-
expect { described_class.instantiate }.to raise_error NotImplementedError
|
24
|
-
end
|
25
|
-
|
26
22
|
describe 'default attributes' do
|
27
23
|
it "returns league's matches ids" do
|
28
24
|
expect(explorer.league_matches_ids).to match_array(match_ids)
|