]> git.openstreetmap.org Git - rails.git/commitdiff
Fix new rubocop warnings
authorTom Hughes <tom@compton.nu>
Wed, 31 Oct 2018 18:49:21 +0000 (18:49 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 31 Oct 2018 19:14:39 +0000 (19:14 +0000)
lib/classic_pagination/pagination.rb
lib/diff_reader.rb
lib/tasks/auto_annotate_models.rake
test/controllers/amf_controller_test.rb

index 811d09239d0fe5a325e3aca04204d86470434af5..dbeaf5a408e66dfd757b6d63fb5ea639a49c44bc 100644 (file)
@@ -67,17 +67,17 @@ module ActionController
       DEFAULT_OPTIONS = {
         :class_name => nil,
         :singular_name => nil,
-        :per_page   => 10,
+        :per_page => 10,
         :conditions => nil,
-        :order_by   => nil,
-        :order      => nil,
-        :join       => nil,
-        :joins      => nil,
-        :count      => nil,
-        :include    => nil,
-        :select     => nil,
-        :group      => nil,
-        :parameter  => "page"
+        :order_by => nil,
+        :order => nil,
+        :join => nil,
+        :joins => nil,
+        :count => nil,
+        :include => nil,
+        :select => nil,
+        :group => nil,
+        :parameter => "page"
       }.freeze
     end
 
index cb553bfbcad71a095c0940f61b3fb5341d1d4712..e3c533b7af6e8357a1a6b821792b2da6cbb0e3df 100644 (file)
@@ -8,8 +8,8 @@ class DiffReader
 
   # maps each element type to the model class which handles it
   MODELS = {
-    "node"     => Node,
-    "way"      => Way,
+    "node" => Node,
+    "way" => Way,
     "relation" => Relation
   }.freeze
 
index 53252b769739f835a351fb26ce04cbd5601d0879..954acbf227dc1a6309c5d47ff341d9e249ae9f3b 100644 (file)
@@ -6,41 +6,41 @@ if Rails.env.development?
     # You can override any of these by setting an environment variable of the
     # same name.
     Annotate.set_defaults(
-      "routes"                  => "false",
-      "position_in_routes"      => "before",
-      "position_in_class"       => "before",
-      "position_in_test"        => "before",
-      "position_in_fixture"     => "before",
-      "position_in_factory"     => "before",
-      "position_in_serializer"  => "before",
-      "show_foreign_keys"       => "true",
-      "show_indexes"            => "true",
-      "simple_indexes"          => "false",
-      "model_dir"               => "app/models",
-      "root_dir"                => "",
-      "include_version"         => "false",
-      "require"                 => "",
-      "exclude_tests"           => "true",
-      "exclude_fixtures"        => "true",
-      "exclude_factories"       => "true",
-      "exclude_serializers"     => "true",
-      "exclude_scaffolds"       => "true",
-      "exclude_controllers"     => "true",
-      "exclude_helpers"         => "true",
-      "ignore_model_sub_dir"    => "false",
-      "ignore_columns"          => nil,
-      "ignore_routes"           => nil,
-      "ignore_unknown_models"   => "false",
+      "routes" => "false",
+      "position_in_routes" => "before",
+      "position_in_class" => "before",
+      "position_in_test" => "before",
+      "position_in_fixture" => "before",
+      "position_in_factory" => "before",
+      "position_in_serializer" => "before",
+      "show_foreign_keys" => "true",
+      "show_indexes" => "true",
+      "simple_indexes" => "false",
+      "model_dir" => "app/models",
+      "root_dir" => "",
+      "include_version" => "false",
+      "require" => "",
+      "exclude_tests" => "true",
+      "exclude_fixtures" => "true",
+      "exclude_factories" => "true",
+      "exclude_serializers" => "true",
+      "exclude_scaffolds" => "true",
+      "exclude_controllers" => "true",
+      "exclude_helpers" => "true",
+      "ignore_model_sub_dir" => "false",
+      "ignore_columns" => nil,
+      "ignore_routes" => nil,
+      "ignore_unknown_models" => "false",
       "hide_limit_column_types" => "integer,boolean",
-      "skip_on_db_migrate"      => "false",
-      "format_bare"             => "true",
-      "format_rdoc"             => "false",
-      "format_markdown"         => "false",
-      "sort"                    => "false",
-      "force"                   => "false",
-      "trace"                   => "false",
-      "wrapper_open"            => nil,
-      "wrapper_close"           => nil
+      "skip_on_db_migrate" => "false",
+      "format_bare" => "true",
+      "format_rdoc" => "false",
+      "format_markdown" => "false",
+      "sort" => "false",
+      "force" => "false",
+      "trace" => "false",
+      "wrapper_open" => nil,
+      "wrapper_close" => nil
     )
   end
 
index 0bdd01bd2e5f2209d22997d176c9007dbfdaffd1..650bf1f8ef031a3b8e19808dd2b32a58e45abb42 100644 (file)
@@ -360,11 +360,11 @@ class AmfControllerTest < ActionController::TestCase
   # into the method args.
   def test_getway_old_invalid
     way_id = create(:way, :with_history, :version => 2).id
-    { "foo"  => "bar",
+    { "foo" => "bar",
       way_id => "not a date",
       way_id => "2009-03-25 00:00:00",                   # <- wrong format
       way_id => "0 Jan 2009 00:00:00",                   # <- invalid date
-      -1     => "1 Jan 2009 00:00:00" }.each do |id, t|  # <- invalid
+      -1 => "1 Jan 2009 00:00:00" }.each do |id, t| # <- invalid
       amf_content "getway_old", "/1", [id, t]
       post :amf_read
       assert_response :success