Bump rubocop
This commit is contained in:
parent
c05f06ceea
commit
48fd3605a4
4 changed files with 91 additions and 44 deletions
112
.rubocop.yml
112
.rubocop.yml
|
@ -211,6 +211,9 @@ Layout/SpaceInsideBrackets:
|
|||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Enabled: false
|
||||
|
||||
Layout/SpaceInsideArrayLiteralBrackets:
|
||||
Enabled: false
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: false
|
||||
|
||||
|
@ -317,9 +320,6 @@ Lint/IneffectiveAccessModifier:
|
|||
Lint/InheritException:
|
||||
Enabled: false
|
||||
|
||||
Lint/InvalidCharacterLiteral:
|
||||
Enabled: false
|
||||
|
||||
Lint/LiteralInCondition:
|
||||
Enabled: false
|
||||
|
||||
|
@ -381,7 +381,7 @@ Lint/StringConversionInInterpolation:
|
|||
Enabled: false
|
||||
|
||||
Lint/Syntax:
|
||||
Enabled: false
|
||||
Enabled: true
|
||||
|
||||
Lint/UnderscorePrefixedVariableName:
|
||||
Enabled: false
|
||||
|
@ -404,6 +404,12 @@ Lint/UnusedBlockArgument:
|
|||
Lint/UnusedMethodArgument:
|
||||
Enabled: false
|
||||
|
||||
Lint/UriEscapeUnescape:
|
||||
Enabled: false
|
||||
|
||||
Lint/UriRegexp:
|
||||
Enabled: false
|
||||
|
||||
Lint/UselessAccessModifier:
|
||||
Enabled: false
|
||||
|
||||
|
@ -452,6 +458,39 @@ Metrics/ParameterLists:
|
|||
Metrics/PerceivedComplexity:
|
||||
Enabled: false
|
||||
|
||||
Naming/AccessorMethodName:
|
||||
Enabled: false
|
||||
|
||||
Naming/AsciiIdentifiers:
|
||||
Enabled: false
|
||||
|
||||
Naming/BinaryOperatorParameterName:
|
||||
Enabled: false
|
||||
|
||||
Naming/ClassAndModuleCamelCase:
|
||||
Enabled: false
|
||||
|
||||
Naming/ConstantName:
|
||||
Enabled: false
|
||||
|
||||
Naming/FileName:
|
||||
Enabled: false
|
||||
|
||||
Naming/HeredocDelimiterNaming:
|
||||
Enabled: false
|
||||
|
||||
Naming/MethodName:
|
||||
Enabled: false
|
||||
|
||||
Naming/PredicateName:
|
||||
Enabled: false
|
||||
|
||||
Naming/VariableName:
|
||||
Enabled: false
|
||||
|
||||
Naming/VariableNumber:
|
||||
Enabled: false
|
||||
|
||||
Performance/Caller:
|
||||
Enabled: true
|
||||
|
||||
|
@ -539,6 +578,9 @@ Rails/ApplicationRecord:
|
|||
Rails/Blank:
|
||||
Enabled: false
|
||||
|
||||
Rails/CreateTableWithTimestamps:
|
||||
Enabled: false
|
||||
|
||||
Rails/Date:
|
||||
Enabled: false
|
||||
|
||||
|
@ -554,6 +596,9 @@ Rails/DynamicFindBy:
|
|||
Rails/EnumUniqueness:
|
||||
Enabled: false
|
||||
|
||||
Rails/EnvironmentComparison:
|
||||
Enabled: false
|
||||
|
||||
Rails/Exit:
|
||||
Enabled: false
|
||||
|
||||
|
@ -569,9 +614,18 @@ Rails/FindEach:
|
|||
Rails/HasAndBelongsToMany:
|
||||
Enabled: false
|
||||
|
||||
Rails/HasManyOrHasOneDependent:
|
||||
Enabled: false
|
||||
|
||||
Rails/HttpPositionalArguments:
|
||||
Enabled: false
|
||||
|
||||
Rails/InverseOf:
|
||||
Enabled: false
|
||||
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Enabled: false
|
||||
|
||||
Rails/NotNullColumn:
|
||||
Enabled: false
|
||||
|
||||
|
@ -584,6 +638,9 @@ Rails/OutputSafety:
|
|||
Rails/PluralizationGrammar:
|
||||
Enabled: false
|
||||
|
||||
Rails/Presence:
|
||||
Enabled: false
|
||||
|
||||
Rails/Present:
|
||||
Enabled: true
|
||||
|
||||
|
@ -617,6 +674,9 @@ Rails/TimeZone:
|
|||
Rails/UniqBeforePluck:
|
||||
Enabled: false
|
||||
|
||||
Rails/UnknownEnv:
|
||||
Enabled: false
|
||||
|
||||
Rails/Validation:
|
||||
Enabled: false
|
||||
|
||||
|
@ -638,9 +698,6 @@ Security/MarshalLoad:
|
|||
Security/YAMLLoad:
|
||||
Enabled: false
|
||||
|
||||
Style/AccessorMethodName:
|
||||
Enabled: false
|
||||
|
||||
Style/Alias:
|
||||
Enabled: false
|
||||
|
||||
|
@ -653,9 +710,6 @@ Style/ArrayJoin:
|
|||
Style/AsciiComments:
|
||||
Enabled: false
|
||||
|
||||
Style/AsciiIdentifiers:
|
||||
Enabled: false
|
||||
|
||||
Style/Attr:
|
||||
Enabled: false
|
||||
|
||||
|
@ -683,9 +737,6 @@ Style/CaseEquality:
|
|||
Style/CharacterLiteral:
|
||||
Enabled: false
|
||||
|
||||
Style/ClassAndModuleCamelCase:
|
||||
Enabled: false
|
||||
|
||||
Style/ClassAndModuleChildren:
|
||||
Enabled: false
|
||||
|
||||
|
@ -710,13 +761,16 @@ Style/CommandLiteral:
|
|||
Style/CommentAnnotation:
|
||||
Enabled: false
|
||||
|
||||
Style/CommentedKeyword:
|
||||
Enabled: false
|
||||
|
||||
Style/ConditionalAssignment:
|
||||
Enabled: false
|
||||
|
||||
Style/ConstantName:
|
||||
Style/Copyright:
|
||||
Enabled: false
|
||||
|
||||
Style/Copyright:
|
||||
Style/DateTime:
|
||||
Enabled: false
|
||||
|
||||
Style/DefWithParentheses:
|
||||
|
@ -755,10 +809,10 @@ Style/Encoding:
|
|||
Style/EndBlock:
|
||||
Enabled: false
|
||||
|
||||
Style/EvenOdd:
|
||||
Style/EvalWithLocation:
|
||||
Enabled: false
|
||||
|
||||
Style/FileName:
|
||||
Style/EvenOdd:
|
||||
Enabled: false
|
||||
|
||||
Style/FlipFlop:
|
||||
|
@ -839,15 +893,15 @@ Style/MethodDefParentheses:
|
|||
Style/MethodMissing:
|
||||
Enabled: false
|
||||
|
||||
Style/MethodName:
|
||||
Enabled: false
|
||||
|
||||
Style/MissingElse:
|
||||
Enabled: false
|
||||
|
||||
Style/MixinGrouping:
|
||||
Enabled: false
|
||||
|
||||
Style/MixinUsage:
|
||||
Enabled: false
|
||||
|
||||
Style/ModuleFunction:
|
||||
Enabled: false
|
||||
|
||||
|
@ -911,9 +965,6 @@ Style/NumericPredicate:
|
|||
Style/OneLineConditional:
|
||||
Enabled: false
|
||||
|
||||
Style/OpMethod:
|
||||
Enabled: false
|
||||
|
||||
Style/OptionHash:
|
||||
Enabled: false
|
||||
|
||||
|
@ -935,9 +986,6 @@ Style/PercentQLiterals:
|
|||
Style/PerlBackrefs:
|
||||
Enabled: false
|
||||
|
||||
Style/PredicateName:
|
||||
Enabled: false
|
||||
|
||||
Style/PreferredHashMethods:
|
||||
Enabled: false
|
||||
|
||||
|
@ -947,6 +995,9 @@ Style/Proc:
|
|||
Style/RaiseArgs:
|
||||
Enabled: false
|
||||
|
||||
Style/RandomWithOffset:
|
||||
Enabled: false
|
||||
|
||||
Style/RedundantBegin:
|
||||
Enabled: false
|
||||
|
||||
|
@ -971,6 +1022,9 @@ Style/RegexpLiteral:
|
|||
Style/RescueModifier:
|
||||
Enabled: false
|
||||
|
||||
Style/RescueStandardError:
|
||||
Enabled: false
|
||||
|
||||
Style/SafeNavigation:
|
||||
Enabled: false
|
||||
|
||||
|
@ -1049,12 +1103,6 @@ Style/UnneededPercentQ:
|
|||
Style/VariableInterpolation:
|
||||
Enabled: false
|
||||
|
||||
Style/VariableName:
|
||||
Enabled: false
|
||||
|
||||
Style/VariableNumber:
|
||||
Enabled: false
|
||||
|
||||
Style/WhenThen:
|
||||
Enabled: false
|
||||
|
||||
|
|
19
Gemfile.lock
19
Gemfile.lock
|
@ -475,9 +475,9 @@ GEM
|
|||
openstack (3.3.7)
|
||||
json
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.11.2)
|
||||
parser (2.4.0.0)
|
||||
ast (~> 2.2)
|
||||
parallel (1.12.1)
|
||||
parser (2.4.0.2)
|
||||
ast (~> 2.3)
|
||||
pdf-core (0.6.1)
|
||||
pg (0.19.0)
|
||||
powerpack (0.1.1)
|
||||
|
@ -537,8 +537,7 @@ GEM
|
|||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (2.2.2)
|
||||
rake
|
||||
rainbow (3.0.0)
|
||||
raindrops (0.17.0)
|
||||
rake (12.3.0)
|
||||
rb-fsevent (0.9.8)
|
||||
|
@ -589,16 +588,16 @@ GEM
|
|||
rspec-support (3.5.0)
|
||||
rspec_junit_formatter (0.3.0)
|
||||
rspec-core (>= 2, < 4, != 2.12.0)
|
||||
rubocop (0.49.1)
|
||||
rubocop (0.52.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.3.3.1, < 3.0)
|
||||
parser (>= 2.4.0.2, < 3.0)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
rubocop-rspec-focused (0.1.0)
|
||||
rubocop (>= 0.37)
|
||||
ruby-progressbar (1.8.1)
|
||||
ruby-progressbar (1.9.0)
|
||||
ruby_dep (1.5.0)
|
||||
ruby_parser (3.10.1)
|
||||
sexp_processor (~> 4.9)
|
||||
|
@ -690,7 +689,7 @@ GEM
|
|||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.2)
|
||||
unicode-display_width (1.2.1)
|
||||
unicode-display_width (1.3.0)
|
||||
unicode_utils (1.4.0)
|
||||
unicorn (5.2.0)
|
||||
kgio (~> 2.6)
|
||||
|
|
|
@ -3,7 +3,7 @@ class RemoveDuplicateEmailReceived < ActiveRecord::Migration[5.0]
|
|||
all_mails = MailReceived.all
|
||||
groupped = all_mails.group_by { |m| m.procedure_id }
|
||||
filtered = groupped.reject { |k, v| v.length < 2 }
|
||||
filtered.each do |k, duplicate_mails|
|
||||
filtered.each_value do |duplicate_mails|
|
||||
duplicate_mails.pop
|
||||
duplicate_mails.each(&:destroy)
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace :'2017_10_30_copy_commentaire_piece_justificative_to_file' do
|
|||
|
||||
def sanitize_name(name) # from https://github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/sanitized_file.rb#L323
|
||||
name = name.gsub(/[^[:word:]\.\-\+]/,"_")
|
||||
name = "_#{name}" if name =~ /\A\.+\z/
|
||||
name = "_#{name}" if name.match?(/\A\.+\z/)
|
||||
name = "unnamed" if name.size == 0
|
||||
return name.mb_chars.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue