Skip to content

Commit f98874d

Browse files
authored
Some cleanup around ruby version requirements (#51)
* Use local config instead of polluting gitignore * Loosen version requirement * Override rubocop target ruby version * Update target ruby version in .rubocop.yml - remove cop override - eventually we could get a command line option for running the test suite in different ruby versions: rubocop/rubocop#7557 * Include 2.4 in ruby versions for now to support legacy
1 parent 8d2fe2f commit f98874d

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
ruby: [ '2.5', '2.6.x', '2.x']
10+
ruby: ['2.4', '2.5', '2.6.x', '2.x']
1111
name: Test gem in ruby version ${{ matrix.ruby }}
1212
steps:
1313
- uses: actions/checkout@v1

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@
99
# https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
1010
Gemfile.lock
1111

12-
# ignore version manager files
13-
.tool-versions

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
AllCops:
2+
TargetRubyVersion: 2.4
3+
14
Style/Documentation:
25
Enabled: false
36

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/vrt/node_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878

7979
context 'cwe' do
8080
it 'has the exepected (concatenated) CWE IDs' do
81-
expect(mappings[:cwe]).to eq [
82-
'CWE-942',
83-
'CWE-933'
81+
expect(mappings[:cwe]).to eq %w[
82+
CWE-942
83+
CWE-933
8484
]
8585
end
8686
end

vrt.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
1515
spec.license = 'MIT'
1616
spec.files = Dir['lib/**/*.{rb,json}']
1717
spec.require_paths = ['lib']
18-
spec.required_ruby_version = '>= 2.5'
18+
spec.required_ruby_version = '>= 2.4'
1919

2020
spec.add_development_dependency 'bundler', '~> 2.1'
2121
spec.add_development_dependency 'pry', '~> 0.11'

0 commit comments

Comments
 (0)