mywowarmory-ruby 0.1.1 → 0.1.2

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.1
1
+ 0.1.2
data/lib/mywowarmory.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'httparty'
2
2
  require 'ostruct'
3
+ require 'cgi'
3
4
 
4
5
  class MyWoWArmory
5
6
  include HTTParty
@@ -11,7 +12,7 @@ class MyWoWArmory
11
12
 
12
13
  def get_profile(country,realm,character_name,options={})
13
14
  # options.merge!({:basic_auth => @auth})
14
- self.class.get("/api/profiles/#{country}/#{realm}/#{character_name}.json", options).parsed_response
15
+ self.class.get("/api/profiles/#{country}/#{realm.tr('^a-zA-Z','-').downcase}/#{CGI::escape(character_name)}.json", options).parsed_response
15
16
  end
16
17
  class Profile < OpenStruct
17
18
  end
@@ -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.1"
8
+ s.version = "0.1.2"
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-07}
12
+ s.date = %q{2011-09-16}
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 = [
@@ -8,6 +8,7 @@ class TestMywowarmory < Test::Unit::TestCase
8
8
  should "get profile" do
9
9
  api = MyWoWArmory.new
10
10
  response = api.get_profile('us','kul-tiras','gary')
11
+
11
12
  # assert(response.path)
12
13
  end
13
14
  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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
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-07 00:00:00 +08:00
18
+ date: 2011-09-16 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency