oauth 0.2.7 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of oauth might be problematic. Click here for more details.
- data/History.txt +14 -0
- data/Manifest.txt +19 -3
- data/{README.txt → README.rdoc} +0 -0
- data/Rakefile +34 -4
- data/TODO +14 -0
- data/bin/oauth +5 -0
- data/lib/oauth.rb +3 -3
- data/lib/oauth/cli.rb +130 -0
- data/lib/oauth/client/helper.rb +3 -2
- data/lib/oauth/consumer.rb +1 -1
- data/lib/oauth/helper.rb +3 -0
- data/lib/oauth/oauth_test_helper.rb +26 -0
- data/lib/oauth/request_proxy/action_controller_request.rb +2 -4
- data/lib/oauth/request_proxy/base.rb +31 -0
- data/lib/oauth/request_proxy/jabber_request.rb +42 -0
- data/lib/oauth/request_proxy/mock_request.rb +36 -0
- data/lib/oauth/request_proxy/net_http.rb +0 -2
- data/lib/oauth/request_proxy/rack_request.rb +1 -3
- data/lib/oauth/signature/base.rb +20 -7
- data/lib/oauth/signature/plaintext.rb +1 -1
- data/lib/oauth/token.rb +3 -3
- data/lib/oauth/version.rb +2 -8
- data/oauth.gemspec +43 -0
- data/script/txt2html +1 -1
- data/specs.txt +13 -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/keys/rsa.cert +11 -0
- data/test/keys/rsa.pem +16 -0
- data/test/test_action_controller_request_proxy.rb +2 -1
- data/test/test_consumer.rb +17 -18
- data/test/test_helper.rb +8 -0
- data/test/test_net_http_client.rb +7 -7
- data/test/test_net_http_request_proxy.rb +3 -3
- data/test/test_rack_request_proxy.rb +3 -3
- data/test/test_signature_plain_text.rb +31 -0
- data/website/index.html +1 -1
- metadata +43 -11
- data/config/hoe.rb +0 -71
- data/config/requirements.rb +0 -17
data/config/hoe.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'oauth/version'
|
2
|
-
|
3
|
-
AUTHOR = ['Pelle Braendgaard','Blaine Cook','Larry Halff','Jesse Clark','Jon Crosby', 'Seth Fitzsimmons'] # can also be an array of Authors
|
4
|
-
EMAIL = "pelleb@gmail.com"
|
5
|
-
DESCRIPTION = "OAuth Core Ruby implementation"
|
6
|
-
GEM_NAME = 'oauth' # what ppl will type to install your gem
|
7
|
-
RUBYFORGE_PROJECT = 'oauth' # The unix name for your project
|
8
|
-
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
9
|
-
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
10
|
-
|
11
|
-
@config_file = "~/.rubyforge/user-config.yml"
|
12
|
-
@config = nil
|
13
|
-
RUBYFORGE_USERNAME = "unknown"
|
14
|
-
def rubyforge_username
|
15
|
-
unless @config
|
16
|
-
begin
|
17
|
-
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
18
|
-
rescue
|
19
|
-
puts <<-EOS
|
20
|
-
ERROR: No rubyforge config file found: #{@config_file}
|
21
|
-
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
22
|
-
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
23
|
-
EOS
|
24
|
-
exit
|
25
|
-
end
|
26
|
-
end
|
27
|
-
RUBYFORGE_USERNAME.replace @config["username"]
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
REV = nil
|
32
|
-
# UNCOMMENT IF REQUIRED:
|
33
|
-
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
|
34
|
-
VERS = Oauth::VERSION::STRING + (REV ? ".#{REV}" : "")
|
35
|
-
RDOC_OPTS = ['--quiet', '--title', 'oauth documentation',
|
36
|
-
"--opname", "index.html",
|
37
|
-
"--line-numbers",
|
38
|
-
"--main", "README",
|
39
|
-
"--inline-source"]
|
40
|
-
|
41
|
-
class Hoe
|
42
|
-
def extra_deps
|
43
|
-
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
44
|
-
@extra_deps
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# Generate all the Rake tasks
|
49
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
50
|
-
hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
51
|
-
p.author = AUTHOR
|
52
|
-
p.description = DESCRIPTION
|
53
|
-
p.email = EMAIL
|
54
|
-
p.summary = DESCRIPTION
|
55
|
-
p.url = HOMEPATH
|
56
|
-
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
57
|
-
p.test_globs = ["test/**/test_*.rb"]
|
58
|
-
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
|
59
|
-
|
60
|
-
# == Optional
|
61
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
62
|
-
p.extra_deps = [['ruby-hmac','>= 0.3.1'] ] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
|
63
|
-
|
64
|
-
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
69
|
-
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
70
|
-
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
71
|
-
hoe.rsync_args = '-av --delete --ignore-errors'
|
data/config/requirements.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
include FileUtils
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
%w[rake hoe newgem rubigen].each do |req_gem|
|
6
|
-
begin
|
7
|
-
require req_gem
|
8
|
-
rescue LoadError
|
9
|
-
puts "This Rakefile requires the '#{req_gem}' RubyGem."
|
10
|
-
puts "Installation: gem install #{req_gem} -y"
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
|
16
|
-
|
17
|
-
require 'oauth'
|