Skip to content

Commit a1a04b8

Browse files
committed
cleanup rdoc lefovers
1 parent 0b803ff commit a1a04b8

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

lib/rack/openid.rb

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
require 'openid/extensions/oauth'
99
require 'openid/extensions/pape'
1010

11-
module Rack #:nodoc:
11+
module Rack
1212
# A Rack middleware that provides a more HTTPish API around the
1313
# ruby-openid library.
1414
#
@@ -17,7 +17,7 @@ module Rack #:nodoc:
1717
# header with the identifier you would like to validate.
1818
#
1919
# On competition, the OpenID response is automatically verified and
20-
# assigned to <tt>env["rack.openid.response"]</tt>.
20+
# assigned to env["rack.openid.response"].
2121
class OpenID
2222
# Helper method for building the "WWW-Authenticate" header value.
2323
#
@@ -53,18 +53,16 @@ def self.parse_header(str)
5353
params
5454
end
5555

56-
class TimeoutResponse #:nodoc:
56+
class TimeoutResponse
5757
include ::OpenID::Consumer::Response
5858
STATUS = :failure
5959
end
6060

61-
class MissingResponse #:nodoc:
61+
class MissingResponse
6262
include ::OpenID::Consumer::Response
6363
STATUS = :missing
6464
end
6565

66-
# :stopdoc:
67-
6866
HTTP_METHODS = %w(GET HEAD PUT POST DELETE OPTIONS)
6967

7068
RESPONSE = "rack.openid.response"
@@ -73,8 +71,6 @@ class MissingResponse #:nodoc:
7371

7472
URL_FIELD_SELECTOR = lambda { |field| field.to_s =~ %r{^https?://} }
7573

76-
# :startdoc:
77-
7874
# Initialize middleware with application and optional OpenID::Store.
7975
# If no store is given, OpenID::Store::Memory is used.
8076
#
@@ -89,7 +85,7 @@ def initialize(app, store = nil)
8985
end
9086

9187
# Standard Rack +call+ dispatch that accepts an +env+ and
92-
# returns a <tt>[status, header, body]</tt> response.
88+
# returns a [status, header, body] response.
9389
def call(env)
9490
req = Rack::Request.new(env)
9591

@@ -283,8 +279,7 @@ def add_attribute_exchange_fields(oidreq, fields)
283279
end
284280

285281
def add_oauth_fields(oidreq, fields)
286-
if (consumer = fields['oauth[consumer]']) &&
287-
(scope = fields['oauth[scope]'])
282+
if (consumer = fields['oauth[consumer]']) && (scope = fields['oauth[scope]'])
288283
oauthreq = ::OpenID::OAuth::Request.new(consumer, Array(scope).join(' '))
289284
oidreq.add_extension(oauthreq)
290285
end
@@ -306,9 +301,9 @@ def default_store
306301
end
307302

308303
def timeout_protection_from_identity_server
309-
yield
310-
rescue Timeout::Error
311-
TimeoutResponse.new
312-
end
304+
yield
305+
rescue Timeout::Error
306+
TimeoutResponse.new
307+
end
313308
end
314309
end

lib/rack/openid/simple_auth.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
require 'rack/openid'
22
require 'rack/request'
33

4-
module Rack #:nodoc:
4+
module Rack
55
class OpenID
66
# A simple OpenID middleware that restricts access to
77
# a single identifier.
88
#
99
# use Rack::OpenID::SimpleAuth, "http://example.org"
1010
#
1111
# SimpleAuth will automatically insert the required Rack::OpenID
12-
# middleware, so <tt>use Rack::OpenID</tt> is unnecessary.
12+
# middleware, so use Rack::OpenID is unnecessary.
1313
class SimpleAuth
1414
def self.new(*args)
1515
Rack::OpenID.new(super)
@@ -71,8 +71,8 @@ def authentication_request
7171
end
7272

7373
def www_authenticate_header
74-
OpenID.build_header(:identifier => identifier)
75-
end
74+
OpenID.build_header(:identifier => identifier)
75+
end
7676
end
7777
end
7878
end

0 commit comments

Comments
 (0)