phare 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/phare/check.rb +7 -5
- data/lib/phare/checks/javascript_jscs.rb +1 -1
- data/lib/phare/checks/javascript_jshint.rb +4 -3
- data/lib/phare/checks/scss_lint.rb +4 -3
- data/lib/phare/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10309d7762735ae3ef48fb1112727084dd1d8da
|
4
|
+
data.tar.gz: dd3b9dd9fc72ebb2131f2ec462d062545aea5430
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1741179c8af6003784155267c49de9eb1a6f0585e5c3df597a3f745090e02f34f2d3042c39cfa81a88b554b3044a75dc1b1cf36e0036b1a478e113c2effceac6
|
7
|
+
data.tar.gz: ce128dca925a212769ee105964d024fbddd7e27eb1a3884f94647d363b2504537ca30cf2b33b28bf1abb0a5f5a8fca2c484053bc6b256fe9a89cf758b1dc1e90
|
data/lib/phare/check.rb
CHANGED
@@ -8,19 +8,21 @@ module Phare
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def run
|
11
|
-
|
11
|
+
@checks = []
|
12
|
+
|
13
|
+
@checks << ruby = Checks::RubyRubocop.new
|
12
14
|
ruby.run
|
13
15
|
|
14
|
-
scsslint = Checks::ScssLint.new(@directory)
|
16
|
+
@checks << scsslint = Checks::ScssLint.new(@directory)
|
15
17
|
scsslint.run
|
16
18
|
|
17
|
-
jshint = Checks::JavaScriptJSHint.new(@directory)
|
19
|
+
@checks << jshint = Checks::JavaScriptJSHint.new(@directory)
|
18
20
|
jshint.run
|
19
21
|
|
20
|
-
jscs = Checks::JavaScriptJSCS.new(@directory)
|
22
|
+
@checks << jscs = Checks::JavaScriptJSCS.new(@directory)
|
21
23
|
jscs.run
|
22
24
|
|
23
|
-
@status =
|
25
|
+
@status = @checks.map!(&:status).find { |status| status > 0 } || 0
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -5,8 +5,9 @@ module Phare
|
|
5
5
|
|
6
6
|
def initialize(directory)
|
7
7
|
@config = File.expand_path("#{directory}.jshintrc", __FILE__)
|
8
|
-
@path = File.expand_path("#{directory}app/assets/javascripts
|
9
|
-
@
|
8
|
+
@path = File.expand_path("#{directory}app/assets/javascripts", __FILE__)
|
9
|
+
@glob = File.join(@path, '**/*')
|
10
|
+
@command = "jshint --config #{@config} --extra-ext .js,.es6.js #{@glob}"
|
10
11
|
end
|
11
12
|
|
12
13
|
def run
|
@@ -30,7 +31,7 @@ module Phare
|
|
30
31
|
protected
|
31
32
|
|
32
33
|
def should_run?
|
33
|
-
!`which jshint`.empty? && File.exists?(@config)
|
34
|
+
!`which jshint`.empty? && File.exists?(@config) && Dir.exists?(@path)
|
34
35
|
end
|
35
36
|
|
36
37
|
def print_banner
|
@@ -4,8 +4,9 @@ module Phare
|
|
4
4
|
attr_reader :status
|
5
5
|
|
6
6
|
def initialize(directory)
|
7
|
-
@path = File.expand_path("#{directory}app/assets
|
8
|
-
@
|
7
|
+
@path = File.expand_path("#{directory}app/assets/stylesheets", __FILE__)
|
8
|
+
@glob = File.join(@path, '**/*.css.scss')
|
9
|
+
@command = "scss-lint #{@glob}"
|
9
10
|
end
|
10
11
|
|
11
12
|
def run
|
@@ -29,7 +30,7 @@ module Phare
|
|
29
30
|
protected
|
30
31
|
|
31
32
|
def should_run?
|
32
|
-
!`which scss-lint`.empty?
|
33
|
+
!`which scss-lint`.empty? && Dir.exists?(@path)
|
33
34
|
end
|
34
35
|
|
35
36
|
def print_banner
|
data/lib/phare/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rémi Prévost
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|