Skip to content

Commit

Permalink
Update rubocop (#22)
Browse files Browse the repository at this point in the history
* updates rubocop

* fix Struct

* Use --autocorrect instead of --auto-correct

* Adds the false setting back in to options Struct

Co-authored-by: Alex Kiessling <[email protected]>
  • Loading branch information
whereismyjetpack and ajkiessl authored Jul 18, 2022
1 parent fd76a8f commit 382fd44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.6', '2.7']
ruby-version: ['2.6', '2.7', '3.1']

steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions exe/niftany
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ require 'scss_lint/cli'
require 'colorize'

def parse_opts(args)
options = OpenStruct.new
options = Struct.new('Options', :auto_correct, :parallel).new
options.auto_correct = false
options.parallel = false

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

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

Expand All @@ -36,7 +36,7 @@ end

def rubocop_options(options)
rubocop_options = []
rubocop_options.append('--auto-correct') if options.auto_correct
rubocop_options.append('--autocorrect') if options.auto_correct
rubocop_options.append('--parallel') if options.parallel
rubocop_options
end
Expand Down
9 changes: 5 additions & 4 deletions niftany.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

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

spec.add_dependency 'colorize', '~> 0.8.1'
spec.add_dependency 'erb_lint', '~> 0.0.22'
spec.add_dependency 'rubocop', '~> 0.79'
spec.add_dependency 'rubocop', '~> 1.3'
spec.add_dependency 'rubocop-performance', '~> 1.1'
spec.add_dependency 'rubocop-rails', '~> 2.3'
spec.add_dependency 'rubocop-rspec', '~> 1.3'
spec.add_dependency 'rubocop-rspec', '~> 2'
spec.add_dependency 'scss_lint', '~> 0.55'

spec.add_development_dependency 'bundler', '~> 2.0'
Expand Down

0 comments on commit 382fd44

Please sign in to comment.