niftany 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +7 -2
- data/.travis.yml +1 -0
- data/exe/niftany +33 -2
- data/niftany.gemspec +1 -1
- data/niftany_rubocop_ruby.yml +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18c6a73607f999283df33ecdc64dc5403936306f2d7b2e33ff39d09d4b82307a
|
4
|
+
data.tar.gz: c831973d3e5e0ded09b658299631cf28853fb27a4eed8f769148fdcd66b63ddb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 664801a1f3cacc07893007a561514ad5330d06b7d9cb5a46ae3d75dc575144df90bced148685106b37a5929bb9dc5b2cd0a31e1b659bf6115d3668b59f94e5ca
|
7
|
+
data.tar.gz: 1c06668941119fcc9e50e95771b3d23cc75b19c8d81a370e32d25a64e90421e293640abcfd0169f3499767e532e3909a424722fdaefff2c06ab5d0ae45f50dfd
|
data/.rubocop_todo.yml
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-
|
3
|
+
# on 2018-05-16 16:31:11 -0400 using RuboCop version 0.52.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: CountComments.
|
11
|
+
Metrics/MethodLength:
|
12
|
+
Max: 14
|
13
|
+
|
9
14
|
# Offense count: 2
|
10
15
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
11
16
|
# URISchemes: http, https
|
12
17
|
Metrics/LineLength:
|
13
|
-
Max:
|
18
|
+
Max: 114
|
data/.travis.yml
CHANGED
data/exe/niftany
CHANGED
@@ -9,10 +9,41 @@ require 'scss_lint'
|
|
9
9
|
require 'scss_lint/cli'
|
10
10
|
require 'colorize'
|
11
11
|
|
12
|
+
def parse_opts(args)
|
13
|
+
options = OpenStruct.new
|
14
|
+
options.auto_correct = false
|
15
|
+
|
16
|
+
parser = OptionParser.new do |opts|
|
17
|
+
opts.banner = 'Usage: niftany [options]'
|
18
|
+
|
19
|
+
opts.on('-a', '--auto-correct', 'Correct violations') do |auto|
|
20
|
+
options.auto_correct = auto
|
21
|
+
end
|
22
|
+
|
23
|
+
opts.on_tail('-h', '--help', 'Show this message') do
|
24
|
+
puts opts
|
25
|
+
exit
|
26
|
+
end
|
27
|
+
end
|
28
|
+
parser.parse!(args)
|
29
|
+
options
|
30
|
+
end
|
31
|
+
|
32
|
+
def rubocop_options(options)
|
33
|
+
return [] unless options.auto_correct
|
34
|
+
['--auto-correct']
|
35
|
+
end
|
36
|
+
|
37
|
+
def erblint_options(options)
|
38
|
+
return ['--lint-all'] unless options.auto_correct
|
39
|
+
['--lint-all', '--autocorrect']
|
40
|
+
end
|
41
|
+
|
42
|
+
options = parse_opts(ARGV)
|
12
43
|
result = 0
|
13
44
|
|
14
45
|
puts 'Running Rubocop'.yellow
|
15
|
-
rubocop = RuboCop::CLI.new.run # returns integer
|
46
|
+
rubocop = RuboCop::CLI.new.run(rubocop_options(options)) # returns integer
|
16
47
|
|
17
48
|
if rubocop.zero?
|
18
49
|
puts 'Rubocop OK!'.green
|
@@ -22,7 +53,7 @@ else
|
|
22
53
|
end
|
23
54
|
|
24
55
|
puts 'Running ERBLint'.yellow
|
25
|
-
erblint = ERBLint::CLI.new.run(
|
56
|
+
erblint = ERBLint::CLI.new.run(erblint_options(options)) # returns boolean
|
26
57
|
|
27
58
|
if erblint
|
28
59
|
puts 'ERBLint OK!'.green
|
data/niftany.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
Gem::Specification.new do |spec|
|
3
3
|
spec.name = 'niftany'
|
4
|
-
spec.version = '0.0
|
4
|
+
spec.version = '0.1.0'
|
5
5
|
spec.authors = ['Adam Wead']
|
6
6
|
spec.email = ['amsterdamos@gmail.com']
|
7
7
|
spec.summary = 'Manages configurations and versions of linters used in projects at '\
|
data/niftany_rubocop_ruby.yml
CHANGED
@@ -205,10 +205,12 @@ Style/LineEndConcatenation:
|
|
205
205
|
line end.
|
206
206
|
Enabled: false
|
207
207
|
|
208
|
+
# Override style guide to allow length of up to 120 characters.
|
208
209
|
Metrics/LineLength:
|
209
|
-
Description: 'Limit lines to
|
210
|
+
Description: 'Limit lines to 120 characters.'
|
210
211
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
211
|
-
Enabled:
|
212
|
+
Enabled: true
|
213
|
+
Max: 120
|
212
214
|
|
213
215
|
Metrics/MethodLength:
|
214
216
|
Description: 'Avoid methods longer than 10 lines of code.'
|
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.0
|
4
|
+
version: 0.1.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: 2018-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb_lint
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.7.
|
154
|
+
rubygems_version: 2.7.6
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Manages configurations and versions of linters used in projects at Penn State
|