guard-rubycritic 0.0.13 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/guard/rubycritic.rb +5 -3
- data/lib/guard/rubycritic/version.rb +1 -1
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52aa7ffa8c6475dae4c639a7e0e8e5743e5b7dd9
|
4
|
+
data.tar.gz: f20ce3045c25fa37fa1d7959a6a860b04888e0e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56345177e5011598baf3219452f5450a6ac9e3f5b00f1c8a3f9020bd2da00e5d16018c3f1f5b4c50e11b6a0cb7be7338eec42ecec68b697e485a8e8c54581029
|
7
|
+
data.tar.gz: a7b9ca86e3020f724a016dccca19e576362b2d9a7dca2488a9f9a65badf2eaaffff01a0d1701fc5e229bf5eb896634c8cb74b5b78488d3271488767e64e7fffa
|
data/README.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
Guard::
|
1
|
+
Guard::RubyCritic
|
2
2
|
=================
|
3
3
|
|
4
|
-
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/guard-rubycritic.svg)](http://badge.fury.io/rb/guard-rubycritic)
|
5
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/whitesmith/guard-rubycritic.svg)](https://codeclimate.com/github/whitesmith/guard-rubycritic)
|
6
|
+
|
7
|
+
<img src="http://i.imgur.com/66HACCD.png" alt="RubyCritic Icon" align="right" />
|
8
|
+
Guard::RubyCritic is a tool that detects and reports smells in Ruby code in real-time.
|
5
9
|
|
6
10
|
Installation
|
7
11
|
------------
|
@@ -27,8 +31,10 @@ $ guard init rubycritic
|
|
27
31
|
Usage
|
28
32
|
-----
|
29
33
|
|
30
|
-
Change your `Guardfile` to your heart's content and
|
34
|
+
Change your `Guardfile` to your heart's content and start it with the following command:
|
31
35
|
|
32
36
|
```bash
|
33
37
|
$ guard
|
34
38
|
```
|
39
|
+
|
40
|
+
Each time you save a file, that file will be analysed and its report will be available at `YOUR_PROJECT_ROOT/tmp/rubycritic/current_file.html`.
|
data/lib/guard/rubycritic.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "guard"
|
2
2
|
require "guard/plugin"
|
3
3
|
require "rubycritic"
|
4
|
-
require "rubycritic/
|
4
|
+
require "rubycritic/reporters/mini"
|
5
5
|
|
6
6
|
module Guard
|
7
7
|
|
@@ -12,7 +12,7 @@ module Guard
|
|
12
12
|
# @return [Object] the task result
|
13
13
|
#
|
14
14
|
def start
|
15
|
-
@rubycritic = ::Rubycritic::Orchestrator
|
15
|
+
@rubycritic = ::Rubycritic::Orchestrator.new
|
16
16
|
UI.info "Guard::Rubycritic is critiquing"
|
17
17
|
end
|
18
18
|
|
@@ -22,7 +22,9 @@ module Guard
|
|
22
22
|
# @return [Object] the task result
|
23
23
|
#
|
24
24
|
def run_on_changes(paths)
|
25
|
-
|
25
|
+
analysed_files = @rubycritic.critique(paths)
|
26
|
+
report_location = ::Rubycritic::Reporter::Mini.new(analysed_files).generate_report
|
27
|
+
UI.info "New critique at #{report_location}"
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-rubycritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -28,22 +28,16 @@ dependencies:
|
|
28
28
|
name: rubycritic
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.13
|
34
|
-
- - "<"
|
31
|
+
- - "~>"
|
35
32
|
- !ruby/object:Gem::Version
|
36
|
-
version: '1'
|
33
|
+
version: '1.0'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- - "
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 0.0.13
|
44
|
-
- - "<"
|
38
|
+
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '1'
|
40
|
+
version: '1.0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: bundler
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|