Skip to content

Commit

Permalink
using addressable instead uri
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelss committed Aug 3, 2011
1 parent 5b42fa4 commit 5ed195d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions exception_resource.gemspec
Expand Up @@ -17,6 +17,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_runtime_dependency "exception-hashify", "~> 0.0.1"
s.add_runtime_dependency "addressable", "~> 2.2.6"
s.add_development_dependency "rspec", "~> 2.6.0"
s.add_development_dependency "artifice", "~> 0.6"
s.add_development_dependency "rack", ">= 1.0"
Expand Down
3 changes: 2 additions & 1 deletion lib/exception_resource.rb
@@ -1,5 +1,6 @@
require "exception_resource/version"
require "exception-hashify"
require "addressable/uri"

module ExceptionResource
def self.site=(value)
Expand All @@ -11,7 +12,7 @@ def self.site
end

def self.create(exception)
url = URI.parse(site) rescue nil
url = Addressable::URI.parse(site)
return false unless url

url.path = "/" if url.path.empty?
Expand Down

0 comments on commit 5ed195d

Please sign in to comment.