mywowarmory-ruby 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9
data/lib/mywowarmory.rb CHANGED
@@ -19,8 +19,8 @@ class MyWoWArmory
19
19
  name = URI::encode(URI::decode(character_name))
20
20
 
21
21
  # Check the realm
22
- realm_response = HTTParty.get("http://#{country}.battle.net/api/wow/realm/status", :query => {:realms => URI.encode(realm)} ).parsed_response
23
- realm = realm_response['realms'].select{|r| r['name'] == realm}.first['slug']
22
+ # realm_response = HTTParty.get("http://#{country}.battle.net/api/wow/realm/status", :query => {:realms => URI.encode(realm)} ).parsed_response
23
+ # realm = realm_response['realms'].select{|r| r['name'] == realm}.first['slug']
24
24
 
25
25
  query = {:name => character_name, :server => realm, :country => country}
26
26
  query.merge!(:style => options[:style]) if options[:style].present?
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mywowarmory-ruby}
8
- s.version = "0.1.8"
8
+ s.version = "0.1.9"
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"]
12
- s.date = %q{2011-09-30}
12
+ s.date = %q{2011-10-02}
13
13
  s.description = %q{This library uses HTTParty to provide simple, reliable access to the MyWoWArmory API. Good for building reporting scripts and simple apps. Note that this library does not support the complete MyWoWArmory API at this time. See Features/Issues below for details. }
14
14
  s.email = %q{tkwong@railsant.com}
15
15
  s.extra_rdoc_files = [
@@ -1,4 +1,5 @@
1
1
  require 'helper'
2
+ require 'iconv'
2
3
 
3
4
  class TestMywowarmory < Test::Unit::TestCase
4
5
  # should "probably rename this file and start testing for real" do
@@ -7,8 +8,15 @@ class TestMywowarmory < Test::Unit::TestCase
7
8
 
8
9
  should "get profile" do
9
10
  api = MyWoWArmory.new
10
- # response = api.get_profile('us','kul-tiras','gary')
11
- # puts response.inspect
11
+
12
+ # puts "Ясеневый лес".gsub("'","").parameterize.to_yaml
13
+ #
14
+ # puts Iconv.iconv("ascii//translit", "iso-8859-1", "Ясеневый лес")[0]
15
+ # puts "Ясеневый лес".gsub("'","").gsub(' ', '-').mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n,'').downcase.to_s
16
+ response = api.get_profile('eu','Ясеневый лес','Ясеневый лес')
17
+ puts response.inspect
18
+ response = api.get_profile('us','kul-tiras','gary')
19
+ puts response.inspect
12
20
  # response = api.get_profile('us','Tichondrius','Slapshøt')
13
21
  # puts response.inspect
14
22
  response = api.get_profile("us", "Mal'Ganis", 'gary')
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: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Wong
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-30 00:00:00 +08:00
18
+ date: 2011-10-02 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency