phare 0.1.2 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -2
- data/lib/phare.rb +1 -0
- data/lib/phare/check.rb +3 -0
- data/lib/phare/checks/ruby_rubocop.rb +1 -1
- data/lib/phare/checks/scss_lint.rb +42 -0
- data/lib/phare/version.rb +1 -1
- data/phare.gemspec +0 -2
- metadata +3 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68da804aeb2fef50fa402ca2751178599d3ebc51
|
4
|
+
data.tar.gz: c403260c2e1bd14530d22eddd6ac15cad0223475
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19e7afe867999a353c59f0d94598e7d3c6f8c859964523ec47acf22a61f2b6b0a26a348bd295cb276f24e122e6f6516cdd9abee3ec781f1e7bbf3e09a6ddd8d
|
7
|
+
data.tar.gz: d73d72d49693b4e1bf109dca1adb389aeeda5fcb8857670151fa34f04f690025e99a526aa043808d209b62871850eab57f6b0fc1b231693530d7d5f25697680c
|
data/README.md
CHANGED
@@ -1,15 +1,27 @@
|
|
1
|
-
|
1
|
+
<p align="center">
|
2
|
+
<a href="https://github.com/mirego/phare">
|
3
|
+
<img src="http://i.imgur.com/9Pa2RgE.png" alt="Phare" />
|
4
|
+
</a>
|
5
|
+
<br />
|
6
|
+
Phare looks into your files and check for coding style errors.
|
7
|
+
<br /><br />
|
8
|
+
<a href="https://rubygems.org/gems/phare"><img src="https://badge.fury.io/rb/phare.png" /></a>
|
9
|
+
</p>
|
2
10
|
|
3
11
|
## Installation
|
4
12
|
|
5
|
-
Add
|
13
|
+
Add these lines to your application’s Gemfile as development dependancies:
|
6
14
|
|
7
15
|
```ruby
|
8
16
|
group :development do
|
17
|
+
gem 'rubocop' # to check Ruby code
|
18
|
+
gem 'scss-lint' # to check SCSS code
|
19
|
+
|
9
20
|
gem 'phare'
|
10
21
|
end
|
11
22
|
```
|
12
23
|
|
24
|
+
|
13
25
|
If you wish to check for JavaScript code style using JSHint and JSCS, you must install them too:
|
14
26
|
|
15
27
|
```bash
|
data/lib/phare.rb
CHANGED
data/lib/phare/check.rb
CHANGED
@@ -0,0 +1,42 @@
|
|
1
|
+
module Phare
|
2
|
+
module Checks
|
3
|
+
class ScssLint
|
4
|
+
attr_reader :status
|
5
|
+
|
6
|
+
def initialize(directory)
|
7
|
+
@path = File.expand_path("#{directory}app/assets/**/*.css.scss", __FILE__)
|
8
|
+
@command = "scss-lint #{@path}"
|
9
|
+
end
|
10
|
+
|
11
|
+
def run
|
12
|
+
if should_run?
|
13
|
+
print_banner
|
14
|
+
system(@command)
|
15
|
+
@status = $CHILD_STATUS.exitstatus
|
16
|
+
|
17
|
+
if @status == 0
|
18
|
+
puts 'No code style errors found.'
|
19
|
+
else
|
20
|
+
puts "Something went wrong. Program exited with #{@status}"
|
21
|
+
end
|
22
|
+
|
23
|
+
puts ''
|
24
|
+
else
|
25
|
+
@status = 0
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
protected
|
30
|
+
|
31
|
+
def should_run?
|
32
|
+
!`which scss-lint`.empty?
|
33
|
+
end
|
34
|
+
|
35
|
+
def print_banner
|
36
|
+
puts '------------------------------------------'
|
37
|
+
puts 'Running SCSS-Lint to check for SCSS style…'
|
38
|
+
puts '------------------------------------------'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/phare/version.rb
CHANGED
data/phare.gemspec
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: 0.
|
4
|
+
version: '0.2'
|
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-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rubocop
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
description: ''
|
56
42
|
email:
|
57
43
|
- remi@exomel.com
|
@@ -71,6 +57,7 @@ files:
|
|
71
57
|
- lib/phare/checks/javascript_jscs.rb
|
72
58
|
- lib/phare/checks/javascript_jshint.rb
|
73
59
|
- lib/phare/checks/ruby_rubocop.rb
|
60
|
+
- lib/phare/checks/scss_lint.rb
|
74
61
|
- lib/phare/cli.rb
|
75
62
|
- lib/phare/version.rb
|
76
63
|
- phare.gemspec
|