wow_community_api 0.0.2 → 0.0.3
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.
- data/lib/wow_community_api/battle_net.rb +4 -0
- data/lib/wow_community_api/character.rb +0 -0
- data/lib/wow_community_api/guild.rb +0 -0
- data/lib/wow_community_api/realm.rb +0 -0
- data/lib/wow_community_api/version.rb +1 -1
- data/lib/wow_community_api.rb +1 -0
- data/spec/character_spec.rb +8 -0
- data/spec/fixtures/character-doe.json +11 -0
- data/spec/fixtures/guild-dmc.json +8 -0
- data/spec/fixtures/realms-aos.json +12 -0
- data/spec/guild_spec.rb +8 -0
- data/spec/realm_spec.rb +7 -0
- metadata +7 -1
File without changes
|
File without changes
|
File without changes
|
data/lib/wow_community_api.rb
CHANGED
data/spec/character_spec.rb
CHANGED
@@ -7,5 +7,13 @@ describe Character do
|
|
7
7
|
character = Character.find_by_realm_and_name("uther", "malkyth")
|
8
8
|
character.name.should == "Malkyth"
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'gets a character from a realm with spaces by realm and name' do
|
12
|
+
stub_json "http://us.battle.net/api/wow/character/altar of storms/johndoe", 'character-doe.json'
|
13
|
+
|
14
|
+
character = Character.find_by_realm_and_name('altar of storms', 'johndoe')
|
15
|
+
character.realm.should == 'Altar of Storms'
|
16
|
+
character.name.should == 'Johndoe'
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
data/spec/guild_spec.rb
CHANGED
@@ -7,5 +7,13 @@ describe Guild do
|
|
7
7
|
guild = Guild.find_by_realm_and_name("uther", "nova")
|
8
8
|
guild.name.should == "Nova"
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'gets a guild with spaces by realm and name' do
|
12
|
+
stub_json 'http://us.battle.net/api/wow/guild/altar of storms/devilsaur may cry', 'guild-dmc.json'
|
13
|
+
|
14
|
+
guild = Guild.find_by_realm_and_name('altar of storms', 'devilsaur may cry')
|
15
|
+
guild.realm.should == 'Altar of Storms'
|
16
|
+
guild.name.should == 'Devilsaur May Cry'
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
data/spec/realm_spec.rb
CHANGED
@@ -7,5 +7,12 @@ describe Realm do
|
|
7
7
|
realm = Realm.find_by_name("medivh")
|
8
8
|
realm.status.should be_true
|
9
9
|
end
|
10
|
+
|
11
|
+
it 'gets the status of a realm with spaces by name' do
|
12
|
+
stub_json 'http://us.battle.net/api/wow/realm/status?realms=altar of storms', 'realms-aos.json'
|
13
|
+
|
14
|
+
realm = Realm.find_by_name("altar of storms")
|
15
|
+
realm.status.should be_true
|
16
|
+
end
|
10
17
|
end
|
11
18
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wow_community_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- eddie cianci
|
@@ -71,8 +71,11 @@ files:
|
|
71
71
|
- lib/wow_community_api/version.rb
|
72
72
|
- spec/battle_net_spec.rb
|
73
73
|
- spec/character_spec.rb
|
74
|
+
- spec/fixtures/character-doe.json
|
74
75
|
- spec/fixtures/character.json
|
76
|
+
- spec/fixtures/guild-dmc.json
|
75
77
|
- spec/fixtures/guild.json
|
78
|
+
- spec/fixtures/realms-aos.json
|
76
79
|
- spec/fixtures/realms.json
|
77
80
|
- spec/guild_spec.rb
|
78
81
|
- spec/realm_spec.rb
|
@@ -109,8 +112,11 @@ summary: World of Warcraft Community Platform API
|
|
109
112
|
test_files:
|
110
113
|
- spec/battle_net_spec.rb
|
111
114
|
- spec/character_spec.rb
|
115
|
+
- spec/fixtures/character-doe.json
|
112
116
|
- spec/fixtures/character.json
|
117
|
+
- spec/fixtures/guild-dmc.json
|
113
118
|
- spec/fixtures/guild.json
|
119
|
+
- spec/fixtures/realms-aos.json
|
114
120
|
- spec/fixtures/realms.json
|
115
121
|
- spec/guild_spec.rb
|
116
122
|
- spec/realm_spec.rb
|