aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 20:20:22 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 20:20:22 +0200
commitb326e82dc012d81e9698cb1f402502af1788c1e9 (patch)
tree6b6452129a5b6b684f3d44f21afd2b1bea83fa22 /actionpack/lib/action_dispatch
parent80e66cc4d90bf8c15d1a5f6e3152e90147f00772 (diff)
downloadrails-b326e82dc012d81e9698cb1f402502af1788c1e9.tar.gz
rails-b326e82dc012d81e9698cb1f402502af1788c1e9.tar.bz2
rails-b326e82dc012d81e9698cb1f402502af1788c1e9.zip
applies remaining conventions across the project
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/http/cache.rb1
-rw-r--r--actionpack/lib/action_dispatch/http/filter_redirect.rb2
-rw-r--r--actionpack/lib/action_dispatch/http/url.rb2
-rw-r--r--actionpack/lib/action_dispatch/journey/parser.rb1
-rw-r--r--actionpack/lib/action_dispatch/journey/path/pattern.rb2
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb1
-rw-r--r--actionpack/lib/action_dispatch/journey/router.rb2
-rw-r--r--actionpack/lib/action_dispatch/journey/visitors.rb4
-rw-r--r--actionpack/lib/action_dispatch/middleware/params_parser.rb1
-rw-r--r--actionpack/lib/action_dispatch/middleware/remote_ip.rb2
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/abstract_store.rb1
-rw-r--r--actionpack/lib/action_dispatch/request/utils.rb1
-rw-r--r--actionpack/lib/action_dispatch/routing/redirection.rb1
13 files changed, 5 insertions, 16 deletions
diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb
index 40fe96c2a3..985e0fb972 100644
--- a/actionpack/lib/action_dispatch/http/cache.rb
+++ b/actionpack/lib/action_dispatch/http/cache.rb
@@ -2,7 +2,6 @@ module ActionDispatch
module Http
module Cache
module Request
-
HTTP_IF_MODIFIED_SINCE = "HTTP_IF_MODIFIED_SINCE".freeze
HTTP_IF_NONE_MATCH = "HTTP_IF_NONE_MATCH".freeze
diff --git a/actionpack/lib/action_dispatch/http/filter_redirect.rb b/actionpack/lib/action_dispatch/http/filter_redirect.rb
index 840234dbcb..fc3c44582a 100644
--- a/actionpack/lib/action_dispatch/http/filter_redirect.rb
+++ b/actionpack/lib/action_dispatch/http/filter_redirect.rb
@@ -1,7 +1,6 @@
module ActionDispatch
module Http
module FilterRedirect
-
FILTERED = "[FILTERED]".freeze # :nodoc:
def filtered_location # :nodoc:
@@ -31,7 +30,6 @@ module ActionDispatch
end
end
end
-
end
end
end
diff --git a/actionpack/lib/action_dispatch/http/url.rb b/actionpack/lib/action_dispatch/http/url.rb
index 2087ad02cd..e85ea90b94 100644
--- a/actionpack/lib/action_dispatch/http/url.rb
+++ b/actionpack/lib/action_dispatch/http/url.rb
@@ -302,7 +302,7 @@ module ActionDispatch
# req.standard_port # => 80
def standard_port
case protocol
- when "https://" then 443
+ when "https://" then 443
else 80
end
end
diff --git a/actionpack/lib/action_dispatch/journey/parser.rb b/actionpack/lib/action_dispatch/journey/parser.rb
index 9b4707369b..38984edd3b 100644
--- a/actionpack/lib/action_dispatch/journey/parser.rb
+++ b/actionpack/lib/action_dispatch/journey/parser.rb
@@ -192,7 +192,6 @@ module ActionDispatch
def _reduce_none(val, _values)
val[0]
end
-
end # class Parser
end # module Journey
end # module ActionDispatch
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb
index 0f2ae00bc0..0902b9233e 100644
--- a/actionpack/lib/action_dispatch/journey/path/pattern.rb
+++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb
@@ -4,7 +4,7 @@ module ActionDispatch
class Pattern # :nodoc:
attr_reader :spec, :requirements, :anchored
- def self.from_string string
+ def self.from_string(string)
build(string, {}, "/.?", true)
end
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index f437897522..a9713ff292 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -38,7 +38,6 @@ module ActionDispatch
hash[verb.downcase] = klass
hash[verb.downcase.to_sym] = klass
end
-
end
def self.verb_matcher(verb)
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb
index 513ef08410..727763c972 100644
--- a/actionpack/lib/action_dispatch/journey/router.rb
+++ b/actionpack/lib/action_dispatch/journey/router.rb
@@ -92,7 +92,7 @@ module ActionDispatch
simulator.memos(path) { [] }
end
- def find_routes req
+ def find_routes(req)
routes = filter_routes(req.path_info).concat custom_routes.find_all { |r|
r.path.match(req.path_info)
}
diff --git a/actionpack/lib/action_dispatch/journey/visitors.rb b/actionpack/lib/action_dispatch/journey/visitors.rb
index 8476c5d079..452dc84cc5 100644
--- a/actionpack/lib/action_dispatch/journey/visitors.rb
+++ b/actionpack/lib/action_dispatch/journey/visitors.rb
@@ -57,7 +57,7 @@ module ActionDispatch
private
- def visit node
+ def visit(node)
send(DISPATCH_CACHE[node.type], node)
end
@@ -97,7 +97,7 @@ module ActionDispatch
visit(node, seed)
end
- def visit node, seed
+ def visit(node, seed)
send(DISPATCH_CACHE[node.type], node, seed)
end
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb
index 755bc0d315..5f96b80e87 100644
--- a/actionpack/lib/action_dispatch/middleware/params_parser.rb
+++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -10,7 +10,6 @@ module ActionDispatch
# Raised when raw data from the request cannot be parsed by the parser
# defined for request's content mime type.
class ParseError < StandardError
-
def initialize(message = nil, original_exception = nil)
if message
ActiveSupport::Deprecation.warn("Passing #message is deprecated and has no effect. " \
diff --git a/actionpack/lib/action_dispatch/middleware/remote_ip.rb b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
index 101950aae3..523eeb5b05 100644
--- a/actionpack/lib/action_dispatch/middleware/remote_ip.rb
+++ b/actionpack/lib/action_dispatch/middleware/remote_ip.rb
@@ -176,8 +176,6 @@ module ActionDispatch
@proxies.any? { |proxy| proxy === ip }
end
end
-
end
-
end
end
diff --git a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
index d903338a2b..60920ea6c8 100644
--- a/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/abstract_store.rb
@@ -7,7 +7,6 @@ require "action_dispatch/request/session"
module ActionDispatch
module Session
class SessionRestoreError < StandardError #:nodoc:
-
def initialize(const_error = nil)
if const_error
ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \
diff --git a/actionpack/lib/action_dispatch/request/utils.rb b/actionpack/lib/action_dispatch/request/utils.rb
index ba622131e7..282bdbd2be 100644
--- a/actionpack/lib/action_dispatch/request/utils.rb
+++ b/actionpack/lib/action_dispatch/request/utils.rb
@@ -1,7 +1,6 @@
module ActionDispatch
class Request
class Utils # :nodoc:
-
mattr_accessor :perform_deep_munge
self.perform_deep_munge = true
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb
index 25784cfd70..abb51ce357 100644
--- a/actionpack/lib/action_dispatch/routing/redirection.rb
+++ b/actionpack/lib/action_dispatch/routing/redirection.rb
@@ -133,7 +133,6 @@ module ActionDispatch
end
module Redirection
-
# Redirect any path to another path:
#
# get "/stories" => redirect("/posts")