Skip to content

Commit 382fd44

Browse files
Update rubocop (#22)
* updates rubocop * fix Struct * Use --autocorrect instead of --auto-correct * Adds the false setting back in to options Struct Co-authored-by: Alex Kiessling <ajkiessl@gmail.com>
1 parent fd76a8f commit 382fd44

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
ruby-version: ['2.6', '2.7']
15+
ruby-version: ['2.6', '2.7', '3.1']
1616

1717
steps:
1818
- uses: actions/checkout@v2

exe/niftany

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ require 'scss_lint/cli'
1010
require 'colorize'
1111

1212
def parse_opts(args)
13-
options = OpenStruct.new
13+
options = Struct.new('Options', :auto_correct, :parallel).new
1414
options.auto_correct = false
1515
options.parallel = false
1616

1717
parser = OptionParser.new do |opts|
1818
opts.banner = 'Usage: niftany [options]'
1919

20-
opts.on('-a', '--auto-correct', 'Correct violations') do |auto|
20+
opts.on('-a', '--autocorrect', 'Correct violations') do |auto|
2121
options.auto_correct = auto
2222
end
2323

@@ -36,7 +36,7 @@ end
3636

3737
def rubocop_options(options)
3838
rubocop_options = []
39-
rubocop_options.append('--auto-correct') if options.auto_correct
39+
rubocop_options.append('--autocorrect') if options.auto_correct
4040
rubocop_options.append('--parallel') if options.parallel
4141
rubocop_options
4242
end

niftany.gemspec

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = 'niftany'
5-
spec.version = '0.9.0'
5+
spec.version = '0.10.0'
6+
spec.metadata = { 'rubygems_mfa_required' => 'true' }
67
spec.authors = ['Adam Wead']
78
spec.email = ['amsterdamos@gmail.com']
8-
spec.summary = 'Manages configurations and versions of linters used in projects at '\
9+
spec.summary = 'Manages configurations and versions of linters used in projects at ' \
910
'Penn State University Libraries.'
1011
spec.description = 'Combining "nittany" and "nifty" into one, super-nice gem that lints all our code at once.'
1112
spec.homepage = 'https://github.com/psu-libraries/niftany'
@@ -17,10 +18,10 @@ Gem::Specification.new do |spec|
1718

1819
spec.add_dependency 'colorize', '~> 0.8.1'
1920
spec.add_dependency 'erb_lint', '~> 0.0.22'
20-
spec.add_dependency 'rubocop', '~> 0.79'
21+
spec.add_dependency 'rubocop', '~> 1.3'
2122
spec.add_dependency 'rubocop-performance', '~> 1.1'
2223
spec.add_dependency 'rubocop-rails', '~> 2.3'
23-
spec.add_dependency 'rubocop-rspec', '~> 1.3'
24+
spec.add_dependency 'rubocop-rspec', '~> 2'
2425
spec.add_dependency 'scss_lint', '~> 0.55'
2526

2627
spec.add_development_dependency 'bundler', '~> 2.0'

0 commit comments

Comments
 (0)