Browse files

Merge from oauth 0.3.7

  • Loading branch information...
2 parents db00625 + c867394 commit a50f0e3ea7eb74f41dc7ea2e88f8cc684e0e1afd éric committed Jan 10, 2010
Showing with 29 additions and 28 deletions.
  1. +25 −25 Rakefile
  2. +3 −0 lib/oauth/consumer.rb
  3. +1 −2 lib/oauth/helper.rb
  4. +0 −1 test/test_signature.rb
View
50 Rakefile
@@ -2,34 +2,34 @@
$LOAD_PATH << File.dirname(__FILE__) + '/lib'
require 'oauth'
require 'oauth/version'
+
+ # Generate all the Rake tasks
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
+ $hoe = Hoe.new('oauth', OAuth::VERSION) do |p|
+ p.author = ['Pelle Braendgaard','Blaine Cook','Larry Halff','Jesse Clark','Jon Crosby', 'Seth Fitzsimmons']
+ p.email = "oauth-ruby@googlegroups.com"
+ p.description = "OAuth Core Ruby implementation"
+ p.summary = p.description
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ p.rubyforge_name = p.name # TODO this is default value
+ p.url = "http://oauth.rubyforge.org"
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.new('oauth', OAuth::VERSION) do |p|
- p.author = ['Pelle Braendgaard','Blaine Cook','Larry Halff','Jesse Clark','Jon Crosby', 'Seth Fitzsimmons']
- p.email = "oauth-ruby@googlegroups.com"
- p.description = "OAuth Core Ruby implementation"
- p.summary = p.description
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
- p.rubyforge_name = p.name # TODO this is default value
- p.url = "http://oauth.rubyforge.org"
+ p.extra_deps = [
+ ['ruby-hmac','>= 0.3.1']
+ ]
+ p.extra_dev_deps = [
+ ['newgem', ">= #{::Newgem::VERSION}"],
+ ['actionpack'],
+ ['rack']
+ ]
- p.extra_deps = [
- ['ruby-hmac','>= 0.3.1']
- ]
- p.extra_dev_deps = [
- ['newgem', ">= #{::Newgem::VERSION}"],
- ['actionpack'],
- ['rack']
- ]
+ p.clean_globs |= %w[**/.DS_Store tmp *.log **/.*.sw? *.gem .config **/.DS_Store]
+ path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
+ p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
+ p.rsync_args = '-av --delete --ignore-errors'
+ end
- p.clean_globs |= %w[**/.DS_Store tmp *.log **/.*.sw? *.gem .config **/.DS_Store]
- path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
- p.rsync_args = '-av --delete --ignore-errors'
-end
-
-require 'newgem/tasks' # load /tasks/*.rake
+ require 'newgem/tasks' # load /tasks/*.rake
Dir['tasks/**/*.rake'].each { |t| load t }
# TODO - want other tests/tasks run by default? Add them to the list
View
3 lib/oauth/consumer.rb
@@ -38,6 +38,9 @@ class Consumer
# Default http method used for OAuth Token Requests (defaults to :post)
:http_method => :post,
+
+ # Add a custom ca_file for consumer
+ # :ca_file => '/etc/certs.pem'
# Add a custom ca_file for consumer
# :ca_file => '/etc/certs.pem'
View
3 lib/oauth/helper.rb
@@ -71,7 +71,6 @@ def parse_header(header)
# convert into a Hash
Hash[*params.flatten]
end
-
# A secure version of equals meant to avoid timing attacks as specified here
# http://codahale.com/a-lesson-in-timing-attacks/
@@ -98,4 +97,4 @@ def bytes(a)
end
end
end
-end
+end
View
1 test/test_signature.rb
@@ -2,7 +2,6 @@
require File.dirname(__FILE__) + '/test_helper.rb'
class TestOauth < Test::Unit::TestCase
-
include OAuth::Helper
def test_parameter_escaping_kcode_invariant

0 comments on commit a50f0e3

Please sign in to comment.