Skip to content

Commit

Permalink
Merge pull request #348 from puppetlabs/CAT-1430-bump_depdencies
Browse files Browse the repository at this point in the history
(CAT-1430) - Drop ruby 2.5 Support & Add Ruby 3.x Support
  • Loading branch information
pmcmaw authored Sep 29, 2023
2 parents 2bb57a6 + 4150c93 commit 0448784
Show file tree
Hide file tree
Showing 85 changed files with 973 additions and 778 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
- '3.2'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand All @@ -32,8 +32,13 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
- '3.2'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand All @@ -45,16 +50,22 @@ jobs:
ruby_version: ${{ matrix.ruby_version }}
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor acceptance_languageserver'
puppet_version: '~> 7.24'
puppet_version: ${{ matrix.puppet_version }}

build:
name: "Build Editor Service"
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
name: "Build Editor Service (Ruby ${{ matrix.ruby_version }})"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set build version
shell: pwsh
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
- '3.2'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand All @@ -31,8 +31,13 @@ jobs:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
- '3.2'
include:
- ruby_version: '2.7'
puppet_version: '~> 7.0'
- ruby_version: '3.2'
puppet_version: '~> 8.0'
runs_on:
- 'ubuntu-latest'
- 'windows-latest'
Expand All @@ -44,16 +49,22 @@ jobs:
ruby_version: ${{ matrix.ruby_version }}
runs_on: ${{ matrix.runs_on }}
rake_task: 'gem_revendor acceptance_languageserver'
puppet_version: '~> 7.24'
puppet_version: ${{ matrix.puppet_version }}

build:
name: "Build Editor Service"
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.7'
- '3.2'
name: "Build Editor Service (Ruby ${{ matrix.ruby_version }})"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Set build version
shell: pwsh
Expand All @@ -67,3 +78,4 @@ jobs:
name: puppet-editor-services
path: output/*.zip
retention-days: 2

113 changes: 9 additions & 104 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rspec

AllCops:
Include:
- 'lib/**/*.rb'
Expand All @@ -10,108 +14,9 @@ AllCops:
- 'vendor/**/*'
- Gemfile
- Rakefile

Style/Documentation:
Enabled: false
Style/NumericLiterals:
Enabled: false

# Length is not useful indicator
Layout/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false

# Empty method definitions over more than one line is ok
Style/EmptyMethod:
Enabled: false

# Either sytnax for regex is ok
Style/RegexpLiteral:
Enabled: false

# Sometimes, I actually want both!
Style/DateTime:
Enabled: false

# Please don't fail at failing.
Lint/RedundantCopDisableDirective:
Enabled: false

# Don't care
Naming/MemoizedInstanceVariableName:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Metrics/ParameterLists:
Enabled: false

# In some cases readability is better without these cops enabled
Style/ConditionalAssignment:
Enabled: false
Style/Next:
Enabled: false

# Line endings are just a mess
Layout/EndOfLine:
Enabled: false

# We only alias for monkey patching
Style/Alias:
Enabled: false

# Harder to read when on
Style/SymbolProc:
Enabled: false
Style/HashSyntax:
Enabled: false

Layout/HashAlignment:
EnforcedHashRocketStyle: table

Naming/RescuedExceptionsVariableName:
PreferredName: e

# There's no benefit to this and can make things harder to read.
Style/NumericPredicate:
Enabled: false

# This is not valid on Ruby 2.1
Style/SafeNavigation:
Enabled: false

# This is not valid on Ruby 2.1
Layout/HeredocIndentation:
Enabled: false

# Rubocop 0.80.0 rules
Style/HashEachMethods:
Enabled: false

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

# Rubocop 0.80.1 rules
Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/OptionalBooleanParameter:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: '2.7'
# Disabled
Style/ClassAndModuleChildren:
Enabled: false
Loading

0 comments on commit 0448784

Please sign in to comment.