Enable Style/WordArray
This commit is contained in:
parent
d1439f8a52
commit
6eeba14885
19 changed files with 23 additions and 22 deletions
|
@ -1262,7 +1262,8 @@ Style/WhileUntilModifier:
|
|||
Enabled: false
|
||||
|
||||
Style/WordArray:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
EnforcedStyle: brackets
|
||||
|
||||
Style/YodaCondition:
|
||||
Enabled: true
|
||||
|
|
|
@ -39,7 +39,7 @@ guard 'livereload' do
|
|||
# less: :less, # uncomment if you want LESS stylesheets done in browser
|
||||
}
|
||||
|
||||
rails_view_exts = %w(erb haml slim)
|
||||
rails_view_exts = ['erb', 'haml', 'slim']
|
||||
|
||||
# file types LiveReload may optimize refresh for
|
||||
compiled_exts = extensions.values
|
||||
|
|
|
@ -28,7 +28,7 @@ class TypeDeChampDecorator < Draper::Decorator
|
|||
end
|
||||
|
||||
def base_classes
|
||||
%w(btn btn-default form-control fa)
|
||||
['btn', 'btn-default', 'form-control', 'fa']
|
||||
end
|
||||
|
||||
def display_up_button?(index, private)
|
||||
|
|
|
@ -23,7 +23,7 @@ class TypeDePieceJustificativeDecorator < Draper::Decorator
|
|||
end
|
||||
|
||||
def base_classes
|
||||
%w(btn btn-default form-control fa)
|
||||
['btn', 'btn-default', 'form-control', 'fa']
|
||||
end
|
||||
|
||||
def display_up_button?(index)
|
||||
|
|
|
@ -2,6 +2,6 @@ module StringToHtmlHelper
|
|||
def string_to_html(str)
|
||||
html_formatted = simple_format(str)
|
||||
with_links = html_formatted.gsub(URI.regexp, '<a target="_blank" href="\0">\0</a>')
|
||||
sanitize(with_links, attributes: %w(href target))
|
||||
sanitize(with_links, attributes: ['href', 'target'])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -174,7 +174,7 @@ class DossierFieldService
|
|||
end
|
||||
|
||||
def assert_valid_order(order)
|
||||
if !%w[asc desc].include?(order)
|
||||
if !["asc", "desc"].include?(order)
|
||||
raise "Invalid order #{order}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ class AttestationTemplateLogoUploader < BaseUploader
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(jpg jpeg png)
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -21,7 +21,7 @@ class AttestationTemplateSignatureUploader < BaseUploader
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(jpg jpeg png)
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -14,7 +14,7 @@ class CommentaireFileUploader < BaseUploader
|
|||
end
|
||||
|
||||
def extension_white_list
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png zip txt)
|
||||
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png', 'zip', 'txt']
|
||||
end
|
||||
|
||||
def accept_extension_list
|
||||
|
|
|
@ -19,7 +19,7 @@ class PieceJustificativeUploader < BaseUploader
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(pdf doc docx xls xlsx ppt pptx odt ods odp jpg jpeg png)
|
||||
['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'odt', 'ods', 'odp', 'jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -21,7 +21,7 @@ class ProcedureLogoUploader < BaseUploader
|
|||
# Add a white list of extensions which are allowed to be uploaded.
|
||||
# For images you might use something like this:
|
||||
def extension_white_list
|
||||
%w(jpg jpeg png)
|
||||
['jpg', 'jpeg', 'png']
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -24,10 +24,10 @@ module TPS
|
|||
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
|
||||
config.i18n.available_locales = [:fr]
|
||||
|
||||
config.autoload_paths += %W(#{config.root}/lib #{config.root}/app/validators #{config.root}/app/facades)
|
||||
config.autoload_paths += ["#{config.root}/lib", "#{config.root}/app/validators", "#{config.root}/app/facades"]
|
||||
config.assets.paths << Rails.root.join('app', 'assets', 'javascript')
|
||||
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
|
||||
config.assets.precompile += %w(.woff)
|
||||
config.assets.precompile += ['.woff']
|
||||
|
||||
URL = ENV['APP_HOST'] || "http://localhost:3000/"
|
||||
|
||||
|
|
|
@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
|
|||
|
||||
# Precompile additional assets.
|
||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||
Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css new_design/print.css new_design/application.js new_design/manager.css)
|
||||
Rails.application.config.assets.precompile += ['print.css', 'new_design/new_application.css', 'new_design/print.css', 'new_design/application.js', 'new_design/manager.css']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class PurgeDraftDossier < ActiveRecord::Migration
|
||||
class Dossier < ApplicationRecord
|
||||
BROUILLON = %w(draft)
|
||||
BROUILLON = ['draft']
|
||||
|
||||
def brouillon?
|
||||
BROUILLON.include?(state)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
task :deploy do
|
||||
domains = %w(149.202.72.152 149.202.198.6)
|
||||
domains = ['149.202.72.152', '149.202.198.6']
|
||||
domains.each do |domain|
|
||||
sh "mina deploy domain=#{domain}"
|
||||
end
|
||||
|
|
|
@ -113,7 +113,7 @@ describe ApplicationController, type: :controller do
|
|||
it { expect(@controller).to have_received(:redirect_to).with(root_path) }
|
||||
|
||||
context 'when the path is safe' do
|
||||
%w(/ /manager /administrations).each do |path|
|
||||
['/', '/manager', '/administrations'].each do |path|
|
||||
let(:path_info) { path }
|
||||
|
||||
it { expect(@controller).not_to have_received(:sign_out) }
|
||||
|
|
|
@ -23,7 +23,7 @@ describe Dossier do
|
|||
end
|
||||
|
||||
it do
|
||||
expect(Dossier.with_champs.find(dossier.id).champs.map(&:libelle)).to match(%w(l1 l2 l3))
|
||||
expect(Dossier.with_champs.find(dossier.id).champs.map(&:libelle)).to match(['l1', 'l2', 'l3'])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -379,7 +379,7 @@ describe Dossier do
|
|||
create(:type_de_champ, libelle: 'l2', order_place: 2, procedure: procedure)
|
||||
end
|
||||
|
||||
it { expect(dossier.champs.pluck(:libelle)).to match(%w(l1 l2 l3)) }
|
||||
it { expect(dossier.champs.pluck(:libelle)).to match(['l1', 'l2', 'l3']) }
|
||||
end
|
||||
|
||||
describe '#champs_private' do
|
||||
|
@ -392,7 +392,7 @@ describe Dossier do
|
|||
create :type_de_champ, :private, libelle: 'l2', order_place: 2, procedure: procedure
|
||||
end
|
||||
|
||||
it { expect(dossier.champs_private.pluck(:libelle)).to match(%w(l1 l2 l3)) }
|
||||
it { expect(dossier.champs_private.pluck(:libelle)).to match(['l1', 'l2', 'l3']) }
|
||||
end
|
||||
|
||||
describe '#total_follow' do
|
||||
|
|
|
@ -39,7 +39,7 @@ end
|
|||
|
||||
Capybara.register_driver :headless_chrome do |app|
|
||||
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
||||
chromeOptions: { args: %w(headless disable-gpu disable-dev-shm-usage disable-software-rasterizer mute-audio window-size=1440,900) }
|
||||
chromeOptions: { args: ['headless', 'disable-gpu', 'disable-dev-shm-usage', 'disable-software-rasterizer', 'mute-audio', 'window-size=1440,900'] }
|
||||
)
|
||||
|
||||
Capybara::Selenium::Driver.new app,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RSpec.configure do |config|
|
||||
expect_list = %w()
|
||||
expect_list = []
|
||||
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.clean_with(:truncation, except: expect_list)
|
||||
|
|
Loading…
Reference in a new issue