From 0f774d15ef448380c146a8106ac05f6e5f216b70 Mon Sep 17 00:00:00 2001 From: echarp Date: Fri, 15 Aug 2014 19:28:51 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20quelques=20=C3=A9l?= =?UTF-8?q?=C3=A9ments=20de=20style,=20pour=20le=20nouveau=20rubocop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 5 ++--- Guardfile | 1 + app/views/events/index.json.jbuilder | 5 ++++- app/views/events/show.json.jbuilder | 5 ++++- app/views/users/show.json.jbuilder | 3 ++- db/migrate/20131114103118_devise_create_admin_users.rb | 2 +- db/migrate/20131114103121_create_active_admin_comments.rb | 2 +- db/seeds.rb | 2 +- 8 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index ba8b6dec..df82e6ff 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,5 @@ source 'https://rubygems.org' - gem 'rails', '~> 4.1.0.rc1' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.1' @@ -55,8 +54,8 @@ gem 'devise-i18n' gem 'rails-i18n' # Store some specific content, like application name and static pages contents gem 'i18n-active_record', - git: 'git://github.com/svenfuchs/i18n-active_record.git', - require: 'i18n/active_record' + git: 'git://github.com/svenfuchs/i18n-active_record.git', + require: 'i18n/active_record' # A superb font to use as icons gem 'font-awesome-rails' # Validate mails submitted diff --git a/Guardfile b/Guardfile index e25a3338..4baac254 100644 --- a/Guardfile +++ b/Guardfile @@ -1,6 +1,7 @@ # A sample Guardfile # More info at https://github.com/guard/guard#readme +# rubocop:disable all guard :livereload do watch(%r{app/views/.+\.(erb|haml|slim)$}) watch(%r{app/helpers/.+\.rb}) diff --git a/app/views/events/index.json.jbuilder b/app/views/events/index.json.jbuilder index 6f40589f..b758e99e 100644 --- a/app/views/events/index.json.jbuilder +++ b/app/views/events/index.json.jbuilder @@ -1,4 +1,7 @@ json.array!(@events) do |event| - json.extract! event, :id, :title, :description, :start_time, :end_time, :city, :region_id, :locality, :url, :contact, :contact, :submitter, :moderated, :tags, :secret, :decision_time, :submission_time, :moderator_mail_id, :submitter_mail_id + json.extract! event, :id, :title, :description, :start_time, :end_time, + :city, :region_id, :locality, :url, :contact, :contact, + :submitter, :moderated, :tags, :secret, :decision_time, + :submission_time, :moderator_mail_id, :submitter_mail_id json.url event_url(event, format: :json) end diff --git a/app/views/events/show.json.jbuilder b/app/views/events/show.json.jbuilder index 10f08211..6dfd9c05 100644 --- a/app/views/events/show.json.jbuilder +++ b/app/views/events/show.json.jbuilder @@ -1 +1,4 @@ -json.extract! @event, :id, :title, :description, :start_time, :end_time, :city, :region_id, :locality, :url, :contact, :contact, :submitter, :moderated, :tags, :secret, :decision_time, :submission_time, :moderator_mail_id, :submitter_mail_id, :created_at, :updated_at +json.extract! @event, :id, :title, :description, :start_time, :end_time, :city, + :region_id, :locality, :url, :contact, :contact, :submitter, + :moderated, :tags, :secret, :decision_time, :submission_time, + :moderator_mail_id, :submitter_mail_id, :created_at, :updated_at diff --git a/app/views/users/show.json.jbuilder b/app/views/users/show.json.jbuilder index ca41e3e5..cbee364a 100644 --- a/app/views/users/show.json.jbuilder +++ b/app/views/users/show.json.jbuilder @@ -1 +1,2 @@ -json.extract! @user, :login, :email, :lastname, :firstname, :created_at, :updated_at +json.extract! @user, :login, :email, :lastname, :firstname, :created_at, + :updated_at diff --git a/db/migrate/20131114103118_devise_create_admin_users.rb b/db/migrate/20131114103118_devise_create_admin_users.rb index 3a34b16f..300a16b1 100644 --- a/db/migrate/20131114103118_devise_create_admin_users.rb +++ b/db/migrate/20131114103118_devise_create_admin_users.rb @@ -7,7 +7,7 @@ class DeviseCreateAdminUsers < ActiveRecord::Migration password_confirmation: 'password') if direction == :up end - # rubocop:disable Style/MethodLength + # rubocop:disable Metrics/MethodLength def change create_table(:admin_users) do |t| ## Database authenticatable diff --git a/db/migrate/20131114103121_create_active_admin_comments.rb b/db/migrate/20131114103121_create_active_admin_comments.rb index 69a993bd..09216896 100644 --- a/db/migrate/20131114103121_create_active_admin_comments.rb +++ b/db/migrate/20131114103121_create_active_admin_comments.rb @@ -1,6 +1,6 @@ # Add comments for administrators to internally share about any item class CreateActiveAdminComments < ActiveRecord::Migration - # rubocop:disable Style/MethodLength + # rubocop:disable Metrics/MethodLength def self.up create_table :active_admin_comments do |t| t.string :namespace diff --git a/db/seeds.rb b/db/seeds.rb index 3f6a26b3..45ce7908 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -18,7 +18,7 @@ User.create login: 'admin@example.com', email: 'admin@example.com', AdminUser.create email: 'admin@example.com', password: 'password' -# rubocop:disable Style/LineLength +# rubocop:disable Metrics/LineLength I18n::Backend::ActiveRecord::Translation.create([ { locale: 'fr', key: 'layouts.application.subtitle', value: 'Les événements du Libre en France' },