lib/simple_oauth/header.rb in simple_oauth-0.1.7 vs lib/simple_oauth/header.rb in simple_oauth-0.1.8

- old
+ new

@@ -23,10 +23,10 @@ def self.decode(value) URI.decode(value.to_s) end def self.parse(header) - header.to_s.sub(/^OAuth\s/, '').split(', ').inject({}) do |attributes, pair| + header.to_s.sub(/^OAuth\s/, '').split(/,\s*/).inject({}) do |attributes, pair| match = pair.match(/^(\w+)\=\"([^\"]*)\"$/) attributes.merge(match[1].sub(/^oauth_/, '').to_sym => decode(match[2])) end end