rack-oauth 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +13 -10
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/examples/rails-example/app/controllers/application_controller.rb +6 -0
- data/examples/rails-example/app/controllers/welcome_controller.rb +1 -4
- data/examples/rails-example/config/environment.rb +3 -1
- data/examples/rails-example/config/environments/test.rb +1 -0
- data/examples/rails-example/log/development.log +76 -0
- data/examples/rails-example/log/test.log +159 -0
- data/examples/rails-example/spec/integration/login_spec.rb +2 -12
- data/examples/rails-example/spec/spec_helper.rb +4 -0
- data/examples/rails-example/tmp/webrat-1257219890.html +211 -0
- data/examples/rails-example/tmp/webrat-1257219947.html +213 -0
- data/examples/rails-example/tmp/webrat-1257219957.html +213 -0
- data/examples/sinatra-twitter.rb +5 -22
- data/lib/rack-oauth.rb +49 -110
- data/spec/sample_sinatra_app_spec.rb +11 -40
- metadata +25 -3
@@ -0,0 +1,213 @@
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
+
<head>
|
3
|
+
<title>Action Controller: Exception caught</title>
|
4
|
+
<style>
|
5
|
+
body { background-color: #fff; color: #333; }
|
6
|
+
|
7
|
+
body, p, ol, ul, td {
|
8
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
9
|
+
font-size: 13px;
|
10
|
+
line-height: 18px;
|
11
|
+
}
|
12
|
+
|
13
|
+
pre {
|
14
|
+
background-color: #eee;
|
15
|
+
padding: 10px;
|
16
|
+
font-size: 11px;
|
17
|
+
}
|
18
|
+
|
19
|
+
a { color: #000; }
|
20
|
+
a:visited { color: #666; }
|
21
|
+
a:hover { color: #fff; background-color:#000; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
|
26
|
+
<h1>
|
27
|
+
NameError
|
28
|
+
|
29
|
+
in WelcomeController#after_login
|
30
|
+
|
31
|
+
</h1>
|
32
|
+
<pre>undefined local variable or method `oauth_access_token' for #<WelcomeController:0x7f45a7a74858></pre>
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
<p><code>RAILS_ROOT: /home/remi/projects/remi/rack-oauth/examples/rails-example</code></p>
|
37
|
+
|
38
|
+
<div id="traces">
|
39
|
+
|
40
|
+
|
41
|
+
<a href="#" onclick="document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Application-Trace').style.display='block';; return false;">Application Trace</a> |
|
42
|
+
|
43
|
+
|
44
|
+
<a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='block';; return false;">Framework Trace</a> |
|
45
|
+
|
46
|
+
|
47
|
+
<a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='block';; return false;">Full Trace</a>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<div id="Application-Trace" style="display: block;">
|
52
|
+
<pre><code>/home/remi/projects/remi/rack-oauth/examples/rails-example/app/controllers/welcome_controller.rb:19:in `after_login'</code></pre>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div id="Framework-Trace" style="display: none;">
|
56
|
+
<pre><code>/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `send'
|
57
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
|
58
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
|
59
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
|
60
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
61
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
62
|
+
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
|
63
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
64
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
65
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
|
66
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action'
|
67
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
|
68
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
|
69
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process'
|
70
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
|
71
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
|
72
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
|
73
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
|
74
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
|
75
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
|
76
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
77
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
78
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
|
79
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
|
80
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
|
81
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
|
82
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
|
83
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
|
84
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
|
85
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
|
86
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
|
87
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
88
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
|
89
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
90
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'
|
91
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:47:in `_call'
|
92
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:35:in `call'
|
93
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:313:in `process'
|
94
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:196:in `get'
|
95
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `__send__'
|
96
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `get'
|
97
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `send'
|
98
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `do_request'
|
99
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:35:in `get'
|
100
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `send'
|
101
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `request_page'
|
102
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:120:in `request_page'
|
103
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:205:in `visit'
|
104
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `instance_eval'
|
105
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `execute'
|
106
|
+
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
|
107
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:37:in `execute'
|
108
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:207:in `run_examples'
|
109
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `each'
|
110
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `run_examples'
|
111
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:103:in `run'
|
112
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:23:in `run'
|
113
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `each'
|
114
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `run'
|
115
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options.rb:127:in `run_examples'
|
116
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_line.rb:9:in `run'
|
117
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4</code></pre>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div id="Full-Trace" style="display: none;">
|
121
|
+
<pre><code>/home/remi/projects/remi/rack-oauth/examples/rails-example/app/controllers/welcome_controller.rb:19:in `after_login'
|
122
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `send'
|
123
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
|
124
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
|
125
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
|
126
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
127
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
128
|
+
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
|
129
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
130
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
131
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
|
132
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action'
|
133
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
|
134
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
|
135
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process'
|
136
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
|
137
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
|
138
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
|
139
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
|
140
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
|
141
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
|
142
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
143
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
144
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
|
145
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
|
146
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
|
147
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
|
148
|
+
../../lib/rack-oauth.rb:186:in `call'
|
149
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
|
150
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
|
151
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
|
152
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
|
153
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
|
154
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
155
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
|
156
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
157
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'
|
158
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:47:in `_call'
|
159
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:35:in `call'
|
160
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:313:in `process'
|
161
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:196:in `get'
|
162
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `__send__'
|
163
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `get'
|
164
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `send'
|
165
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `do_request'
|
166
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:35:in `get'
|
167
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `send'
|
168
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `request_page'
|
169
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:120:in `request_page'
|
170
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:205:in `visit'
|
171
|
+
(eval):2:in `visit'
|
172
|
+
spec/integration/login_spec.rb:11
|
173
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `instance_eval'
|
174
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `execute'
|
175
|
+
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
|
176
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:37:in `execute'
|
177
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:207:in `run_examples'
|
178
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `each'
|
179
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `run_examples'
|
180
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:103:in `run'
|
181
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:23:in `run'
|
182
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `each'
|
183
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `run'
|
184
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options.rb:127:in `run_examples'
|
185
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_line.rb:9:in `run'
|
186
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4
|
187
|
+
/usr/bin/spec:19:in `load'
|
188
|
+
/usr/bin/spec:19</code></pre>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<h2 style="margin-top: 30px">Request</h2>
|
199
|
+
<p><b>Parameters</b>: <pre>None</pre></p>
|
200
|
+
|
201
|
+
<p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
|
202
|
+
<div id="session_dump" style="display:none"><pre class='debug_dump'>---
|
203
|
+
</pre></div>
|
204
|
+
|
205
|
+
|
206
|
+
<h2 style="margin-top: 30px">Response</h2>
|
207
|
+
<p><b>Headers</b>: <pre>{"Content-Type"=>"",
|
208
|
+
"Cache-Control"=>"no-cache"}</pre></p>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</body>
|
213
|
+
</html>
|
@@ -0,0 +1,213 @@
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
+
<head>
|
3
|
+
<title>Action Controller: Exception caught</title>
|
4
|
+
<style>
|
5
|
+
body { background-color: #fff; color: #333; }
|
6
|
+
|
7
|
+
body, p, ol, ul, td {
|
8
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
9
|
+
font-size: 13px;
|
10
|
+
line-height: 18px;
|
11
|
+
}
|
12
|
+
|
13
|
+
pre {
|
14
|
+
background-color: #eee;
|
15
|
+
padding: 10px;
|
16
|
+
font-size: 11px;
|
17
|
+
}
|
18
|
+
|
19
|
+
a { color: #000; }
|
20
|
+
a:visited { color: #666; }
|
21
|
+
a:hover { color: #fff; background-color:#000; }
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
|
26
|
+
<h1>
|
27
|
+
NameError
|
28
|
+
|
29
|
+
in WelcomeController#after_login
|
30
|
+
|
31
|
+
</h1>
|
32
|
+
<pre>undefined local variable or method `oauth_access_token' for #<WelcomeController:0x7f6b2af39ca0></pre>
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
<p><code>RAILS_ROOT: /home/remi/projects/remi/rack-oauth/examples/rails-example</code></p>
|
37
|
+
|
38
|
+
<div id="traces">
|
39
|
+
|
40
|
+
|
41
|
+
<a href="#" onclick="document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Application-Trace').style.display='block';; return false;">Application Trace</a> |
|
42
|
+
|
43
|
+
|
44
|
+
<a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Full-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='block';; return false;">Framework Trace</a> |
|
45
|
+
|
46
|
+
|
47
|
+
<a href="#" onclick="document.getElementById('Application-Trace').style.display='none';document.getElementById('Framework-Trace').style.display='none';document.getElementById('Full-Trace').style.display='block';; return false;">Full Trace</a>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<div id="Application-Trace" style="display: block;">
|
52
|
+
<pre><code>/home/remi/projects/remi/rack-oauth/examples/rails-example/app/controllers/welcome_controller.rb:19:in `after_login'</code></pre>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<div id="Framework-Trace" style="display: none;">
|
56
|
+
<pre><code>/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `send'
|
57
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
|
58
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
|
59
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
|
60
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
61
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
62
|
+
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
|
63
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
64
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
65
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
|
66
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action'
|
67
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
|
68
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
|
69
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process'
|
70
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
|
71
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
|
72
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
|
73
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
|
74
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
|
75
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
|
76
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
77
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
78
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
|
79
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
|
80
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
|
81
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
|
82
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
|
83
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
|
84
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
|
85
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
|
86
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
|
87
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
88
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
|
89
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
90
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'
|
91
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:47:in `_call'
|
92
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:35:in `call'
|
93
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:313:in `process'
|
94
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:196:in `get'
|
95
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `__send__'
|
96
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `get'
|
97
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `send'
|
98
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `do_request'
|
99
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:35:in `get'
|
100
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `send'
|
101
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `request_page'
|
102
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:120:in `request_page'
|
103
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:205:in `visit'
|
104
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `instance_eval'
|
105
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `execute'
|
106
|
+
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
|
107
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:37:in `execute'
|
108
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:207:in `run_examples'
|
109
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `each'
|
110
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `run_examples'
|
111
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:103:in `run'
|
112
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:23:in `run'
|
113
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `each'
|
114
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `run'
|
115
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options.rb:127:in `run_examples'
|
116
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_line.rb:9:in `run'
|
117
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4</code></pre>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div id="Full-Trace" style="display: none;">
|
121
|
+
<pre><code>/home/remi/projects/remi/rack-oauth/examples/rails-example/app/controllers/welcome_controller.rb:19:in `after_login'
|
122
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `send'
|
123
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
|
124
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
|
125
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
|
126
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
127
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
128
|
+
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
|
129
|
+
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
|
130
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
|
131
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
|
132
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action'
|
133
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
|
134
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
|
135
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process'
|
136
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
|
137
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
|
138
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
|
139
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
|
140
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
|
141
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
|
142
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
143
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
|
144
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
|
145
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
|
146
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
|
147
|
+
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
|
148
|
+
../../lib/rack-oauth.rb:186:in `call'
|
149
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
|
150
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
|
151
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
|
152
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
|
153
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
|
154
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
155
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
|
156
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
|
157
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'
|
158
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:47:in `_call'
|
159
|
+
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lint.rb:35:in `call'
|
160
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:313:in `process'
|
161
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:196:in `get'
|
162
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `__send__'
|
163
|
+
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/integration.rb:491:in `get'
|
164
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `send'
|
165
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:70:in `do_request'
|
166
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/rails.rb:35:in `get'
|
167
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `send'
|
168
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:106:in `request_page'
|
169
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:120:in `request_page'
|
170
|
+
/usr/lib/ruby/gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:205:in `visit'
|
171
|
+
(eval):2:in `visit'
|
172
|
+
spec/integration/login_spec.rb:11
|
173
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `instance_eval'
|
174
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:40:in `execute'
|
175
|
+
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
|
176
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_methods.rb:37:in `execute'
|
177
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:207:in `run_examples'
|
178
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `each'
|
179
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:205:in `run_examples'
|
180
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/example_group_methods.rb:103:in `run'
|
181
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:23:in `run'
|
182
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `each'
|
183
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/example_group_runner.rb:22:in `run'
|
184
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/options.rb:127:in `run_examples'
|
185
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/command_line.rb:9:in `run'
|
186
|
+
/usr/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4
|
187
|
+
/usr/bin/spec:19:in `load'
|
188
|
+
/usr/bin/spec:19</code></pre>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<h2 style="margin-top: 30px">Request</h2>
|
199
|
+
<p><b>Parameters</b>: <pre>None</pre></p>
|
200
|
+
|
201
|
+
<p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
|
202
|
+
<div id="session_dump" style="display:none"><pre class='debug_dump'>---
|
203
|
+
</pre></div>
|
204
|
+
|
205
|
+
|
206
|
+
<h2 style="margin-top: 30px">Response</h2>
|
207
|
+
<p><b>Headers</b>: <pre>{"Content-Type"=>"",
|
208
|
+
"Cache-Control"=>"no-cache"}</pre></p>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
</body>
|
213
|
+
</html>
|
data/examples/sinatra-twitter.rb
CHANGED
@@ -8,40 +8,23 @@ use Rack::OAuth, :site => 'http://twitter.com', :key => '4JjFmhjfZyQ6rdbiql5A',
|
|
8
8
|
:secret => 'rv4ZaCgvxVPVjxHIDbMxTGFbIMxUa4KkIdPqL7HmaQo'
|
9
9
|
|
10
10
|
helpers do
|
11
|
-
|
12
|
-
# todo ... make wrapper that handles ENV?
|
13
|
-
def oauth
|
14
|
-
Rack::OAuth.get(env)
|
15
|
-
end
|
16
|
-
|
11
|
+
include Rack::OAuth::Methods
|
17
12
|
end
|
18
13
|
|
19
14
|
get '/' do
|
20
|
-
|
15
|
+
"home page"
|
21
16
|
end
|
22
17
|
|
23
18
|
get '/creds' do
|
24
|
-
|
25
|
-
|
19
|
+
info = get_access_token.get '/account/verify_credentials.json'
|
20
|
+
info.to_yaml
|
26
21
|
end
|
27
22
|
|
28
23
|
get '/oauth_complete' do
|
29
|
-
|
24
|
+
"oauth complete! ... session: #{ session.to_yaml }"
|
30
25
|
end
|
31
26
|
|
32
27
|
get '/logout' do
|
33
28
|
session.clear
|
34
29
|
redirect '/'
|
35
30
|
end
|
36
|
-
|
37
|
-
__END__
|
38
|
-
|
39
|
-
@@ index
|
40
|
-
|
41
|
-
%h1 Twitter OAuth Example
|
42
|
-
|
43
|
-
- if @user
|
44
|
-
%p User:
|
45
|
-
%pre~ @user.to_yaml
|
46
|
-
|
47
|
-
%pre~ session.to_yaml
|