niftany 0.0.1 → 0.0.2

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: e4dfb09145aab3adf6b701335ed268fb542528c14613988e086b5f8f09234c66
4
- data.tar.gz: 00747f91fe011a869ae8f816f953e74a776ef1c748020dec589011669c683fa6
3
+ metadata.gz: a9723ee9b0af9bab1b6c6bdef2aaa8dc5b1ca34ed6247e1d43894dbe47d8438b
4
+ data.tar.gz: 736499ca2ab064b61cc101250d8ede7cd600f3b0742ca27887a80ae7d7d474b0
5
5
  SHA512:
6
- metadata.gz: 1fadc30550257e696583f7e35241b68b2ac56618639a2412490ff0daf6a2e50a985001fb1b7d980226fe52b7d8e0f53b87851965193f946706ffb92ac476f76c
7
- data.tar.gz: f9b9f096af4e694c8b392e1c36f31dd6e0e28fbf017dc6e0b7c720fe889197cd36fd42c0d37e8476b7f57b391c0431d1a662f5c42b57d85f8e6e555cff2e53c7
6
+ metadata.gz: 4443987e6c3017cbf572dfe5aee515ad2b0165e3360461852e0e7a14418d9ee62c2bab66a5525402b550a6de34d84dfd81376981dc1b561f61631d0a2443d6cc
7
+ data.tar.gz: c5de5ff5e51cd45ebb9dc33516d47307b3816fae9510848b2b5b568088849a72a5d1ecb5961156186e6643aa99eeed0beb1bc3d60b8e62d38581fac4ae9dc1bf
data/README.md CHANGED
@@ -22,6 +22,10 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
+ To run all the linters at once:
26
+
27
+ $ bundle exec niftany
28
+
25
29
  Setup and run each linter accordingly:
26
30
 
27
31
  ### Rubocop
@@ -37,10 +41,12 @@ Then run:
37
41
 
38
42
  ### erb-lint
39
43
 
40
- Copy `niftany_erblint.yml` to your local repo and run:
44
+ Copy `niftany_erblint.yml` to `.erb-lint.yml` in your local repo and run:
41
45
 
42
46
  $ bundle exec erblint --lint-all --autocorrect
43
47
 
44
48
  ### scss-lint
45
49
 
50
+ Copy `niftany_scsslint.yml` to `.scss-lint.yml` in your local repo and run:
51
+
46
52
  $ bundle exec scss-lint
data/exe/niftany ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift("#{__dir__}/../lib")
5
+
6
+ require 'rubocop'
7
+ require 'erb_lint/cli'
8
+ require 'scss_lint'
9
+ require 'scss_lint/cli'
10
+ require 'colorize'
11
+
12
+ result = 0
13
+
14
+ puts 'Running Rubocop'.yellow
15
+ rubocop = RuboCop::CLI.new.run # returns integer
16
+
17
+ if rubocop.zero?
18
+ puts 'Rubocop OK!'.green
19
+ else
20
+ result = 1
21
+ puts 'Rubocop FAILED!'.red
22
+ end
23
+
24
+ puts 'Running ERBLint'.yellow
25
+ erblint = ERBLint::CLI.new.run(['--lint-all']) # returns boolean
26
+
27
+ if erblint
28
+ puts 'ERBLint OK!'.green
29
+ else
30
+ result = 1
31
+ puts 'ERBLint FAILED!'.red
32
+ end
33
+
34
+ puts 'Running SCSSLint'.yellow
35
+ logger = SCSSLint::Logger.new(STDOUT)
36
+ scss_lint = SCSSLint::CLI.new(logger).run(ARGV) # returns integer
37
+
38
+ if scss_lint.zero?
39
+ puts 'SCSSLint OK!'.green
40
+ else
41
+ result = 1
42
+ puts 'SCSSLint FAILED!'.red
43
+ end
44
+
45
+ exit result
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.1'
4
+ spec.version = '0.0.2'
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 '\
@@ -0,0 +1,14 @@
1
+ # scss-lint config file
2
+
3
+ # Lint all scss files
4
+ scss_files: "**/*.scss"
5
+
6
+ # Files to exclude
7
+ exclude: 'vendor/*'
8
+
9
+ # List of gem names to load custom linters from (make sure they are already
10
+ # installed)
11
+ plugin_gems: []
12
+
13
+ # Default severity of all linters.
14
+ severity: warning
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.1
4
+ version: 0.0.2
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-03-26 00:00:00.000000000 Z
11
+ date: 2018-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb_lint
@@ -110,7 +110,8 @@ description: Combining "nittany" and "nifty" into one, super-nice gem that lints
110
110
  our code at once.
111
111
  email:
112
112
  - amsterdamos@gmail.com
113
- executables: []
113
+ executables:
114
+ - niftany
114
115
  extensions: []
115
116
  extra_rdoc_files: []
116
117
  files:
@@ -123,12 +124,14 @@ files:
123
124
  - Rakefile
124
125
  - bin/console
125
126
  - bin/setup
127
+ - exe/niftany
126
128
  - niftany.gemspec
127
129
  - niftany_erblint.yml
128
130
  - niftany_rubocop.yml
129
131
  - niftany_rubocop_rails.yml
130
132
  - niftany_rubocop_rspec.yml
131
133
  - niftany_rubocop_ruby.yml
134
+ - niftany_scsslint.yml
132
135
  homepage: https://github.com/psu-libraries/niftany
133
136
  licenses: []
134
137
  metadata: {}