From 762e3f05f3d372cb32570db0deeef27232c4dd00 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 7 Aug 2016 17:50:59 +0900 Subject: Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty lines --- actionpack/lib/action_dispatch/journey/parser.rb | 1 - actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 2 -- actionpack/test/abstract_unit.rb | 1 - actionpack/test/controller/caching_test.rb | 1 - actionpack/test/controller/helper_test.rb | 1 - actionpack/test/controller/mime/respond_to_test.rb | 2 -- actionpack/test/controller/render_json_test.rb | 1 - actionpack/test/controller/request_forgery_protection_test.rb | 1 - actionpack/test/controller/send_file_test.rb | 1 - actionpack/test/dispatch/request_id_test.rb | 1 - actionpack/test/dispatch/request_test.rb | 1 - actionpack/test/dispatch/routing/inspector_test.rb | 1 - actionpack/test/dispatch/static_test.rb | 1 - 13 files changed, 15 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/journey/parser.rb b/actionpack/lib/action_dispatch/journey/parser.rb index 38984edd3b..91fef7e96f 100644 --- a/actionpack/lib/action_dispatch/journey/parser.rb +++ b/actionpack/lib/action_dispatch/journey/parser.rb @@ -6,7 +6,6 @@ require "racc/parser.rb" - require "action_dispatch/journey/parser_extras" module ActionDispatch module Journey diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb index 3e2b21ac72..eb96466aa5 100644 --- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb @@ -134,7 +134,6 @@ module ActionDispatch opts end - %w(edit new).each do |action| module_eval <<-EOT, __FILE__, __LINE__ + 1 def #{action}_polymorphic_url(record_or_hash, options = {}) @@ -211,7 +210,6 @@ module ActionDispatch method, args = builder.handle_model record_or_hash_or_array end - if options.empty? recipient.send(method, *args) else diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 367eb90831..1c7f6b4e41 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -247,7 +247,6 @@ module ActionController end end - class ::ApplicationController < ActionController::Base end diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 97d77706d1..08aa383886 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -277,7 +277,6 @@ CACHED @store.read("views/test.host/functional_caching/formatted_fragment_cached/#{template_digest("functional_caching/formatted_fragment_cached")}") end - def test_fragment_caching_with_variant get :formatted_fragment_cached_with_variant, format: "html", params: { v: :phone } assert_response :success diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index d18e19f961..981b67f685 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -247,7 +247,6 @@ class HelperTest < ActiveSupport::TestCase end end - class IsolatedHelpersTest < ActionController::TestCase class A < ActionController::Base def index diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb index 26545686df..2b6d319999 100644 --- a/actionpack/test/controller/mime/respond_to_test.rb +++ b/actionpack/test/controller/mime/respond_to_test.rb @@ -51,7 +51,6 @@ class RespondToController < ActionController::Base end end - def forced_xml request.format = :xml @@ -109,7 +108,6 @@ class RespondToController < ActionController::Base end end - def custom_constant_handling respond_to do |type| type.html { render body: "HTML" } diff --git a/actionpack/test/controller/render_json_test.rb b/actionpack/test/controller/render_json_test.rb index 69fbf59905..31b11588fd 100644 --- a/actionpack/test/controller/render_json_test.rb +++ b/actionpack/test/controller/render_json_test.rb @@ -86,7 +86,6 @@ class RenderJsonTest < ActionController::TestCase assert_equal "[]", @response.body end - def test_render_json get :render_json_hello_world assert_equal '{"hello":"world"}', @response.body diff --git a/actionpack/test/controller/request_forgery_protection_test.rb b/actionpack/test/controller/request_forgery_protection_test.rb index 2e6b7be88b..03f112c34d 100644 --- a/actionpack/test/controller/request_forgery_protection_test.rb +++ b/actionpack/test/controller/request_forgery_protection_test.rb @@ -99,7 +99,6 @@ class PrependProtectForgeryBaseController < ActionController::Base @called_callbacks << name end - def custom_action add_called_callback("custom_action") end diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index e78478b16c..3fb0ee8059 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -159,7 +159,6 @@ class SendFileTest < ActionController::TestCase assert_equal "image/png", response.content_type end - def test_send_file_headers_with_bad_symbol error = assert_raise(ArgumentError) { get __method__ } assert_equal "Unknown MIME type this_type_is_not_registered", error.message diff --git a/actionpack/test/dispatch/request_id_test.rb b/actionpack/test/dispatch/request_id_test.rb index 793ce67db4..4fcd45acf5 100644 --- a/actionpack/test/dispatch/request_id_test.rb +++ b/actionpack/test/dispatch/request_id_test.rb @@ -50,7 +50,6 @@ class RequestIdResponseTest < ActionDispatch::IntegrationTest end end - private def with_test_route_set diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 0cac971daa..0dc8a2508e 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -1069,7 +1069,6 @@ class RequestParameters < BaseRequestTest end end - class RequestParameterFilter < BaseRequestTest test "process parameter filter" do test_hashes = [ diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index 115770b7cd..97137a4762 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -338,7 +338,6 @@ module ActionDispatch " DELETE /admin/posts/:id(.:format) admin/posts#destroy"], output end - def test_regression_route_with_controller_regexp output = draw do ActiveSupport::Deprecation.silence do diff --git a/actionpack/test/dispatch/static_test.rb b/actionpack/test/dispatch/static_test.rb index 404cc00cd1..e8f0ce21e9 100644 --- a/actionpack/test/dispatch/static_test.rb +++ b/actionpack/test/dispatch/static_test.rb @@ -82,7 +82,6 @@ module StaticTests assert_html "means hello in Japanese\n", get("/foo/#{Rack::Utils.escape("こんにちは.html")}") end - def test_serves_static_file_with_exclamation_mark_in_filename with_static_file "/foo/foo!bar.html" do |file| assert_html file, get("/foo/foo%21bar.html") -- cgit v1.2.3