dotka 1.2.0 → 1.2.1

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: a12f5de9292601e9c35cd960179769224679b5a3
4
- data.tar.gz: ef9ddb9671d7d237a2785c61dd01499de0052a21
3
+ metadata.gz: 916ae98d5e10fa7638d045218510d93d81c28cb9
4
+ data.tar.gz: 0bc9dbfee7c141488c5804c72d8b0cd86418b4ce
5
5
  SHA512:
6
- metadata.gz: b3491de4e7fc2a2451067eb021b991f7a5744e0435184a9ea1fc58b5ffe8d5795405593dd2e80107ac418d61dc93423aa3c011b7d4202e246f63904dd9edd411
7
- data.tar.gz: 5ab8f9675b6dd8b44a82d42683aa7514226b67e2817c35a012046b396309a3586320226a6052249596e2132a21487e687cb5bfaa415a58c2c684dc37544c9c6a
6
+ metadata.gz: 93a9ffaf034b526f0d653177e97068b00ea6679dc7dab333d44df3fb289194ef59a13c1fc00ace484f91a171c0afe339b9b1ee013f8bc984e6471f8b04766a8c
7
+ data.tar.gz: ec6e797f058e2f49288258861cf9df1bd307da722cd7ef25e02e1f1d302b73a72ee51808a36b8af9b4efe16e2bb707f518cd1e0eb79db80fd4ede15f147371f5
@@ -39,7 +39,7 @@ class Dotka
39
39
 
40
40
  # Rather than updating the gemspec every time.
41
41
  def self.version
42
- "1.2.0"
42
+ "1.2.1"
43
43
  end
44
44
 
45
45
  end
@@ -41,10 +41,9 @@ module DotkaM
41
41
  end
42
42
 
43
43
  # API limitation workaround
44
- def load_player_info dotka
44
+ def load_info dotka
45
45
  raise "Expected an instance of Dotka." unless dotka.is_a? Dotka
46
- @raw["players"] = dotka.match(self.id).raw["players"]
47
- self
46
+ @raw = dotka.match(self.id).raw
48
47
  end
49
48
 
50
49
  end
@@ -9,7 +9,7 @@ RSpec.describe DotkaM::Match do
9
9
  "players" => [
10
10
  {"account_id" => "1"}
11
11
  ],
12
- "radiant_win" => false,
12
+ "radiant_win" => true,
13
13
  "duration" => "3600",
14
14
  "start_time" => "123456789",
15
15
  "lobby_type" => "0",
@@ -22,7 +22,7 @@ RSpec.describe DotkaM::Match do
22
22
  expect(@match.id).to eq(123456789)
23
23
  expect(@match.players.first.account_id).to eq(1)
24
24
  expect(@match.player(1).account_id).to eq(1)
25
- expect(@match.winner).to eq("dire")
25
+ expect(@match.winner).to eq("radiant")
26
26
  expect(@match.duration).to eq(3600)
27
27
  expect(@match.start_time).to eq(123456789)
28
28
  expect(@match.lobby.localized_name).to eq("Public matchmaking")
@@ -30,12 +30,12 @@ RSpec.describe DotkaM::Match do
30
30
  expect(@match.region.localized_name).to eq("US West")
31
31
  end
32
32
 
33
- it "provides an API limitation workaround for players info" do
33
+ it "provides an API limitation workaround" do
34
34
  dotka = Dotka.new
35
35
  allow(dotka).to receive("match")
36
36
  .with(123456789)
37
37
  .and_return DotkaM::Match.new({"players" => [{"account_id" => 1234}]})
38
- @match.load_player_info dotka
38
+ @match.load_info dotka
39
39
  expect(@match.players.first.account_id).to eq(1234)
40
40
  end
41
41
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - bound1ess