simple_oauth 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simple_oauth/header.rb +2 -2
- data/simple_oauth.gemspec +1 -1
- data/spec/simple_oauth/header_spec.rb +1 -1
- metadata +4 -3
data/lib/simple_oauth/header.rb
CHANGED
@@ -5,7 +5,7 @@ require 'cgi'
|
|
5
5
|
|
6
6
|
module SimpleOAuth
|
7
7
|
class Header
|
8
|
-
ATTRIBUTE_KEYS = [:consumer_key, :nonce, :signature_method, :timestamp, :token, :version] unless defined? ::SimpleOAuth::Header::ATTRIBUTE_KEYS
|
8
|
+
ATTRIBUTE_KEYS = [:callback, :consumer_key, :nonce, :signature_method, :timestamp, :token, :verifier, :version] unless defined? ::SimpleOAuth::Header::ATTRIBUTE_KEYS
|
9
9
|
|
10
10
|
def self.default_options
|
11
11
|
{
|
@@ -72,7 +72,7 @@ module SimpleOAuth
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def attributes
|
75
|
-
ATTRIBUTE_KEYS.inject({}){|a,k| options
|
75
|
+
ATTRIBUTE_KEYS.inject({}){|a,k| options[k] ? a.merge(:"oauth_#{k}" => options[k]) : a }
|
76
76
|
end
|
77
77
|
|
78
78
|
def signature
|
data/simple_oauth.gemspec
CHANGED
@@ -86,7 +86,7 @@ describe SimpleOAuth::Header do
|
|
86
86
|
parsed_options.should have_key(:signature)
|
87
87
|
parsed_options[:signature].should_not be_nil
|
88
88
|
end
|
89
|
-
|
89
|
+
|
90
90
|
it 'should handle optional "linear white space"' do
|
91
91
|
parsed_header_with_spaces = SimpleOAuth::Header.parse 'OAuth oauth_consumer_key="abcd", oauth_nonce="oLKtec51GQy", oauth_signature="efgh%26mnop", oauth_signature_method="PLAINTEXT", oauth_timestamp="1286977095", oauth_token="ijkl", oauth_version="1.0"'
|
92
92
|
parsed_header_with_spaces.should be_a_kind_of(Hash)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -103,8 +103,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 1.8.
|
106
|
+
rubygems_version: 1.8.23
|
107
107
|
signing_key:
|
108
108
|
specification_version: 3
|
109
109
|
summary: Simply builds and verifies OAuth headers
|
110
110
|
test_files: []
|
111
|
+
has_rdoc:
|