mywowarmory-ruby 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mywowarmory.rb +2 -1
- data/mywowarmory-ruby.gemspec +1 -1
- data/test/test_mywowarmory.rb +10 -7
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/mywowarmory.rb
CHANGED
@@ -18,7 +18,8 @@ class MyWoWArmory
|
|
18
18
|
name = URI::encode(character_name)
|
19
19
|
# self.class.get("/api/profiles/#{country}/#{realm.tr('^a-zA-Z','-').downcase}/#{name}.json", options).parsed_response
|
20
20
|
|
21
|
-
realm = WowCommunityApi::Realm.find_by_name(realm).slug
|
21
|
+
# realm = WowCommunityApi::Realm.find_by_name(realm).slug # Bug for WowCommunityApi...
|
22
|
+
realm = WowCommunityApi::Realm.find_all.select{|r| r.name == realm}.first.slug
|
22
23
|
|
23
24
|
options.merge!(:query => {:name => character_name, :server => realm, :country => country})
|
24
25
|
MultiJson.decode(self.class.get("/api/getprofile.php", options).parsed_response)
|
data/mywowarmory-ruby.gemspec
CHANGED
data/test/test_mywowarmory.rb
CHANGED
@@ -7,13 +7,16 @@ class TestMywowarmory < Test::Unit::TestCase
|
|
7
7
|
|
8
8
|
should "get profile" do
|
9
9
|
api = MyWoWArmory.new
|
10
|
-
response = api.get_profile('us','kul-tiras','gary')
|
11
|
-
puts response.inspect
|
12
|
-
response = api.get_profile('us','Tichondrius','Slapshøt')
|
13
|
-
puts response.inspect
|
14
|
-
response = api.get_profile("us", "Mal'Ganis", 'gary')
|
15
|
-
puts response.inspect
|
16
|
-
response = api.get_profile("us", "Kel'Thuzad", 'Chaoticblade')
|
10
|
+
# response = api.get_profile('us','kul-tiras','gary')
|
11
|
+
# puts response.inspect
|
12
|
+
# response = api.get_profile('us','Tichondrius','Slapshøt')
|
13
|
+
# puts response.inspect
|
14
|
+
# response = api.get_profile("us", "Mal'Ganis", 'gary')
|
15
|
+
# puts response.inspect
|
16
|
+
# response = api.get_profile("us", "Kel'Thuzad", 'Chaoticblade')
|
17
|
+
# puts response.inspect
|
18
|
+
|
19
|
+
response = api.get_profile "us","Lightning's Blade","Bools"
|
17
20
|
puts response.inspect
|
18
21
|
end
|
19
22
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mywowarmory-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Benjamin Wong
|