niftany 0.7.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 824cf0011b28eaa542f0873d3095e946d5318829d12e3064a21afe48ddad4567
4
- data.tar.gz: 2d7fea8225e5e6db898cec5122c0457720d9ef037ee328b5d31de1c36693fcfc
3
+ metadata.gz: c716a5f1dfa46762fa014801cfb3d3e4034e35384ddecb1962934a86fd66121d
4
+ data.tar.gz: dd64a751bd791c735de1fb648aefb6919e7fa592ca3cb2364da29fd687bca54e
5
5
  SHA512:
6
- metadata.gz: 47affa6bb169e7741165c28780abf42314b318d41edc89edaf2d054fdd1ba13bc8f96b7eec8c849fe529ebfe177077e60e1bdccffac175031c3eef5fa2bca436
7
- data.tar.gz: 3155909e6b7023f5e9f7e26526dbee3a740a5f35c876ca0570eda473a89fbca34a262e10521bd3f72c64acd3633553b827fb62563ade0daf5a4d5f7b45c1f5e3
6
+ metadata.gz: ca185bf9248da81b41f6b0070c84da98aebf78848ae0a7a5c62a632e9be0eda63b0c011d7bf374e8a366443788f0174e0a1fc7993df25c349c18749744cefe39
7
+ data.tar.gz: 4f976b48e699c120af2d9bb8ee9201f874949f47f513de5530da71dbc12d990b3927964dc3d5a70ff5ae45fc3560ca446489179bd378084b3891de20268e2dbd
@@ -0,0 +1,25 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ test:
11
+
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ ruby-version: ['2.6', '2.7', '3.1']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{ matrix.ruby-version }}
23
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
24
+ - name: Run Rubocop
25
+ run: bundle exec rubocop
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.3
1
+ 2.7.1
data/exe/niftany CHANGED
@@ -10,16 +10,21 @@ require 'scss_lint/cli'
10
10
  require 'colorize'
11
11
 
12
12
  def parse_opts(args)
13
- options = OpenStruct.new
13
+ options = Struct.new('Options', :auto_correct, :parallel).new
14
14
  options.auto_correct = false
15
+ options.parallel = false
15
16
 
16
17
  parser = OptionParser.new do |opts|
17
18
  opts.banner = 'Usage: niftany [options]'
18
19
 
19
- opts.on('-a', '--auto-correct', 'Correct violations') do |auto|
20
+ opts.on('-a', '--autocorrect', 'Correct violations') do |auto|
20
21
  options.auto_correct = auto
21
22
  end
22
23
 
24
+ opts.on('-p', '--parallel', 'Run RuboCop in parallel') do |parallel|
25
+ options.parallel = parallel
26
+ end
27
+
23
28
  opts.on_tail('-h', '--help', 'Show this message') do
24
29
  puts opts
25
30
  exit
@@ -30,9 +35,10 @@ def parse_opts(args)
30
35
  end
31
36
 
32
37
  def rubocop_options(options)
33
- return [] unless options.auto_correct
34
-
35
- ['--auto-correct']
38
+ rubocop_options = []
39
+ rubocop_options.append('--autocorrect') if options.auto_correct
40
+ rubocop_options.append('--parallel') if options.parallel
41
+ rubocop_options
36
42
  end
37
43
 
38
44
  def erblint_options(options)
@@ -65,7 +71,7 @@ else
65
71
  end
66
72
 
67
73
  puts 'Running SCSSLint'.yellow
68
- logger = SCSSLint::Logger.new(STDOUT)
74
+ logger = SCSSLint::Logger.new($stdout)
69
75
  scss_lint = SCSSLint::CLI.new(logger).run(ARGV) # returns integer
70
76
 
71
77
  if scss_lint.zero?
data/niftany.gemspec CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'niftany'
5
- spec.version = '0.7.0'
5
+ spec.version = '0.10.0'
6
+ spec.metadata = { 'rubygems_mfa_required' => 'true' }
6
7
  spec.authors = ['Adam Wead']
7
8
  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 ' \
9
10
  'Penn State University Libraries.'
10
11
  spec.description = 'Combining "nittany" and "nifty" into one, super-nice gem that lints all our code at once.'
11
12
  spec.homepage = 'https://github.com/psu-libraries/niftany'
@@ -13,12 +14,14 @@ Gem::Specification.new do |spec|
13
14
  spec.bindir = 'exe'
14
15
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
15
16
 
17
+ spec.required_ruby_version = '>= 2.6.0'
18
+
16
19
  spec.add_dependency 'colorize', '~> 0.8.1'
17
20
  spec.add_dependency 'erb_lint', '~> 0.0.22'
18
- spec.add_dependency 'rubocop', '~> 0.79'
21
+ spec.add_dependency 'rubocop', '~> 1.3'
19
22
  spec.add_dependency 'rubocop-performance', '~> 1.1'
20
23
  spec.add_dependency 'rubocop-rails', '~> 2.3'
21
- spec.add_dependency 'rubocop-rspec', '~> 1.3'
24
+ spec.add_dependency 'rubocop-rspec', '~> 2'
22
25
  spec.add_dependency 'scss_lint', '~> 0.55'
23
26
 
24
27
  spec.add_development_dependency 'bundler', '~> 2.0'
@@ -8,4 +8,6 @@ inherit_from:
8
8
  - rubocop/style.yml
9
9
 
10
10
  AllCops:
11
+ TargetRubyVersion: 2.6
11
12
  DisplayCopNames: true
13
+ NewCops: enable
data/rubocop/layout.yml CHANGED
@@ -55,3 +55,6 @@ Layout/LineLength:
55
55
 
56
56
  Layout/SpaceAroundMethodCallOperator:
57
57
  Enabled: true
58
+
59
+ Layout/EmptyLinesAroundAttributeAccessor:
60
+ Enabled: true
data/rubocop/style.yml CHANGED
@@ -321,3 +321,6 @@ Style/HashTransformKeys:
321
321
 
322
322
  Style/HashTransformValues:
323
323
  Enabled: false
324
+
325
+ Style/SlicingWithRange:
326
+ Enabled: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niftany
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Wead
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.79'
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.79'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop-performance
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '1.3'
89
+ version: '2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '1.3'
96
+ version: '2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: scss_lint
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -146,11 +146,11 @@ extensions: []
146
146
  extra_rdoc_files: []
147
147
  files:
148
148
  - ".erb-linters/self_closing_custom.rb"
149
+ - ".github/workflows/ci.yml"
149
150
  - ".gitignore"
150
151
  - ".rubocop.yml"
151
152
  - ".rubocop_todo.yml"
152
153
  - ".ruby-version"
153
- - ".travis.yml"
154
154
  - Gemfile
155
155
  - LICENSE.md
156
156
  - README.md
@@ -173,7 +173,8 @@ files:
173
173
  - rubocop/style.yml
174
174
  homepage: https://github.com/psu-libraries/niftany
175
175
  licenses: []
176
- metadata: {}
176
+ metadata:
177
+ rubygems_mfa_required: 'true'
177
178
  post_install_message:
178
179
  rdoc_options: []
179
180
  require_paths:
@@ -182,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
183
  requirements:
183
184
  - - ">="
184
185
  - !ruby/object:Gem::Version
185
- version: '0'
186
+ version: 2.6.0
186
187
  required_rubygems_version: !ruby/object:Gem::Requirement
187
188
  requirements:
188
189
  - - ">="
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.6.3
5
- before_install:
6
- - gem update --system
7
- - gem install bundler
8
- script: bundle exec rubocop