Bump rubocop

This commit is contained in:
gregoirenovel 2018-01-12 13:16:08 +01:00
parent c05f06ceea
commit 48fd3605a4
4 changed files with 91 additions and 44 deletions

View file

@ -211,6 +211,9 @@ Layout/SpaceInsideBrackets:
Layout/SpaceInsideHashLiteralBraces: Layout/SpaceInsideHashLiteralBraces:
Enabled: false Enabled: false
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Layout/SpaceInsideParens: Layout/SpaceInsideParens:
Enabled: false Enabled: false
@ -317,9 +320,6 @@ Lint/IneffectiveAccessModifier:
Lint/InheritException: Lint/InheritException:
Enabled: false Enabled: false
Lint/InvalidCharacterLiteral:
Enabled: false
Lint/LiteralInCondition: Lint/LiteralInCondition:
Enabled: false Enabled: false
@ -381,7 +381,7 @@ Lint/StringConversionInInterpolation:
Enabled: false Enabled: false
Lint/Syntax: Lint/Syntax:
Enabled: false Enabled: true
Lint/UnderscorePrefixedVariableName: Lint/UnderscorePrefixedVariableName:
Enabled: false Enabled: false
@ -404,6 +404,12 @@ Lint/UnusedBlockArgument:
Lint/UnusedMethodArgument: Lint/UnusedMethodArgument:
Enabled: false Enabled: false
Lint/UriEscapeUnescape:
Enabled: false
Lint/UriRegexp:
Enabled: false
Lint/UselessAccessModifier: Lint/UselessAccessModifier:
Enabled: false Enabled: false
@ -452,6 +458,39 @@ Metrics/ParameterLists:
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Enabled: false 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: Performance/Caller:
Enabled: true Enabled: true
@ -539,6 +578,9 @@ Rails/ApplicationRecord:
Rails/Blank: Rails/Blank:
Enabled: false Enabled: false
Rails/CreateTableWithTimestamps:
Enabled: false
Rails/Date: Rails/Date:
Enabled: false Enabled: false
@ -554,6 +596,9 @@ Rails/DynamicFindBy:
Rails/EnumUniqueness: Rails/EnumUniqueness:
Enabled: false Enabled: false
Rails/EnvironmentComparison:
Enabled: false
Rails/Exit: Rails/Exit:
Enabled: false Enabled: false
@ -569,9 +614,18 @@ Rails/FindEach:
Rails/HasAndBelongsToMany: Rails/HasAndBelongsToMany:
Enabled: false Enabled: false
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/HttpPositionalArguments: Rails/HttpPositionalArguments:
Enabled: false Enabled: false
Rails/InverseOf:
Enabled: false
Rails/LexicallyScopedActionFilter:
Enabled: false
Rails/NotNullColumn: Rails/NotNullColumn:
Enabled: false Enabled: false
@ -584,6 +638,9 @@ Rails/OutputSafety:
Rails/PluralizationGrammar: Rails/PluralizationGrammar:
Enabled: false Enabled: false
Rails/Presence:
Enabled: false
Rails/Present: Rails/Present:
Enabled: true Enabled: true
@ -617,6 +674,9 @@ Rails/TimeZone:
Rails/UniqBeforePluck: Rails/UniqBeforePluck:
Enabled: false Enabled: false
Rails/UnknownEnv:
Enabled: false
Rails/Validation: Rails/Validation:
Enabled: false Enabled: false
@ -638,9 +698,6 @@ Security/MarshalLoad:
Security/YAMLLoad: Security/YAMLLoad:
Enabled: false Enabled: false
Style/AccessorMethodName:
Enabled: false
Style/Alias: Style/Alias:
Enabled: false Enabled: false
@ -653,9 +710,6 @@ Style/ArrayJoin:
Style/AsciiComments: Style/AsciiComments:
Enabled: false Enabled: false
Style/AsciiIdentifiers:
Enabled: false
Style/Attr: Style/Attr:
Enabled: false Enabled: false
@ -683,9 +737,6 @@ Style/CaseEquality:
Style/CharacterLiteral: Style/CharacterLiteral:
Enabled: false Enabled: false
Style/ClassAndModuleCamelCase:
Enabled: false
Style/ClassAndModuleChildren: Style/ClassAndModuleChildren:
Enabled: false Enabled: false
@ -710,13 +761,16 @@ Style/CommandLiteral:
Style/CommentAnnotation: Style/CommentAnnotation:
Enabled: false Enabled: false
Style/CommentedKeyword:
Enabled: false
Style/ConditionalAssignment: Style/ConditionalAssignment:
Enabled: false Enabled: false
Style/ConstantName: Style/Copyright:
Enabled: false Enabled: false
Style/Copyright: Style/DateTime:
Enabled: false Enabled: false
Style/DefWithParentheses: Style/DefWithParentheses:
@ -755,10 +809,10 @@ Style/Encoding:
Style/EndBlock: Style/EndBlock:
Enabled: false Enabled: false
Style/EvenOdd: Style/EvalWithLocation:
Enabled: false Enabled: false
Style/FileName: Style/EvenOdd:
Enabled: false Enabled: false
Style/FlipFlop: Style/FlipFlop:
@ -839,15 +893,15 @@ Style/MethodDefParentheses:
Style/MethodMissing: Style/MethodMissing:
Enabled: false Enabled: false
Style/MethodName:
Enabled: false
Style/MissingElse: Style/MissingElse:
Enabled: false Enabled: false
Style/MixinGrouping: Style/MixinGrouping:
Enabled: false Enabled: false
Style/MixinUsage:
Enabled: false
Style/ModuleFunction: Style/ModuleFunction:
Enabled: false Enabled: false
@ -911,9 +965,6 @@ Style/NumericPredicate:
Style/OneLineConditional: Style/OneLineConditional:
Enabled: false Enabled: false
Style/OpMethod:
Enabled: false
Style/OptionHash: Style/OptionHash:
Enabled: false Enabled: false
@ -935,9 +986,6 @@ Style/PercentQLiterals:
Style/PerlBackrefs: Style/PerlBackrefs:
Enabled: false Enabled: false
Style/PredicateName:
Enabled: false
Style/PreferredHashMethods: Style/PreferredHashMethods:
Enabled: false Enabled: false
@ -947,6 +995,9 @@ Style/Proc:
Style/RaiseArgs: Style/RaiseArgs:
Enabled: false Enabled: false
Style/RandomWithOffset:
Enabled: false
Style/RedundantBegin: Style/RedundantBegin:
Enabled: false Enabled: false
@ -971,6 +1022,9 @@ Style/RegexpLiteral:
Style/RescueModifier: Style/RescueModifier:
Enabled: false Enabled: false
Style/RescueStandardError:
Enabled: false
Style/SafeNavigation: Style/SafeNavigation:
Enabled: false Enabled: false
@ -1049,12 +1103,6 @@ Style/UnneededPercentQ:
Style/VariableInterpolation: Style/VariableInterpolation:
Enabled: false Enabled: false
Style/VariableName:
Enabled: false
Style/VariableNumber:
Enabled: false
Style/WhenThen: Style/WhenThen:
Enabled: false Enabled: false

View file

@ -475,9 +475,9 @@ GEM
openstack (3.3.7) openstack (3.3.7)
json json
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.11.2) parallel (1.12.1)
parser (2.4.0.0) parser (2.4.0.2)
ast (~> 2.2) ast (~> 2.3)
pdf-core (0.6.1) pdf-core (0.6.1)
pg (0.19.0) pg (0.19.0)
powerpack (0.1.1) powerpack (0.1.1)
@ -537,8 +537,7 @@ GEM
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.2.2) rainbow (3.0.0)
rake
raindrops (0.17.0) raindrops (0.17.0)
rake (12.3.0) rake (12.3.0)
rb-fsevent (0.9.8) rb-fsevent (0.9.8)
@ -589,16 +588,16 @@ GEM
rspec-support (3.5.0) rspec-support (3.5.0)
rspec_junit_formatter (0.3.0) rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0) rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.49.1) rubocop (0.52.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0) parser (>= 2.4.0.2, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1) unicode-display_width (~> 1.0, >= 1.0.1)
rubocop-rspec-focused (0.1.0) rubocop-rspec-focused (0.1.0)
rubocop (>= 0.37) rubocop (>= 0.37)
ruby-progressbar (1.8.1) ruby-progressbar (1.9.0)
ruby_dep (1.5.0) ruby_dep (1.5.0)
ruby_parser (3.10.1) ruby_parser (3.10.1)
sexp_processor (~> 4.9) sexp_processor (~> 4.9)
@ -690,7 +689,7 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
unicode-display_width (1.2.1) unicode-display_width (1.3.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
unicorn (5.2.0) unicorn (5.2.0)
kgio (~> 2.6) kgio (~> 2.6)

View file

@ -3,7 +3,7 @@ class RemoveDuplicateEmailReceived < ActiveRecord::Migration[5.0]
all_mails = MailReceived.all all_mails = MailReceived.all
groupped = all_mails.group_by { |m| m.procedure_id } groupped = all_mails.group_by { |m| m.procedure_id }
filtered = groupped.reject { |k, v| v.length < 2 } 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.pop
duplicate_mails.each(&:destroy) duplicate_mails.each(&:destroy)
end end

View file

@ -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 def sanitize_name(name) # from https://github.com/carrierwaveuploader/carrierwave/blob/master/lib/carrierwave/sanitized_file.rb#L323
name = name.gsub(/[^[:word:]\.\-\+]/,"_") name = name.gsub(/[^[:word:]\.\-\+]/,"_")
name = "_#{name}" if name =~ /\A\.+\z/ name = "_#{name}" if name.match?(/\A\.+\z/)
name = "unnamed" if name.size == 0 name = "unnamed" if name.size == 0
return name.mb_chars.to_s return name.mb_chars.to_s
end end