rack-oauth 0.1.2

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.
Files changed (88) hide show
  1. data/README.rdoc +49 -0
  2. data/Rakefile +68 -0
  3. data/VERSION +1 -0
  4. data/examples/rails-example/README +243 -0
  5. data/examples/rails-example/Rakefile +10 -0
  6. data/examples/rails-example/app/controllers/application_controller.rb +12 -0
  7. data/examples/rails-example/app/controllers/welcome_controller.rb +26 -0
  8. data/examples/rails-example/app/helpers/application_helper.rb +3 -0
  9. data/examples/rails-example/app/helpers/welcome_helper.rb +2 -0
  10. data/examples/rails-example/app/views/welcome/index.html.erb +2 -0
  11. data/examples/rails-example/config/boot.rb +110 -0
  12. data/examples/rails-example/config/database.yml +22 -0
  13. data/examples/rails-example/config/environment.rb +14 -0
  14. data/examples/rails-example/config/environments/development.rb +17 -0
  15. data/examples/rails-example/config/environments/production.rb +28 -0
  16. data/examples/rails-example/config/environments/test.rb +32 -0
  17. data/examples/rails-example/config/initializers/backtrace_silencers.rb +7 -0
  18. data/examples/rails-example/config/initializers/inflections.rb +10 -0
  19. data/examples/rails-example/config/initializers/mime_types.rb +5 -0
  20. data/examples/rails-example/config/initializers/new_rails_defaults.rb +21 -0
  21. data/examples/rails-example/config/initializers/session_store.rb +15 -0
  22. data/examples/rails-example/config/locales/en.yml +5 -0
  23. data/examples/rails-example/config/routes.rb +6 -0
  24. data/examples/rails-example/db/development.sqlite3 +1 -0
  25. data/examples/rails-example/db/seeds.rb +7 -0
  26. data/examples/rails-example/db/test.sqlite3 +1 -0
  27. data/examples/rails-example/doc/README_FOR_APP +2 -0
  28. data/examples/rails-example/lib/tasks/rspec.rake +182 -0
  29. data/examples/rails-example/log/development.log +165 -0
  30. data/examples/rails-example/log/production.log +0 -0
  31. data/examples/rails-example/log/server.log +0 -0
  32. data/examples/rails-example/log/test.log +1591 -0
  33. data/examples/rails-example/public/404.html +30 -0
  34. data/examples/rails-example/public/422.html +30 -0
  35. data/examples/rails-example/public/500.html +30 -0
  36. data/examples/rails-example/public/favicon.ico +0 -0
  37. data/examples/rails-example/public/images/rails.png +0 -0
  38. data/examples/rails-example/public/javascripts/application.js +2 -0
  39. data/examples/rails-example/public/javascripts/controls.js +963 -0
  40. data/examples/rails-example/public/javascripts/dragdrop.js +973 -0
  41. data/examples/rails-example/public/javascripts/effects.js +1128 -0
  42. data/examples/rails-example/public/javascripts/prototype.js +4320 -0
  43. data/examples/rails-example/public/robots.txt +5 -0
  44. data/examples/rails-example/script/about +4 -0
  45. data/examples/rails-example/script/autospec +6 -0
  46. data/examples/rails-example/script/console +3 -0
  47. data/examples/rails-example/script/dbconsole +3 -0
  48. data/examples/rails-example/script/destroy +3 -0
  49. data/examples/rails-example/script/generate +3 -0
  50. data/examples/rails-example/script/performance/benchmarker +3 -0
  51. data/examples/rails-example/script/performance/profiler +3 -0
  52. data/examples/rails-example/script/plugin +3 -0
  53. data/examples/rails-example/script/runner +3 -0
  54. data/examples/rails-example/script/server +3 -0
  55. data/examples/rails-example/script/spec +10 -0
  56. data/examples/rails-example/script/spec_server +9 -0
  57. data/examples/rails-example/spec/integration/login_spec.rb +27 -0
  58. data/examples/rails-example/spec/rcov.opts +2 -0
  59. data/examples/rails-example/spec/spec.opts +4 -0
  60. data/examples/rails-example/spec/spec_helper.rb +12 -0
  61. data/examples/rails-example/tmp/webrat-1257205170.html +202 -0
  62. data/examples/rails-example/tmp/webrat-1257205276.html +31 -0
  63. data/examples/rails-example/tmp/webrat-1257205315.html +211 -0
  64. data/examples/rails-example/tmp/webrat-1257205333.html +31 -0
  65. data/examples/rails-example/tmp/webrat-1257205380.html +211 -0
  66. data/examples/rails-example/tmp/webrat-1257205757.html +211 -0
  67. data/examples/rails-example/tmp/webrat-1257210107.html +32 -0
  68. data/examples/rails-example/tmp/webrat-1257210160.html +32 -0
  69. data/examples/rails-example/tmp/webrat-1257210488.html +32 -0
  70. data/examples/rails-example/tmp/webrat-1257210501.html +32 -0
  71. data/examples/rails-example/tmp/webrat-1257210545.html +32 -0
  72. data/examples/rails-example/tmp/webrat-1257210564.html +32 -0
  73. data/examples/rails-example/tmp/webrat-1257210581.html +32 -0
  74. data/examples/rails-example/tmp/webrat-1257210600.html +32 -0
  75. data/examples/rails-example/tmp/webrat-1257210608.html +32 -0
  76. data/examples/sinatra-twitter.rb +47 -0
  77. data/examples/sinatra-twitter.ru +2 -0
  78. data/lib/rack/oauth.rb +1 -0
  79. data/lib/rack-oauth.rb +378 -0
  80. data/spec/data/authorized_access_token.yml +58 -0
  81. data/spec/data/authorized_oauth_verifier.yml +1 -0
  82. data/spec/data/authorized_request_secret.yml +1 -0
  83. data/spec/data/authorized_request_token.yml +1 -0
  84. data/spec/data/unauthorized_request_token.yml +56 -0
  85. data/spec/rack_oauth_middleware_spec.rb +156 -0
  86. data/spec/sample_sinatra_app_spec.rb +105 -0
  87. data/spec/spec_helper.rb +24 -0
  88. metadata +162 -0
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,21 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # These settings change the behavior of Rails 2 apps and will be defaults
4
+ # for Rails 3. You can remove this initializer when Rails 3 is released.
5
+
6
+ if defined?(ActiveRecord)
7
+ # Include Active Record class name as root for JSON serialized output.
8
+ ActiveRecord::Base.include_root_in_json = true
9
+
10
+ # Store the full class name (including module namespace) in STI type column.
11
+ ActiveRecord::Base.store_full_sti_class = true
12
+ end
13
+
14
+ ActionController::Routing.generate_best_match = false
15
+
16
+ # Use ISO 8601 format for JSON serialized times and dates.
17
+ ActiveSupport.use_standard_json_time_format = true
18
+
19
+ # Don't escape HTML entities in JSON, leave that for the #json_escape helper.
20
+ # if you're including raw json in an HTML page.
21
+ ActiveSupport.escape_html_entities_in_json = false
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying cookie session data integrity.
4
+ # If you change this key, all old sessions will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ ActionController::Base.session = {
8
+ :key => '_rails-example_session',
9
+ :secret => 'fc8ae74cfcbd707ce60eafbaa8b826e5e6ce9c2b0d6de28ea260ef2cff98aa617f01df7cc7679a9acd56b54e8eaf034e9cb06b00c51041776b491524a71083b8'
10
+ }
11
+
12
+ # Use the database for sessions instead of the cookie-based default,
13
+ # which shouldn't be used to store highly confidential information
14
+ # (create the session table with "rake db:sessions:create")
15
+ # ActionController::Base.session_store = :active_record_store
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,6 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+ # because this is just a sample, we'll use the "welcome" controller for everything
3
+ map.login 'login', :controller => 'welcome', :action => 'login'
4
+ map.after_login 'oauth_complete', :controller => 'welcome', :action => 'after_login'
5
+ map.root :controller => 'welcome'
6
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Major.create(:name => 'Daley', :city => cities.first)
@@ -0,0 +1 @@
1
+ S
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -0,0 +1,182 @@
1
+ gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
2
+ rspec_gem_dir = nil
3
+ Dir["#{RAILS_ROOT}/vendor/gems/*"].each do |subdir|
4
+ rspec_gem_dir = subdir if subdir.gsub("#{RAILS_ROOT}/vendor/gems/","") =~ /^(\w+-)?rspec-(\d+)/ && File.exist?("#{subdir}/lib/spec/rake/spectask.rb")
5
+ end
6
+ rspec_plugin_dir = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec')
7
+
8
+ if rspec_gem_dir && (test ?d, rspec_plugin_dir)
9
+ raise "\n#{'*'*50}\nYou have rspec installed in both vendor/gems and vendor/plugins\nPlease pick one and dispose of the other.\n#{'*'*50}\n\n"
10
+ end
11
+
12
+ if rspec_gem_dir
13
+ $LOAD_PATH.unshift("#{rspec_gem_dir}/lib")
14
+ elsif File.exist?(rspec_plugin_dir)
15
+ $LOAD_PATH.unshift("#{rspec_plugin_dir}/lib")
16
+ end
17
+
18
+ # Don't load rspec if running "rake gems:*"
19
+ unless ARGV.any? {|a| a =~ /^gems/}
20
+
21
+ begin
22
+ require 'spec/rake/spectask'
23
+ rescue MissingSourceFile
24
+ module Spec
25
+ module Rake
26
+ class SpecTask
27
+ def initialize(name)
28
+ task name do
29
+ # if rspec-rails is a configured gem, this will output helpful material and exit ...
30
+ require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
31
+
32
+ # ... otherwise, do this:
33
+ raise <<-MSG
34
+
35
+ #{"*" * 80}
36
+ * You are trying to run an rspec rake task defined in
37
+ * #{__FILE__},
38
+ * but rspec can not be found in vendor/gems, vendor/plugins or system gems.
39
+ #{"*" * 80}
40
+ MSG
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ Rake.application.instance_variable_get('@tasks').delete('default')
49
+
50
+ spec_prereq = File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop
51
+ task :noop do
52
+ end
53
+
54
+ task :default => :spec
55
+ task :stats => "spec:statsetup"
56
+
57
+ desc "Run all specs in spec directory (excluding plugin specs)"
58
+ Spec::Rake::SpecTask.new(:spec => spec_prereq) do |t|
59
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
60
+ t.spec_files = FileList['spec/**/*_spec.rb']
61
+ end
62
+
63
+ namespace :spec do
64
+ desc "Run all specs in spec directory with RCov (excluding plugin specs)"
65
+ Spec::Rake::SpecTask.new(:rcov) do |t|
66
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
67
+ t.spec_files = FileList['spec/**/*_spec.rb']
68
+ t.rcov = true
69
+ t.rcov_opts = lambda do
70
+ IO.readlines("#{RAILS_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
71
+ end
72
+ end
73
+
74
+ desc "Print Specdoc for all specs (excluding plugin specs)"
75
+ Spec::Rake::SpecTask.new(:doc) do |t|
76
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
77
+ t.spec_files = FileList['spec/**/*_spec.rb']
78
+ end
79
+
80
+ desc "Print Specdoc for all plugin examples"
81
+ Spec::Rake::SpecTask.new(:plugin_doc) do |t|
82
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
83
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*')
84
+ end
85
+
86
+ [:models, :controllers, :views, :helpers, :lib, :integration].each do |sub|
87
+ desc "Run the code examples in spec/#{sub}"
88
+ Spec::Rake::SpecTask.new(sub => spec_prereq) do |t|
89
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
90
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
91
+ end
92
+ end
93
+
94
+ desc "Run the code examples in vendor/plugins (except RSpec's own)"
95
+ Spec::Rake::SpecTask.new(:plugins => spec_prereq) do |t|
96
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
97
+ t.spec_files = FileList['vendor/plugins/**/spec/**/*_spec.rb'].exclude('vendor/plugins/rspec/*').exclude("vendor/plugins/rspec-rails/*")
98
+ end
99
+
100
+ namespace :plugins do
101
+ desc "Runs the examples for rspec_on_rails"
102
+ Spec::Rake::SpecTask.new(:rspec_on_rails) do |t|
103
+ t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
104
+ t.spec_files = FileList['vendor/plugins/rspec-rails/spec/**/*_spec.rb']
105
+ end
106
+ end
107
+
108
+ # Setup specs for stats
109
+ task :statsetup do
110
+ require 'code_statistics'
111
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models) if File.exist?('spec/models')
112
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views) if File.exist?('spec/views')
113
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers) if File.exist?('spec/controllers')
114
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/helpers) if File.exist?('spec/helpers')
115
+ ::STATS_DIRECTORIES << %w(Library\ specs spec/lib) if File.exist?('spec/lib')
116
+ ::STATS_DIRECTORIES << %w(Routing\ specs spec/routing) if File.exist?('spec/routing')
117
+ ::STATS_DIRECTORIES << %w(Integration\ specs spec/integration) if File.exist?('spec/integration')
118
+ ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?('spec/models')
119
+ ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?('spec/views')
120
+ ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?('spec/controllers')
121
+ ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?('spec/helpers')
122
+ ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?('spec/lib')
123
+ ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?('spec/routing')
124
+ ::CodeStatistics::TEST_TYPES << "Integration specs" if File.exist?('spec/integration')
125
+ end
126
+
127
+ namespace :db do
128
+ namespace :fixtures do
129
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y. Load from subdirectory in test/fixtures using FIXTURES_DIR=z."
130
+ task :load => :environment do
131
+ ActiveRecord::Base.establish_connection(Rails.env)
132
+ base_dir = File.join(Rails.root, 'spec', 'fixtures')
133
+ fixtures_dir = ENV['FIXTURES_DIR'] ? File.join(base_dir, ENV['FIXTURES_DIR']) : base_dir
134
+
135
+ require 'active_record/fixtures'
136
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/).map {|f| File.join(fixtures_dir, f) } : Dir.glob(File.join(fixtures_dir, '*.{yml,csv}'))).each do |fixture_file|
137
+ Fixtures.create_fixtures(File.dirname(fixture_file), File.basename(fixture_file, '.*'))
138
+ end
139
+ end
140
+ end
141
+ end
142
+
143
+ namespace :server do
144
+ daemonized_server_pid = File.expand_path("#{RAILS_ROOT}/tmp/pids/spec_server.pid")
145
+
146
+ desc "start spec_server."
147
+ task :start do
148
+ if File.exist?(daemonized_server_pid)
149
+ $stderr.puts "spec_server is already running."
150
+ else
151
+ $stderr.puts %Q{Starting up spec_server ...}
152
+ FileUtils.mkdir_p('tmp/pids') unless test ?d, 'tmp/pids'
153
+ system("ruby", "script/spec_server", "--daemon", "--pid", daemonized_server_pid)
154
+ end
155
+ end
156
+
157
+ desc "stop spec_server."
158
+ task :stop do
159
+ unless File.exist?(daemonized_server_pid)
160
+ $stderr.puts "No server running."
161
+ else
162
+ $stderr.puts "Shutting down spec_server ..."
163
+ system("kill", "-s", "TERM", File.read(daemonized_server_pid).strip) &&
164
+ File.delete(daemonized_server_pid)
165
+ end
166
+ end
167
+
168
+ desc "restart spec_server."
169
+ task :restart => [:stop, :start]
170
+
171
+ desc "check if spec server is running"
172
+ task :status do
173
+ if File.exist?(daemonized_server_pid)
174
+ $stderr.puts %Q{spec_server is running (PID: #{File.read(daemonized_server_pid).gsub("\n","")})}
175
+ else
176
+ $stderr.puts "No server running."
177
+ end
178
+ end
179
+ end
180
+ end
181
+
182
+ end
@@ -0,0 +1,165 @@
1
+
2
+
3
+ Processing WelcomeController#index (for 127.0.0.1 at 2009-11-02 16:47:38) [GET]
4
+ Completed in 9ms (View: 2, DB: 0) | 200 OK [http://localhost/]
5
+
6
+
7
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:47:43) [GET]
8
+ Redirected to http://localhost:3000/oauth_login
9
+ Completed in 2ms (DB: 0) | 302 Found [http://localhost/login]
10
+ /!\ FAILSAFE /!\ Mon Nov 02 16:47:43 -0700 2009
11
+ Status: 500 Internal Server Error
12
+ 401 Unauthorized
13
+ /usr/lib/ruby/gems/1.8/gems/oauth-0.3.5/lib/oauth/consumer.rb:199:in `token_request'
14
+ /usr/lib/ruby/gems/1.8/gems/oauth-0.3.5/lib/oauth/consumer.rb:125:in `get_request_token'
15
+ /home/remi/projects/remi/rack-oauth/examples/rails-example/config/../../../lib/rack-oauth.rb:205:in `do_login'
16
+ /home/remi/projects/remi/rack-oauth/examples/rails-example/config/../../../lib/rack-oauth.rb:190:in `call'
17
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
18
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
19
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
20
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
21
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
22
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
23
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
24
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
25
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'
26
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in `run'
27
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'
28
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in `call'
29
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'
30
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'
31
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'
32
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:17:in `call'
33
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'
34
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in `call'
35
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:in `process'
36
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
37
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
38
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
39
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
40
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
41
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
42
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
43
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
44
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
45
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
46
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in `run'
47
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
48
+ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
49
+ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
50
+ ./script/server:3
51
+ /!\ FAILSAFE /!\ Mon Nov 02 16:48:16 -0700 2009
52
+ Status: 500 Internal Server Error
53
+ 401 Unauthorized
54
+ /usr/lib/ruby/gems/1.8/gems/oauth-0.3.5/lib/oauth/consumer.rb:199:in `token_request'
55
+ /usr/lib/ruby/gems/1.8/gems/oauth-0.3.5/lib/oauth/consumer.rb:125:in `get_request_token'
56
+ /home/remi/projects/remi/rack-oauth/examples/rails-example/config/../../../lib/rack-oauth.rb:205:in `do_login'
57
+ /home/remi/projects/remi/rack-oauth/examples/rails-example/config/../../../lib/rack-oauth.rb:190:in `call'
58
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
59
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
60
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
61
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
62
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
63
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
64
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
65
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
66
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'
67
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in `run'
68
+ /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'
69
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in `call'
70
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in `call'
71
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `each'
72
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in `call'
73
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:17:in `call'
74
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'
75
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in `call'
76
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:61:in `process'
77
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
78
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
79
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
80
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
81
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
82
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
83
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
84
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
85
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
86
+ /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
87
+ /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:34:in `run'
88
+ /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
89
+ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
90
+ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
91
+ ./script/server:3
92
+
93
+
94
+ Processing WelcomeController#index (for 127.0.0.1 at 2009-11-02 16:49:40) [GET]
95
+ Completed in 5ms (View: 3, DB: 0) | 200 OK [http://localhost/]
96
+
97
+
98
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:49:44) [GET]
99
+
100
+ RuntimeError (test mode? false):
101
+ app/controllers/welcome_controller.rb:14:in `login'
102
+
103
+ Rendered rescues/_trace (35.7ms)
104
+ Rendered rescues/_request_and_response (1.2ms)
105
+ Rendering rescues/layout (internal_server_error)
106
+
107
+
108
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:49:53) [GET]
109
+
110
+ RuntimeError (test mode? true):
111
+ app/controllers/welcome_controller.rb:15:in `login'
112
+
113
+ Rendered rescues/_trace (32.9ms)
114
+ Rendered rescues/_request_and_response (0.3ms)
115
+ Rendering rescues/layout (internal_server_error)
116
+
117
+
118
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:49:58) [GET]
119
+ Redirected to http://localhost:3000/oauth_login
120
+ Completed in 5ms (DB: 0) | 302 Found [http://localhost/login]
121
+
122
+
123
+ Processing ApplicationController#index (for 127.0.0.1 at 2009-11-02 16:49:58) [GET]
124
+
125
+ ActionController::RoutingError (No route matches "/oauth_complete" with {:method=>:get}):
126
+
127
+
128
+ Rendering rescues/layout (not_found)
129
+
130
+
131
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:50:55) [GET]
132
+ Redirected to http://localhost:3000/oauth_login
133
+ Completed in 2ms (DB: 0) | 302 Found [http://localhost/login]
134
+
135
+
136
+ Processing WelcomeController#after_login (for 127.0.0.1 at 2009-11-02 16:50:55) [GET]
137
+ Completed in 3ms (View: 1, DB: 0) | 200 OK [http://localhost/oauth_complete]
138
+
139
+
140
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:51:02) [GET]
141
+ Redirected to http://localhost:3000/oauth_login
142
+ Completed in 5ms (DB: 0) | 302 Found [http://localhost/login]
143
+
144
+
145
+ Processing WelcomeController#after_login (for 127.0.0.1 at 2009-11-02 16:51:03) [GET]
146
+ Redirected to http://localhost:3000/
147
+ Completed in 6ms (DB: 0) | 302 Found [http://localhost/oauth_complete]
148
+
149
+
150
+ Processing WelcomeController#index (for 127.0.0.1 at 2009-11-02 16:51:03) [GET]
151
+ Completed in 7ms (View: 1, DB: 0) | 200 OK [http://localhost/]
152
+
153
+
154
+ Processing WelcomeController#login (for 127.0.0.1 at 2009-11-02 16:51:07) [GET]
155
+ Redirected to http://localhost:3000/oauth_login
156
+ Completed in 4ms (DB: 0) | 302 Found [http://localhost/login]
157
+
158
+
159
+ Processing WelcomeController#after_login (for 127.0.0.1 at 2009-11-02 16:51:07) [GET]
160
+ Redirected to http://localhost:3000/
161
+ Completed in 2ms (DB: 0) | 302 Found [http://localhost/oauth_complete]
162
+
163
+
164
+ Processing WelcomeController#index (for 127.0.0.1 at 2009-11-02 16:51:07) [GET]
165
+ Completed in 2ms (View: 0, DB: 0) | 200 OK [http://localhost/]
File without changes
File without changes