Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

remove trailing whitespace within actionpack #8043

Merged
merged 1 commit into from

2 participants

Yves Senn Rafael Mendonça França
Yves Senn
Owner

I've been browsing the actionpack source lately and submitted a few patches.
There were occasions of trailing whitespace and to keep the commit diffs clean,
I removed them all in one go.

Yves Senn
Owner

@rafaelfranca this is just cleanup stuff. I really don't like trailing whitespace. If you agree I'll also remove the whitespace in other parts of rails.

Rafael Mendonça França

I agree that we need to clean this but I think is not a good idea do this to entire framework because can invalidate some pull requests. However I'll merge this one

Thank you

Rafael Mendonça França rafaelfranca merged commit f3807a8 into from
Yves Senn
Owner

@rafaelfranca what is your prefered way of cleaning them? adding a separate commit to PR which, touch a file that has trailing whitespace? include the trailing whitespace removal in the patch-commit?

Rafael Mendonça França

I always do in a separate commit to PR which touch a file that has trailing whitespaces. see 623f2fb

Yves Senn
Owner

thanks, now I know ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 27, 2012
  1. Yves Senn
This page is out of date. Refresh to see the latest.
2  actionpack/lib/abstract_controller/rendering.rb
View
@@ -51,7 +51,7 @@ def view_context_class
@view_context_class ||= begin
routes = respond_to?(:_routes) && _routes
helpers = respond_to?(:_helpers) && _helpers
-
+
Class.new(ActionView::Base) do
if routes
include routes.url_helpers
2  actionpack/lib/action_controller/metal/mime_responds.rb
View
@@ -259,7 +259,7 @@ def respond_to(*mimes, &block)
# * for other requests - i.e. data formats such as xml, json, csv etc, if
# the resource passed to +respond_with+ responds to <code>to_<format></code>,
# the method attempts to render the resource in the requested format
- # directly, e.g. for an xml request, the response is equivalent to calling
+ # directly, e.g. for an xml request, the response is equivalent to calling
# <code>render :xml => resource</code>.
#
# === Nested resources
8 actionpack/test/activerecord/controller_runtime_test.rb
View
@@ -15,7 +15,7 @@ def show
def zero
render :inline => "Zero DB runtime"
end
-
+
def redirect
Project.all
redirect_to :action => 'show'
@@ -63,18 +63,18 @@ def test_runtime_reset_before_requests
assert_equal 2, @logger.logged(:info).size
assert_match(/\(Views: [\d.]+ms \| ActiveRecord: 0.0ms\)/, @logger.logged(:info)[1])
end
-
+
def test_log_with_active_record_when_redirecting
get :redirect
wait
assert_equal 3, @logger.logged(:info).size
assert_match(/\(ActiveRecord: [\d.]+ms\)/, @logger.logged(:info)[2])
end
-
+
def test_include_time_query_time_after_rendering
get :db_after_render
wait
-
+
assert_equal 2, @logger.logged(:info).size
assert_match(/\(Views: [\d.]+ms \| ActiveRecord: ([1-9][\d.]+)ms\)/, @logger.logged(:info)[1])
end
2  actionpack/test/controller/default_url_options_with_filter_test.rb
View
@@ -16,7 +16,7 @@ def redirect
def default_url_options
{:locale => "de"}
- end
+ end
end
class ControllerWithBeforeFilterAndDefaultUrlOptionsTest < ActionController::TestCase
4 actionpack/test/controller/http_basic_authentication_test.rb
View
@@ -19,7 +19,7 @@ def display
def show
render :text => 'Only for loooooong credentials'
end
-
+
def search
render :text => 'All inline'
end
@@ -118,7 +118,7 @@ def test_encode_credentials_has_no_newline
assert assigns(:logged_in)
assert_equal 'Definitely Maybe', @response.body
end
-
+
test "authenticate with class method" do
@request.env['HTTP_AUTHORIZATION'] = encode_credentials('David', 'Goliath')
get :search
2  actionpack/test/controller/mime_responds_test.rb
View
@@ -240,7 +240,7 @@ def test_js_or_html
assert_equal 'HTML', @response.body
@request.accept = "text/javascript, text/html"
-
+
assert_raises(ActionController::UnknownFormat) do
xhr :get, :just_xml
end
4 actionpack/test/controller/new_base/middleware_test.rb
View
@@ -25,14 +25,14 @@ def call(env)
result
end
end
-
+
class BlockMiddleware
attr_accessor :configurable_message
def initialize(app, &block)
@app = app
yield(self) if block_given?
end
-
+
def call(env)
result = @app.call(env)
result[1]["Configurable-Message"] = configurable_message
2  actionpack/test/controller/new_base/render_partial_test.rb
View
@@ -28,7 +28,7 @@ def overriden
@test_unchanged = 'hello'
end
end
-
+
class ChildController < BasicController; end
class TestPartial < Rack::TestCase
2  actionpack/test/controller/send_file_test.rb
View
@@ -134,7 +134,7 @@ def test_send_file_headers_with_bad_symbol
@controller.headers = {}
assert_raise(ArgumentError){ @controller.send(:send_file_headers!, options) }
end
-
+
def test_send_file_headers_guess_type_from_extension
{
'image.png' => 'image/png',
2  actionpack/test/template/digestor_test.rb
View
@@ -63,7 +63,7 @@ def test_third_level_dependency
change_template("comments/_comment")
end
end
-
+
def test_directory_depth_dependency
assert_digest_difference("level/below/index") do
change_template("level/below/_header")
4 actionpack/test/template/render_test.rb
View
@@ -451,12 +451,12 @@ def test_render_layout_with_object
assert_equal %(<title>David</title>),
@view.render(:file => "test/layout_render_object")
end
-
+
def test_render_with_passing_couple_extensions_to_one_register_template_handler_function_call
ActionView::Template.register_template_handler :foo1, :foo2, CustomHandler
assert_equal @view.render(:inline => "Hello, World!", :type => :foo1), @view.render(:inline => "Hello, World!", :type => :foo2)
end
-
+
def test_render_throws_exception_when_no_extensions_passed_to_register_template_handler_function_call
assert_raises(ArgumentError) { ActionView::Template.register_template_handler CustomHandler }
end
Something went wrong with that request. Please try again.