mywowarmory-ruby 0.1.4 → 0.1.5

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
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)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mywowarmory-ruby}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Benjamin Wong"]
@@ -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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Wong