face_control 0.3.0 → 0.4.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 +4 -4
- data/README.md +4 -0
- data/face_control.gemspec +1 -0
- data/lib/face_control/inputs/rubocop_json.rb +18 -1
- data/lib/face_control/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b7fb7f8377a562ed6d7f93630be8335c055a040
|
4
|
+
data.tar.gz: fdcb1fec8c9135b40c963116586ed9cb87010df9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52d0f63b1470830f11c5ca3833e0a3ced5bc28e3373de2a0527ab6cecd7f0366c4b51a7a69f410d84818dc1c4f453b51651a8fcfb866b365e5ca50dbd4553a6f
|
7
|
+
data.tar.gz: 84cb319bb7b8ab7fc6d87316528f7c77dba40163839261539463d1dacb1c110d24426118d1e900876f684020614fe4b65cceed1d2aa077eb085e38e3362b89c7
|
data/README.md
CHANGED
@@ -19,3 +19,7 @@ Inspired by [Hound](https://houndci.com).
|
|
19
19
|
`face-control` uses the same configuration file (`~/.stashconfig.yml`)
|
20
20
|
as the official [Atlassian Stash Command Line Tools](https://bitbucket.org/atlassian/stash-command-line-tools)
|
21
21
|
to connect to your Stash instance.
|
22
|
+
|
23
|
+
## Etymology
|
24
|
+
|
25
|
+
[Face control](http://en.wikipedia.org/wiki/Face_control) in Wikipedia
|
data/face_control.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'rubocop'
|
2
3
|
require 'face_control/comment'
|
3
4
|
|
4
5
|
module FaceControl
|
@@ -21,7 +22,7 @@ module FaceControl
|
|
21
22
|
Comment.new(
|
22
23
|
file: file['path'],
|
23
24
|
line: offense['location']['line'],
|
24
|
-
text: offense
|
25
|
+
text: text(offense)
|
25
26
|
)
|
26
27
|
end
|
27
28
|
end.flatten
|
@@ -32,6 +33,22 @@ module FaceControl
|
|
32
33
|
def report
|
33
34
|
JSON.parse(File.read(filename))
|
34
35
|
end
|
36
|
+
|
37
|
+
def text(offense)
|
38
|
+
text = offense['message']
|
39
|
+
|
40
|
+
if (link = style_guide_url(offense))
|
41
|
+
text << " — [Guide](#{link})"
|
42
|
+
end
|
43
|
+
|
44
|
+
text
|
45
|
+
end
|
46
|
+
|
47
|
+
def style_guide_url(offense)
|
48
|
+
cop_name = offense['cop_name']
|
49
|
+
cop_config = RuboCop::ConfigLoader.default_configuration[cop_name]
|
50
|
+
cop_config['StyleGuide']
|
51
|
+
end
|
35
52
|
end
|
36
53
|
end
|
37
54
|
end
|
data/lib/face_control/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: face_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vassilevsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: httparty
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|