open_dota_api 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f1aa1a3615806b9ced4b81166a223591f213f18
4
- data.tar.gz: de91e76a04f9ea774b5ae0592f76a7b0d5535b5b
3
+ metadata.gz: 9fd8e0b3555273f2ed07bb2238decca23d798311
4
+ data.tar.gz: aaa37855c1be5e817d30cee53eee469394c2b5c9
5
5
  SHA512:
6
- metadata.gz: 22a02651c1cf61c12b32424e8b4a47864a72d1777eccf5334accd14f27aaab3af3e7bebcd093606f7622427f4e8ed5c4ab7563a9da822a9a68d8c866cf76c07f
7
- data.tar.gz: 9752fd7af401eb54f254956ef3691c81e447e0501e8c742d8b7c2ec4b3980f6e6b7789c2ef9fe3f79ca4d87206ee87758a243836d375d2a35fc278e8a32681d7
6
+ metadata.gz: 9feba2d2c0d3f6b275e5583a4a34a44eda25c5f089cc720a16c6bb1e6e14413a4148c8309f29a1a02eef35230440af9dcc2c3c037314db28f447edf931c26760
7
+ data.tar.gz: 4d80c774c1a7ec145791914cf66aef85f38a543ef38eca537938ed7b21c8c06eb8472b3ba36c97e4726a67d2fd387473c4ca73ed7b300bad678e997ae6cdf2ed
@@ -69,6 +69,14 @@ module OpenDotaApi
69
69
  Player.instantiate(data['players'])
70
70
  end
71
71
 
72
+ def radiant_score
73
+ data['radiant_score']
74
+ end
75
+
76
+ def dire_score
77
+ data['dire_score']
78
+ end
79
+
72
80
  class Player < Matches::Player; end
73
81
  end
74
82
  end
@@ -1,3 +1,3 @@
1
1
  module OpenDotaApi
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
@@ -17,6 +17,8 @@ describe OpenDotaApi::Match do
17
17
  let(:replay_salt) { 565_926_067 }
18
18
  let(:replay_url) { 'http://replay136.valve.net/570/3149215336_565926067.dem.bz2' }
19
19
  let(:players_length) { 10 }
20
+ let(:radiant_score) { 27 }
21
+ let(:dire_score) { 29 }
20
22
  let(:player_class) { OpenDotaApi::Match::Player }
21
23
 
22
24
  let(:match_file) { File.read('spec/data/match.json') }
@@ -96,6 +98,14 @@ describe OpenDotaApi::Match do
96
98
  expect(match.players.length).to eq players_length
97
99
  expect(match.players.all? { |player| player.is_a? player_class }).to be_truthy
98
100
  end
101
+
102
+ it 'returns radiant score' do
103
+ expect(match.radiant_score).to eq radiant_score
104
+ end
105
+
106
+ it 'returns dire score' do
107
+ expect(match.dire_score).to eq dire_score
108
+ end
99
109
  end
100
110
  end
101
111
 
@@ -115,6 +125,8 @@ describe OpenDotaApi::Match do
115
125
  let(:replay_salt) { 120_334_496 }
116
126
  let(:replay_url) { 'http://replay192.valve.net/570/3344092796_120334496.dem.bz2' }
117
127
  let(:players_length) { 10 }
128
+ let(:radiant_score) { 29 }
129
+ let(:dire_score) { 32 }
118
130
  let(:player_class) { OpenDotaApi::Match::Player }
119
131
 
120
132
  let(:match_file) { File.read('spec/data/unofficial_match.json') }
@@ -190,6 +202,14 @@ describe OpenDotaApi::Match do
190
202
  expect(match.replay_url).to eq replay_url
191
203
  end
192
204
 
205
+ it 'returns radiant score' do
206
+ expect(match.radiant_score).to eq radiant_score
207
+ end
208
+
209
+ it 'returns dire score' do
210
+ expect(match.dire_score).to eq dire_score
211
+ end
212
+
193
213
  it 'returns players' do
194
214
  expect(match.players.length).to eq players_length
195
215
  expect(match.players.all? { |player| player.is_a? player_class }).to be_truthy
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_dota_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Oslavskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2017-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty