diff --git a/.rubocop.yml b/.rubocop.yml index c41ec99..4f21afe 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 Naming/FileName: Exclude: @@ -12,7 +12,7 @@ Style/Encoding: Layout/EndOfLine: Enabled: false -Metrics/LineLength: +Layout/LineLength: Max: 120 Metrics/AbcSize: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3ed2815..d36de0d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,65 +1,81 @@ -# This configuration was generated by -# `rubocop --auto-gen-config` -# on 2017-12-12 22:48:53 +0100 using RuboCop version 0.52.0. -# The point is for the user to remove these configuration records -# one by one as the offenses are removed from the code base. -# Note that changes in the inspected code, or installation of new -# versions of RuboCop, may require this file to be generated again. - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent -Layout/IndentHeredoc: - Exclude: - - 'spec/matchers.rb' - -# Offense count: 6 -# Configuration parameters: CountComments, ExcludedMethods. -Metrics/BlockLength: - Max: 185 - -# Offense count: 3 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. -# URISchemes: http, https -Metrics/LineLength: - Max: 106 - -# Offense count: 4 -# Configuration parameters: Blacklist. -# Blacklist: END, (?-mix:EO[A-Z]{1}) -Naming/HeredocDelimiterNaming: - Exclude: - - 'lib/winrm-fs/core/file_transporter.rb' - - 'spec/matchers.rb' - - 'winrm-fs.gemspec' - -# Offense count: 1 -# Configuration parameters: . -# SupportedStyles: annotated, template, unannotated -Style/FormatStringToken: - EnforcedStyle: unannotated - -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, EnforcedStyle. -# SupportedStyles: predicate, comparison -Style/NumericPredicate: - Exclude: - - 'spec/**/*' - - 'lib/winrm-fs/core/file_transporter.rb' - - 'lib/winrm-fs/file_manager.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, AllowInnerSlashes. -# SupportedStyles: slashes, percent_r, mixed -Style/RegexpLiteral: - Exclude: - - 'lib/winrm-fs/core/tmp_zip.rb' - -# Offense count: 3 -# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. -# URISchemes: http, https -Metrics/LineLength: - Max: 106 +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2022-04-11 14:17:10 UTC using RuboCop version 1.26.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +Layout/HeredocIndentation: + Exclude: + - 'spec/matchers.rb' + +# Offense count: 2 +# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. +# IgnoredMethods: refine +Metrics/BlockLength: + Max: 47 + +# Offense count: 1 +# Configuration parameters: IgnoredMethods. +Metrics/CyclomaticComplexity: + Max: 9 + +# Offense count: 1 +# Configuration parameters: IgnoredMethods. +Metrics/PerceivedComplexity: + Max: 10 + +# Offense count: 2 +# Configuration parameters: ForbiddenDelimiters. +# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$)) +Naming/HeredocDelimiterNaming: + Exclude: + - 'spec/matchers.rb' + - 'winrm-fs.gemspec' + +# Offense count: 2 +# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods. +# SupportedStyles: annotated, template, unannotated +Style/FormatStringToken: + EnforcedStyle: unannotated + +# Offense count: 1 +# This cop supports unsafe auto-correction (--auto-correct-all). +# Configuration parameters: AllowedReceivers. +Style/HashEachMethods: + Exclude: + - 'lib/winrm-fs/core/file_transporter.rb' + +# Offense count: 5 +# This cop supports unsafe auto-correction (--auto-correct-all). +# Configuration parameters: EnforcedStyle, IgnoredMethods. +# SupportedStyles: predicate, comparison +Style/NumericPredicate: + Exclude: + - 'spec/**/*' + - 'lib/winrm-fs/core/file_transporter.rb' + - 'lib/winrm-fs/file_manager.rb' + +# Offense count: 1 +# Configuration parameters: AllowedMethods. +# AllowedMethods: respond_to_missing? +Style/OptionalBooleanParameter: + Exclude: + - 'lib/winrm-fs/file_manager.rb' + +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +Style/RedundantBegin: + Exclude: + - 'lib/winrm-fs/file_manager.rb' + +# Offense count: 4 +# This cop supports unsafe auto-correction (--auto-correct-all). +# Configuration parameters: Mode. +Style/StringConcatenation: + Exclude: + - 'spec/integration/file_manager_spec.rb' + - 'spec/spec_helper.rb' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4b674e6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -distro: xenial -cache: bundler -language: ruby -rvm: - - 2.4.9 - - 2.5.7 - - 2.6.5 - -# This prevents testing branches that are created just for PRs -branches: - only: - - master diff --git a/appveyor.yml b/appveyor.yml index ee0d8e3..939000b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: "master-{build}" -os: Windows Server 2012 R2 +image: Visual Studio 2019 platform: - x64 @@ -9,7 +9,11 @@ environment: winrm_password: Pass@word1 matrix: - - ruby_version: "24" + - ruby_version: "27" + winrm_endpoint: http://localhost:5985/wsman + - ruby_version: "31" + winrm_endpoint: http://localhost:5985/wsman + - ruby_version: "30" winrm_endpoint: http://localhost:5985/wsman clone_folder: c:\projects\winrm-fs @@ -21,6 +25,7 @@ branches: install: - ps: net user /add $env:winrm_user $env:winrm_password - ps: net localgroup administrators $env:winrm_user /add + - ps: Enable-PSRemoting -Force - ps: winrm set winrm/config/client/auth '@{Basic="true"}' - ps: winrm set winrm/config/service/auth '@{Basic="true"}' - ps: winrm set winrm/config/service '@{AllowUnencrypted="true"}' diff --git a/winrm-fs.gemspec b/winrm-fs.gemspec index 6eb0d4f..b2596e5 100644 --- a/winrm-fs.gemspec +++ b/winrm-fs.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |s| s.bindir = 'bin' s.executables = ['rwinrmcp'] - s.required_ruby_version = '>= 2.4.0' + s.required_ruby_version = '>= 2.5.0' s.add_runtime_dependency 'erubi', '>= 1.7' s.add_runtime_dependency 'logging', ['>= 1.6.1', '< 3.0'] s.add_runtime_dependency 'rubyzip', '~> 2.0' @@ -35,5 +35,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry' s.add_development_dependency 'rake', '>= 10.3', '< 13' s.add_development_dependency 'rspec', '~> 3.0' - s.add_development_dependency 'rubocop', '~> 0.68.0' + s.add_development_dependency 'rubocop', '~> 1.26.0' end