diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0449d48f3..fac09b643 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -229,15 +229,6 @@ Layout/FirstParameterIndentation: Style/GuardClause: Enabled: false -# Offense count: 10 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. -# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys -Style/HashSyntax: - Exclude: - - 'lib/sms_api.rb' - - 'spec/factories.rb' - # Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: MaxLineLength. diff --git a/app/controllers/sandbox_controller.rb b/app/controllers/sandbox_controller.rb index 12b5dd91e..b1a143f54 100644 --- a/app/controllers/sandbox_controller.rb +++ b/app/controllers/sandbox_controller.rb @@ -14,10 +14,10 @@ class SandboxController < ApplicationController def show if params[:template].index('.') # CVE-2014-0130 - render :action => "index" + render action: "index" elsif lookup_context.exists?("sandbox/#{params[:template]}") if params[:template] == "index" - render :action => "index" + render action: "index" else render "sandbox/#{params[:template]}" end @@ -25,7 +25,7 @@ class SandboxController < ApplicationController elsif lookup_context.exists?("sandbox/#{params[:template]}/index") render "sandbox/#{params[:template]}/index" else - render :action => "index" + render action: "index" end end diff --git a/app/models/legislation/question.rb b/app/models/legislation/question.rb index 4381b752a..09449b449 100644 --- a/app/models/legislation/question.rb +++ b/app/models/legislation/question.rb @@ -9,7 +9,7 @@ class Legislation::Question < ActiveRecord::Base has_many :answers, class_name: 'Legislation::Answer', foreign_key: 'legislation_question_id', dependent: :destroy, inverse_of: :question has_many :comments, as: :commentable, dependent: :destroy - accepts_nested_attributes_for :question_options, :reject_if => proc { |attributes| attributes[:value].blank? }, allow_destroy: true + accepts_nested_attributes_for :question_options, reject_if: proc { |attributes| attributes[:value].blank? }, allow_destroy: true validates :process, presence: true validates :title, presence: true diff --git a/lib/sms_api.rb b/lib/sms_api.rb index 9b866fc87..252d0749e 100644 --- a/lib/sms_api.rb +++ b/lib/sms_api.rb @@ -38,7 +38,20 @@ class SMSApi end def stubbed_response - {:respuesta_sms => {:identificador_mensaje => "1234567", :fecha_respuesta => "Thu, 20 Aug 2015 16:28:05 +0200", :respuesta_pasarela => {:codigo_pasarela => "0000", :descripcion_pasarela => "Operación ejecutada correctamente."}, :respuesta_servicio_externo => {:codigo_respuesta => "1000", :texto_respuesta => "Success"}}} + { + respuesta_sms: { + identificador_mensaje: "1234567", + fecha_respuesta: "Thu, 20 Aug 2015 16:28:05 +0200", + respuesta_pasarela: { + codigo_pasarela: "0000", + descripcion_pasarela: "Operación ejecutada correctamente." + }, + respuesta_servicio_externo: { + codigo_respuesta: "1000", + texto_respuesta: "Success" + } + } + } end end diff --git a/spec/factories.rb b/spec/factories.rb index 18df18120..5dc19a708 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -552,7 +552,7 @@ FactoryGirl.define do sequence(:value) { |n| "Setting #{n} Value" } end - factory :ahoy_event, :class => Ahoy::Event do + factory :ahoy_event, class: Ahoy::Event do id { SecureRandom.uuid } time DateTime.current sequence(:name) {|n| "Event #{n} type"}