From d349a90636f859cf789f70e9185c6efe416e59b0 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 14 Jun 2022 06:52:24 +0200 Subject: [PATCH] Update to rubocop 1.30.1 --- .rubocop.yml | 91 +------------------------------------------------ Gemfile.lock | 26 +++++++------- lib/download.rb | 5 ++- 3 files changed, 16 insertions(+), 106 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 84e46b5..9110dda 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -14,6 +14,7 @@ AllCops: - 'pkg/**/*' TargetRubyVersion: '3.0' + NewCops: enable Style/Documentation: Enabled: false @@ -39,93 +40,3 @@ Metrics/BlockLength: IgnoredMethods: - describe - refine - -Layout/SpaceBeforeBrackets: # (new in 1.7) - Enabled: false - -Lint/AmbiguousAssignment: # (new in 1.7) - Enabled: false - -Lint/DeprecatedConstants: # (new in 1.8) - Enabled: false - -Lint/DuplicateBranch: # (new in 1.3) - Enabled: false - -Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1) - Enabled: false - -Lint/EmptyBlock: # (new in 1.1) - Enabled: false - -Lint/EmptyClass: # (new in 1.3) - Enabled: false - -Lint/LambdaWithoutLiteralBlock: # (new in 1.8) - Enabled: false - -Lint/NoReturnInBeginEndBlocks: # (new in 1.2) - Enabled: false - -Lint/RedundantDirGlobSort: # (new in 1.8) - Enabled: false - -Lint/ToEnumArguments: # (new in 1.1) - Enabled: false - -Lint/UnexpectedBlockArity: # (new in 1.5) - Enabled: false - -Lint/UnmodifiedReduceAccumulator: # (new in 1.1) - Enabled: false - -Style/ArgumentsForwarding: # (new in 1.1) - Enabled: false - -Style/CollectionCompact: # (new in 1.2) - Enabled: false - -Style/DocumentDynamicEvalDefinition: # (new in 1.1) - Enabled: false - -Style/EndlessMethod: # (new in 1.8) - Enabled: false - -Style/HashExcept: # (new in 1.7) - Enabled: false - -Style/NegatedIfElseCondition: # (new in 1.2) - Enabled: false - -Style/NilLambda: # (new in 1.3) - Enabled: false - -Style/RedundantArgument: # (new in 1.4) - Enabled: false - -Style/SwapValues: # (new in 1.1) - Enabled: false - -Gemspec/DateAssignment: # (new in 1.10) - Enabled: true - -Lint/NumberedParameterAssignment: # (new in 1.9) - Enabled: true - -Lint/OrAssignmentToConstant: # (new in 1.9) - Enabled: true - -Lint/SymbolConversion: # (new in 1.9) - Enabled: true - -Lint/TripleQuotes: # (new in 1.9) - Enabled: true - -Style/HashConversion: # (new in 1.10) - Enabled: true - -Style/IfWithBooleanLiteralBranches: # (new in 1.9) - Enabled: true - -Style/StringChars: # (new in 1.12) - Enabled: true diff --git a/Gemfile.lock b/Gemfile.lock index 6f37514..b52cafa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,25 +2,25 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - parallel (1.20.1) - parser (3.0.0.0) + parallel (1.22.1) + parser (3.1.2.0) ast (~> 2.4.1) - rainbow (3.0.0) - regexp_parser (2.1.1) - rexml (3.2.4) - rubocop (1.12.0) + rainbow (3.1.1) + regexp_parser (2.5.0) + rexml (3.2.5) + rubocop (1.30.1) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.2.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.18.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.4.1) - parser (>= 2.7.1.5) + rubocop-ast (1.18.0) + parser (>= 3.1.1.0) ruby-progressbar (1.11.0) - unicode-display_width (2.0.0) + unicode-display_width (2.1.0) PLATFORMS ruby @@ -29,4 +29,4 @@ DEPENDENCIES rubocop (~> 1.7) BUNDLED WITH - 2.2.3 + 2.2.33 diff --git a/lib/download.rb b/lib/download.rb index 56cabc3..5777e64 100644 --- a/lib/download.rb +++ b/lib/download.rb @@ -116,9 +116,8 @@ def download_and_deploy(uri, tarball) end def write_info(package, downloads:) - File.open "slackbuilds/#{package.path}/#{package.name}.info", 'w' do |file| - file.write info_template(package, downloads) - end + File.write "slackbuilds/#{package.path}/#{package.name}.info", + info_template(package, downloads) end def update_slackbuild_version(package_path, version)