Permalink
Browse files

Escape character name

  • Loading branch information...
1 parent b77fd41 commit eb6d470169db74500cee292e38306a787820df4c @fracek committed Jan 3, 2013
Showing with 6 additions and 1 deletion.
  1. +1 −0 armory_api.gemspec
  2. +3 −1 lib/armory_api/api.rb
  3. +2 −0 spec/armory_api/client_spec.rb
View
@@ -9,6 +9,7 @@ Gem::Specification.new do |s|
s.files = ['lib/armory_api.rb']
s.platform = Gem::Platform::RUBY
+ s.add_development_dependency 'rake'
s.add_development_dependency 'rspec', '~> 2.11.0'
s.add_development_dependency 'faraday'
end
View
@@ -1,8 +1,10 @@
+require 'uri'
+
module ArmoryApi
module API
def character(realm, name, options={})
- get("/api/wow/character/#{realm}/#{name}")
+ get("/api/wow/character/#{realm}/#{URI.escape(name)}")
end
end
end
@@ -1,3 +1,5 @@
+require 'helper'
+
describe ArmoryApi::Client do
context "with module configuration" do
before do

0 comments on commit eb6d470

Please sign in to comment.