From: Tom Hughes Date: Fri, 20 Feb 2015 19:53:13 +0000 (+0000) Subject: Standardise on "hash rocket" style for hashes X-Git-Tag: live~4828 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/4f4180e4bd28cd3e096a056941515f8c57278507 Standardise on "hash rocket" style for hashes --- diff --git a/.rubocop.yml b/.rubocop.yml index 555d76d36..a0533b162 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,5 +9,11 @@ Style/FileName: - 'script/locale/reload-languages' - 'script/update-spam-blocks' +Style/HashSyntax: + EnforcedStyle: hash_rockets + Exclude: + - 'lib/tasks/testing.rake' + - 'config/initializers/wrap_parameters.rb' + Style/StringLiterals: EnforcedStyle: double_quotes diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f43d2ac8c..418e7265d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -98,12 +98,6 @@ Style/GlobalVars: Style/GuardClause: Enabled: false -# Offense count: 5687 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/HashSyntax: - Enabled: false - # Offense count: 60 # Cop supports --auto-correct. Style/LineEndConcatenation: diff --git a/Vagrantfile b/Vagrantfile index 69ec5256d..1986dd1d9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,7 @@ Vagrant.configure("2") do |config| config.vm.box_url = "http://files.vagrantup.com/precise64.box" # port forward for webrick on 3000 - config.vm.network :forwarded_port, guest: 3000, host: 3000 + config.vm.network :forwarded_port, :guest => 3000, :host => 3000 # set up synced folder to source in /srv/openstreetmap-website config.vm.synced_folder ".", "/srv/openstreetmap-website" diff --git a/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb b/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb index b6962e7d5..4eab95ce7 100644 --- a/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb +++ b/db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb @@ -2,9 +2,9 @@ require "migrate" class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration def change - create_table :changesets_subscribers, id: false do |t| - t.column :subscriber_id, :bigint, null: false - t.column :changeset_id, :bigint, null: false + create_table :changesets_subscribers, :id => false do |t| + t.column :subscriber_id, :bigint, :null => false + t.column :changeset_id, :bigint, :null => false end add_foreign_key :changesets_subscribers, :users, :column => :subscriber_id, :name => "changesets_subscribers_subscriber_id_fkey" diff --git a/test/controllers/geocoder_controller_test.rb b/test/controllers/geocoder_controller_test.rb index 1d2eb87f5..7479b3e9d 100644 --- a/test/controllers/geocoder_controller_test.rb +++ b/test/controllers/geocoder_controller_test.rb @@ -241,7 +241,7 @@ class GeocoderControllerTest < ActionController::TestCase "12345", "12345-6789" ].each do |code| - post :search, query: code + post :search, :query => code assert_response :success assert_equal %w(us_postcode osm_nominatim), assigns(:sources) end