From e242499bdcb9134ac9c53c69d5839310c232c6e3 Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Mon, 11 Apr 2022 14:13:10 -0700 Subject: [PATCH] use gh action instead of travis and modernize rubocop Signed-off-by: Matt Wrock --- .rubocop.yml | 8 +++++--- .rubocop_todo.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 13 ------------- winrm-elevated.gemspec | 4 ++-- 4 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 .rubocop_todo.yml delete mode 100644 .travis.yml diff --git a/.rubocop.yml b/.rubocop.yml index a6016de..344872f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,19 +1,21 @@ +inherit_from: .rubocop_todo.yml + Style/FrozenStringLiteralComment: Enabled: false -Style/FileName: +Naming/FileName: Enabled: false Style/Encoding: Enabled: true -Metrics/LineLength: +Layout/LineLength: Max: 120 Metrics/MethodLength: Max: 20 -ClassLength: +Metrics/ClassLength: Max: 250 Metrics/AbcSize: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..1cc8946 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,28 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2022-04-11 21:11:36 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: 8 +# Configuration parameters: EnforcedStyle. +# SupportedStyles: native, lf, crlf +Layout/EndOfLine: + Exclude: + - 'Gemfile' + - 'Rakefile' + - 'lib/winrm-elevated.rb' + - 'lib/winrm/shells/elevated.rb' + - 'spec/matchers.rb' + - 'spec/powershell_elevated_spec.rb' + - 'spec/spec_helper.rb' + - 'winrm-elevated.gemspec' + +# Offense count: 1 +# This cop supports unsafe auto-correction (--auto-correct-all). +# Configuration parameters: Mode. +Style/StringConcatenation: + Exclude: + - 'lib/winrm/shells/elevated.rb' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c5f0ae..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -distro: xenial -cache: bundler -language: ruby -rvm: - - 2.3.8 - - 2.4.5 - - 2.5.3 - - 2.6.3 - -# This prevents testing branches that are created just for PRs -branches: - only: - - master diff --git a/winrm-elevated.gemspec b/winrm-elevated.gemspec index b054cba..3bb729b 100644 --- a/winrm-elevated.gemspec +++ b/winrm-elevated.gemspec @@ -20,12 +20,12 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.extra_rdoc_files = %w[README.md LICENSE] - s.required_ruby_version = '>= 2.3.0' + s.required_ruby_version = '>= 2.5.0' s.add_runtime_dependency 'erubi', '~> 1.8' s.add_runtime_dependency 'winrm', '~> 2.0' s.add_runtime_dependency 'winrm-fs', '~> 1.0' s.add_development_dependency 'rake', '>= 10.3', '< 13' s.add_development_dependency 'rexml' s.add_development_dependency 'rspec', '~> 3.2' - s.add_development_dependency 'rubocop', '~> 0.51.0' + s.add_development_dependency 'rubocop', '~> 1.26.0' end