qoobaa-oauth 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/History.txt +114 -0
- data/LICENSE +20 -0
- data/README.rdoc +71 -0
- data/Rakefile +58 -0
- data/TODO +31 -0
- data/VERSION +1 -0
- data/lib/oauth.rb +4 -0
- data/lib/oauth/cli.rb +378 -0
- data/lib/oauth/client.rb +4 -0
- data/lib/oauth/client/action_controller_request.rb +54 -0
- data/lib/oauth/client/helper.rb +85 -0
- data/lib/oauth/client/net_http.rb +106 -0
- data/lib/oauth/consumer.rb +370 -0
- data/lib/oauth/errors.rb +3 -0
- data/lib/oauth/errors/error.rb +4 -0
- data/lib/oauth/errors/problem.rb +14 -0
- data/lib/oauth/errors/unauthorized.rb +12 -0
- data/lib/oauth/helper.rb +78 -0
- data/lib/oauth/oauth.rb +11 -0
- data/lib/oauth/oauth_test_helper.rb +25 -0
- data/lib/oauth/request_proxy.rb +24 -0
- data/lib/oauth/request_proxy/action_controller_request.rb +73 -0
- data/lib/oauth/request_proxy/base.rb +166 -0
- data/lib/oauth/request_proxy/jabber_request.rb +41 -0
- data/lib/oauth/request_proxy/mock_request.rb +44 -0
- data/lib/oauth/request_proxy/net_http.rb +65 -0
- data/lib/oauth/request_proxy/rack_request.rb +40 -0
- data/lib/oauth/request_proxy/typhoeus_request.rb +53 -0
- data/lib/oauth/server.rb +66 -0
- data/lib/oauth/signature.rb +40 -0
- data/lib/oauth/signature/base.rb +87 -0
- data/lib/oauth/signature/hmac/md5.rb +21 -0
- data/lib/oauth/signature/hmac/rmd160.rb +21 -0
- data/lib/oauth/signature/hmac/sha1.rb +22 -0
- data/lib/oauth/signature/hmac/sha2.rb +21 -0
- data/lib/oauth/signature/md5.rb +13 -0
- data/lib/oauth/signature/plaintext.rb +23 -0
- data/lib/oauth/signature/rsa/sha1.rb +45 -0
- data/lib/oauth/signature/sha1.rb +13 -0
- data/lib/oauth/token.rb +7 -0
- data/lib/oauth/tokens/access_token.rb +68 -0
- data/lib/oauth/tokens/consumer_token.rb +33 -0
- data/lib/oauth/tokens/request_token.rb +32 -0
- data/lib/oauth/tokens/server_token.rb +9 -0
- data/lib/oauth/tokens/token.rb +17 -0
- data/lib/oauth/version.rb +3 -0
- data/qoobaa-oauth.gemspec +149 -0
- data/test/cases/oauth_case.rb +19 -0
- data/test/cases/spec/1_0-final/test_construct_request_url.rb +62 -0
- data/test/cases/spec/1_0-final/test_normalize_request_parameters.rb +88 -0
- data/test/cases/spec/1_0-final/test_parameter_encodings.rb +86 -0
- data/test/cases/spec/1_0-final/test_signature_base_strings.rb +77 -0
- data/test/integration/consumer_test.rb +304 -0
- data/test/keys/rsa.cert +11 -0
- data/test/keys/rsa.pem +16 -0
- data/test/test_access_token.rb +26 -0
- data/test/test_action_controller_request_proxy.rb +133 -0
- data/test/test_consumer.rb +159 -0
- data/test/test_helper.rb +14 -0
- data/test/test_hmac_sha1.rb +20 -0
- data/test/test_net_http_client.rb +224 -0
- data/test/test_net_http_request_proxy.rb +72 -0
- data/test/test_oauth_helper.rb +49 -0
- data/test/test_rack_request_proxy.rb +40 -0
- data/test/test_request_token.rb +51 -0
- data/test/test_rsa_sha1.rb +59 -0
- data/test/test_server.rb +40 -0
- data/test/test_signature.rb +21 -0
- data/test/test_signature_base.rb +32 -0
- data/test/test_signature_plain_text.rb +26 -0
- data/test/test_token.rb +14 -0
- data/test/test_typhoeus_request_proxy.rb +72 -0
- metadata +209 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'oauth/signature/base'
|
2
|
+
|
3
|
+
if RUBY_VERSION >= "1.9"
|
4
|
+
require 'digest/hmac'
|
5
|
+
else
|
6
|
+
require "rubygems"
|
7
|
+
require 'hmac-sha1'
|
8
|
+
end
|
9
|
+
|
10
|
+
module OAuth::Signature::HMAC
|
11
|
+
class SHA1 < ::OAuth::Signature::Base
|
12
|
+
implements 'hmac-sha1'
|
13
|
+
|
14
|
+
def digest
|
15
|
+
if RUBY_VERSION >= "1.9"
|
16
|
+
Digest::HMAC.new(secret, Digest::SHA1).digest(signature_base_string)
|
17
|
+
else
|
18
|
+
::HMAC::SHA1.digest(secret, signature_base_string)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'oauth/signature/base'
|
2
|
+
|
3
|
+
if RUBY_VERSION >= "1.9"
|
4
|
+
require 'digest/hmac'
|
5
|
+
else
|
6
|
+
require 'hmac-sha2'
|
7
|
+
end
|
8
|
+
|
9
|
+
module OAuth::Signature::HMAC
|
10
|
+
class SHA2 < OAuth::Signature::Base
|
11
|
+
implements 'hmac-sha2'
|
12
|
+
|
13
|
+
def digest
|
14
|
+
if RUBY_VERSION >= "1.9"
|
15
|
+
Digest::HMAC.new(secret, Digest::SHA2).digest(signature_base_string)
|
16
|
+
else
|
17
|
+
::HMAC::SHA2.digest(secret, signature_base_string)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'oauth/signature/base'
|
2
|
+
|
3
|
+
module OAuth::Signature
|
4
|
+
class PLAINTEXT < Base
|
5
|
+
implements 'plaintext'
|
6
|
+
|
7
|
+
def signature
|
8
|
+
signature_base_string
|
9
|
+
end
|
10
|
+
|
11
|
+
def ==(cmp_signature)
|
12
|
+
signature.to_s == cmp_signature.to_s
|
13
|
+
end
|
14
|
+
|
15
|
+
def signature_base_string
|
16
|
+
secret
|
17
|
+
end
|
18
|
+
|
19
|
+
def secret
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'oauth/signature/base'
|
2
|
+
require 'openssl'
|
3
|
+
|
4
|
+
module OAuth::Signature::RSA
|
5
|
+
class SHA1 < OAuth::Signature::Base
|
6
|
+
implements 'rsa-sha1'
|
7
|
+
|
8
|
+
def ==(cmp_signature)
|
9
|
+
public_key.verify(OpenSSL::Digest::SHA1.new, Base64.decode64(cmp_signature.is_a?(Array) ? cmp_signature.first : cmp_signature), signature_base_string)
|
10
|
+
end
|
11
|
+
|
12
|
+
def public_key
|
13
|
+
if consumer_secret.is_a?(String)
|
14
|
+
decode_public_key
|
15
|
+
elsif consumer_secret.is_a?(OpenSSL::X509::Certificate)
|
16
|
+
consumer_secret.public_key
|
17
|
+
else
|
18
|
+
consumer_secret
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def decode_public_key
|
25
|
+
case consumer_secret
|
26
|
+
when /-----BEGIN CERTIFICATE-----/
|
27
|
+
OpenSSL::X509::Certificate.new( consumer_secret).public_key
|
28
|
+
else
|
29
|
+
OpenSSL::PKey::RSA.new( consumer_secret)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def digest
|
34
|
+
private_key = OpenSSL::PKey::RSA.new(
|
35
|
+
if options[:private_key_file]
|
36
|
+
IO.read(options[:private_key_file])
|
37
|
+
else
|
38
|
+
consumer_secret
|
39
|
+
end
|
40
|
+
)
|
41
|
+
|
42
|
+
private_key.sign(OpenSSL::Digest::SHA1.new, signature_base_string)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/oauth/token.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
module OAuth
|
2
|
+
# The Access Token is used for the actual "real" web service calls that you perform against the server
|
3
|
+
class AccessToken < ConsumerToken
|
4
|
+
# The less intrusive way. Otherwise, if we are to do it correctly inside consumer,
|
5
|
+
# we need to restructure and touch more methods: request(), sign!(), etc.
|
6
|
+
def request(http_method, path, *arguments)
|
7
|
+
request_uri = URI.parse(path)
|
8
|
+
site_uri = consumer.uri
|
9
|
+
is_service_uri_different = (request_uri.absolute? && request_uri != site_uri)
|
10
|
+
consumer.uri(request_uri) if is_service_uri_different
|
11
|
+
@response = super(http_method, path, *arguments)
|
12
|
+
# NOTE: reset for wholesomeness? meaning that we admit only AccessToken service calls may use different URIs?
|
13
|
+
# so reset in case consumer is still used for other token-management tasks subsequently?
|
14
|
+
consumer.uri(site_uri) if is_service_uri_different
|
15
|
+
@response
|
16
|
+
end
|
17
|
+
|
18
|
+
# Make a regular GET request using AccessToken
|
19
|
+
#
|
20
|
+
# @response = @token.get('/people')
|
21
|
+
# @response = @token.get('/people', { 'Accept'=>'application/xml' })
|
22
|
+
#
|
23
|
+
def get(path, headers = {})
|
24
|
+
request(:get, path, headers)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Make a regular HEAD request using AccessToken
|
28
|
+
#
|
29
|
+
# @response = @token.head('/people')
|
30
|
+
#
|
31
|
+
def head(path, headers = {})
|
32
|
+
request(:head, path, headers)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Make a regular POST request using AccessToken
|
36
|
+
#
|
37
|
+
# @response = @token.post('/people')
|
38
|
+
# @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' })
|
39
|
+
# @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' })
|
40
|
+
# @response = @token.post('/people', nil, {'Accept' => 'application/xml' })
|
41
|
+
# @response = @token.post('/people', @person.to_xml, { 'Accept'=>'application/xml', 'Content-Type' => 'application/xml' })
|
42
|
+
#
|
43
|
+
def post(path, body = '', headers = {})
|
44
|
+
request(:post, path, body, headers)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Make a regular PUT request using AccessToken
|
48
|
+
#
|
49
|
+
# @response = @token.put('/people/123')
|
50
|
+
# @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' })
|
51
|
+
# @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' })
|
52
|
+
# @response = @token.put('/people/123', nil, { 'Accept' => 'application/xml' })
|
53
|
+
# @response = @token.put('/people/123', @person.to_xml, { 'Accept' => 'application/xml', 'Content-Type' => 'application/xml' })
|
54
|
+
#
|
55
|
+
def put(path, body = '', headers = {})
|
56
|
+
request(:put, path, body, headers)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Make a regular DELETE request using AccessToken
|
60
|
+
#
|
61
|
+
# @response = @token.delete('/people/123')
|
62
|
+
# @response = @token.delete('/people/123', { 'Accept' => 'application/xml' })
|
63
|
+
#
|
64
|
+
def delete(path, headers = {})
|
65
|
+
request(:delete, path, headers)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module OAuth
|
2
|
+
# Superclass for tokens used by OAuth Clients
|
3
|
+
class ConsumerToken < Token
|
4
|
+
attr_accessor :consumer, :params
|
5
|
+
attr_reader :response
|
6
|
+
|
7
|
+
def self.from_hash(consumer, hash)
|
8
|
+
token = self.new(consumer, hash[:oauth_token], hash[:oauth_token_secret])
|
9
|
+
token.params = hash
|
10
|
+
token
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(consumer, token="", secret="")
|
14
|
+
super(token, secret)
|
15
|
+
@consumer = consumer
|
16
|
+
@params = {}
|
17
|
+
end
|
18
|
+
|
19
|
+
# Make a signed request using given http_method to the path
|
20
|
+
#
|
21
|
+
# @token.request(:get, '/people')
|
22
|
+
# @token.request(:post, '/people', @person.to_xml, { 'Content-Type' => 'application/xml' })
|
23
|
+
#
|
24
|
+
def request(http_method, path, *arguments)
|
25
|
+
@response = consumer.request(http_method, path, self, {}, *arguments)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Sign a request generated elsewhere using Net:HTTP::Post.new or friends
|
29
|
+
def sign!(request, options = {})
|
30
|
+
consumer.sign!(request, self, options)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module OAuth
|
2
|
+
# The RequestToken is used for the initial Request.
|
3
|
+
# This is normally created by the Consumer object.
|
4
|
+
class RequestToken < ConsumerToken
|
5
|
+
|
6
|
+
# Generate an authorization URL for user authorization
|
7
|
+
def authorize_url(params = nil)
|
8
|
+
params = (params || {}).merge(:oauth_token => self.token)
|
9
|
+
build_authorize_url(consumer.authorize_url, params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def callback_confirmed?
|
13
|
+
params[:oauth_callback_confirmed] == "true"
|
14
|
+
end
|
15
|
+
|
16
|
+
# exchange for AccessToken on server
|
17
|
+
def get_access_token(options = {}, *arguments)
|
18
|
+
response = consumer.token_request(consumer.http_method, (consumer.access_token_url? ? consumer.access_token_url : consumer.access_token_path), self, options, *arguments)
|
19
|
+
OAuth::AccessToken.from_hash(consumer, response)
|
20
|
+
end
|
21
|
+
|
22
|
+
protected
|
23
|
+
|
24
|
+
# construct an authorization url
|
25
|
+
def build_authorize_url(base_url, params)
|
26
|
+
uri = URI.parse(base_url.to_s)
|
27
|
+
# TODO doesn't handle array values correctly
|
28
|
+
uri.query = params.map { |k,v| [k, CGI.escape(v)] * "=" } * "&"
|
29
|
+
uri.to_s
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module OAuth
|
2
|
+
# Superclass for the various tokens used by OAuth
|
3
|
+
class Token
|
4
|
+
include OAuth::Helper
|
5
|
+
|
6
|
+
attr_accessor :token, :secret
|
7
|
+
|
8
|
+
def initialize(token, secret)
|
9
|
+
@token = token
|
10
|
+
@secret = secret
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_query
|
14
|
+
"oauth_token=#{escape(token)}&oauth_secret=#{escape(secret)}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{qoobaa-oauth}
|
8
|
+
s.version = "0.3.8"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Piotr Sarnacki", "Jakub Ku\305\272ma"]
|
12
|
+
s.date = %q{2010-03-24}
|
13
|
+
s.description = %q{OAuth Core Ruby implementation}
|
14
|
+
s.email = %q{drogus@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc",
|
18
|
+
"TODO"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
".document",
|
22
|
+
".gitignore",
|
23
|
+
"History.txt",
|
24
|
+
"LICENSE",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"TODO",
|
28
|
+
"VERSION",
|
29
|
+
"lib/oauth.rb",
|
30
|
+
"lib/oauth/cli.rb",
|
31
|
+
"lib/oauth/client.rb",
|
32
|
+
"lib/oauth/client/action_controller_request.rb",
|
33
|
+
"lib/oauth/client/helper.rb",
|
34
|
+
"lib/oauth/client/net_http.rb",
|
35
|
+
"lib/oauth/consumer.rb",
|
36
|
+
"lib/oauth/errors.rb",
|
37
|
+
"lib/oauth/errors/error.rb",
|
38
|
+
"lib/oauth/errors/problem.rb",
|
39
|
+
"lib/oauth/errors/unauthorized.rb",
|
40
|
+
"lib/oauth/helper.rb",
|
41
|
+
"lib/oauth/oauth.rb",
|
42
|
+
"lib/oauth/oauth_test_helper.rb",
|
43
|
+
"lib/oauth/request_proxy.rb",
|
44
|
+
"lib/oauth/request_proxy/action_controller_request.rb",
|
45
|
+
"lib/oauth/request_proxy/base.rb",
|
46
|
+
"lib/oauth/request_proxy/jabber_request.rb",
|
47
|
+
"lib/oauth/request_proxy/mock_request.rb",
|
48
|
+
"lib/oauth/request_proxy/net_http.rb",
|
49
|
+
"lib/oauth/request_proxy/rack_request.rb",
|
50
|
+
"lib/oauth/request_proxy/typhoeus_request.rb",
|
51
|
+
"lib/oauth/server.rb",
|
52
|
+
"lib/oauth/signature.rb",
|
53
|
+
"lib/oauth/signature/base.rb",
|
54
|
+
"lib/oauth/signature/hmac/md5.rb",
|
55
|
+
"lib/oauth/signature/hmac/rmd160.rb",
|
56
|
+
"lib/oauth/signature/hmac/sha1.rb",
|
57
|
+
"lib/oauth/signature/hmac/sha2.rb",
|
58
|
+
"lib/oauth/signature/md5.rb",
|
59
|
+
"lib/oauth/signature/plaintext.rb",
|
60
|
+
"lib/oauth/signature/rsa/sha1.rb",
|
61
|
+
"lib/oauth/signature/sha1.rb",
|
62
|
+
"lib/oauth/token.rb",
|
63
|
+
"lib/oauth/tokens/access_token.rb",
|
64
|
+
"lib/oauth/tokens/consumer_token.rb",
|
65
|
+
"lib/oauth/tokens/request_token.rb",
|
66
|
+
"lib/oauth/tokens/server_token.rb",
|
67
|
+
"lib/oauth/tokens/token.rb",
|
68
|
+
"lib/oauth/version.rb",
|
69
|
+
"qoobaa-oauth.gemspec",
|
70
|
+
"test/cases/oauth_case.rb",
|
71
|
+
"test/cases/spec/1_0-final/test_construct_request_url.rb",
|
72
|
+
"test/cases/spec/1_0-final/test_normalize_request_parameters.rb",
|
73
|
+
"test/cases/spec/1_0-final/test_parameter_encodings.rb",
|
74
|
+
"test/cases/spec/1_0-final/test_signature_base_strings.rb",
|
75
|
+
"test/integration/consumer_test.rb",
|
76
|
+
"test/keys/rsa.cert",
|
77
|
+
"test/keys/rsa.pem",
|
78
|
+
"test/test_access_token.rb",
|
79
|
+
"test/test_action_controller_request_proxy.rb",
|
80
|
+
"test/test_consumer.rb",
|
81
|
+
"test/test_helper.rb",
|
82
|
+
"test/test_hmac_sha1.rb",
|
83
|
+
"test/test_net_http_client.rb",
|
84
|
+
"test/test_net_http_request_proxy.rb",
|
85
|
+
"test/test_oauth_helper.rb",
|
86
|
+
"test/test_rack_request_proxy.rb",
|
87
|
+
"test/test_request_token.rb",
|
88
|
+
"test/test_rsa_sha1.rb",
|
89
|
+
"test/test_server.rb",
|
90
|
+
"test/test_signature.rb",
|
91
|
+
"test/test_signature_base.rb",
|
92
|
+
"test/test_signature_plain_text.rb",
|
93
|
+
"test/test_token.rb",
|
94
|
+
"test/test_typhoeus_request_proxy.rb"
|
95
|
+
]
|
96
|
+
s.homepage = %q{http://github.com/drogus/oauth}
|
97
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
98
|
+
s.require_paths = ["lib"]
|
99
|
+
s.rubygems_version = %q{1.3.6}
|
100
|
+
s.summary = %q{OAuth Core Ruby implementation}
|
101
|
+
s.test_files = [
|
102
|
+
"test/test_oauth_helper.rb",
|
103
|
+
"test/test_net_http_client.rb",
|
104
|
+
"test/test_server.rb",
|
105
|
+
"test/test_access_token.rb",
|
106
|
+
"test/test_rsa_sha1.rb",
|
107
|
+
"test/test_action_controller_request_proxy.rb",
|
108
|
+
"test/test_request_token.rb",
|
109
|
+
"test/test_typhoeus_request_proxy.rb",
|
110
|
+
"test/test_consumer.rb",
|
111
|
+
"test/test_rack_request_proxy.rb",
|
112
|
+
"test/test_net_http_request_proxy.rb",
|
113
|
+
"test/test_helper.rb",
|
114
|
+
"test/integration/consumer_test.rb",
|
115
|
+
"test/test_hmac_sha1.rb",
|
116
|
+
"test/test_signature_plain_text.rb",
|
117
|
+
"test/test_token.rb",
|
118
|
+
"test/test_signature_base.rb",
|
119
|
+
"test/cases/oauth_case.rb",
|
120
|
+
"test/cases/spec/1_0-final/test_signature_base_strings.rb",
|
121
|
+
"test/cases/spec/1_0-final/test_parameter_encodings.rb",
|
122
|
+
"test/cases/spec/1_0-final/test_normalize_request_parameters.rb",
|
123
|
+
"test/cases/spec/1_0-final/test_construct_request_url.rb",
|
124
|
+
"test/test_signature.rb"
|
125
|
+
]
|
126
|
+
|
127
|
+
if s.respond_to? :specification_version then
|
128
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
129
|
+
s.specification_version = 3
|
130
|
+
|
131
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
132
|
+
s.add_runtime_dependency(%q<ruby-hmac>, [">= 0.3.1"])
|
133
|
+
s.add_development_dependency(%q<actionpack>, [">= 0"])
|
134
|
+
s.add_development_dependency(%q<rack>, [">= 0"])
|
135
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
136
|
+
else
|
137
|
+
s.add_dependency(%q<ruby-hmac>, [">= 0.3.1"])
|
138
|
+
s.add_dependency(%q<actionpack>, [">= 0"])
|
139
|
+
s.add_dependency(%q<rack>, [">= 0"])
|
140
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
141
|
+
end
|
142
|
+
else
|
143
|
+
s.add_dependency(%q<ruby-hmac>, [">= 0.3.1"])
|
144
|
+
s.add_dependency(%q<actionpack>, [">= 0"])
|
145
|
+
s.add_dependency(%q<rack>, [">= 0"])
|
146
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|