niftany 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9723ee9b0af9bab1b6c6bdef2aaa8dc5b1ca34ed6247e1d43894dbe47d8438b
4
- data.tar.gz: 736499ca2ab064b61cc101250d8ede7cd600f3b0742ca27887a80ae7d7d474b0
3
+ metadata.gz: 18c6a73607f999283df33ecdc64dc5403936306f2d7b2e33ff39d09d4b82307a
4
+ data.tar.gz: c831973d3e5e0ded09b658299631cf28853fb27a4eed8f769148fdcd66b63ddb
5
5
  SHA512:
6
- metadata.gz: 4443987e6c3017cbf572dfe5aee515ad2b0165e3360461852e0e7a14418d9ee62c2bab66a5525402b550a6de34d84dfd81376981dc1b561f61631d0a2443d6cc
7
- data.tar.gz: c5de5ff5e51cd45ebb9dc33516d47307b3816fae9510848b2b5b568088849a72a5d1ecb5961156186e6643aa99eeed0beb1bc3d60b8e62d38581fac4ae9dc1bf
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-03-20 11:47:53 -0400 using RuboCop version 0.52.1.
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: 116
18
+ Max: 114
data/.travis.yml CHANGED
@@ -3,3 +3,4 @@ language: ruby
3
3
  rvm:
4
4
  - 2.4.1
5
5
  before_install: gem install bundler -v 1.16.1
6
+ script: bundle exec rubocop
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(['--lint-all']) # returns boolean
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.2'
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 '\
@@ -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 80 characters.'
210
+ Description: 'Limit lines to 120 characters.'
210
211
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
211
- Enabled: false
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.2
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-04-03 00:00:00.000000000 Z
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.4
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