face_control 0.8.6 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +34 -48
- data/Rakefile +1 -0
- data/face_control.gemspec +2 -1
- data/lib/face_control/checkers/rubocop.rb +1 -1
- data/lib/stash/server.rb +4 -18
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c1715692f36c358683ee2c9cd0d87f58725036f2
|
4
|
+
data.tar.gz: b41cc0e5f1be6758ffb5739316b4993c62cdfe38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b525aa7fbbfb00efa31ed3ac73fca109b334794ae5dfc72ad56521d38d20e517fe651943cc9cba2107fa7ad5147b119d39d6547de309050381505c777286f71
|
7
|
+
data.tar.gz: b24793e5d9cd918eafd9de312353e78665dcf7b896ef0ec0b4fde0bd6618042946e2ead8af0ea450a944c3d5b689fdab701d70edf7d4d4b11313690275946b58
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
# Face Control
|
2
|
-
|
3
1
|
[![Gem Version](https://img.shields.io/gem/v/face_control.svg)](https://rubygems.org/gems/face_control)
|
4
2
|
[![Code Climate](https://img.shields.io/codeclimate/github/vassilevsky/face_control.svg)](https://codeclimate.com/github/vassilevsky/face_control/code)
|
5
3
|
[![Vexor](https://ci.vexor.io/projects/126da196-c8e6-46f0-8bc7-b5f8f4b49732/status.svg)](https://ci.vexor.io/ui/projects/126da196-c8e6-46f0-8bc7-b5f8f4b49732/builds)
|
6
4
|
[![Coveralls](https://img.shields.io/coveralls/vassilevsky/face_control.svg)](https://coveralls.io/github/vassilevsky/face_control)
|
7
5
|
[![VersionEye](https://img.shields.io/versioneye/d/ruby/face_control.svg)](https://www.versioneye.com/ruby/face_control)
|
8
6
|
|
7
|
+
# Face Control
|
8
|
+
|
9
9
|
Run static analysis of pull requests in [Bitbucket Server][] (formerly Stash)
|
10
10
|
and comment on problems in added lines.
|
11
11
|
|
@@ -16,75 +16,61 @@ Inspired by [Hound][].
|
|
16
16
|
|
17
17
|
## Installation
|
18
18
|
|
19
|
-
|
20
|
-
gem install face_control
|
21
|
-
```
|
19
|
+
gem install face_control
|
22
20
|
|
23
|
-
You also need to have CoffeeLint installed and available in
|
21
|
+
You also need to have CoffeeLint installed and available in PATH.
|
24
22
|
|
25
23
|
## Usage
|
26
24
|
|
27
|
-
|
28
|
-
face-control <project> <repository> <pull_request_id>
|
29
|
-
```
|
30
|
-
|
31
|
-
It's natural to run this on a continuous integration server (see “[Example](#example)” below).
|
25
|
+
face-control <project> <repository> <pull_request_id>
|
32
26
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
```bash
|
37
|
-
face-control --skip-severity convention <project> <repository> <pull_request_id>
|
38
|
-
```
|
27
|
+
It's natural to run this on a continuous integration server.
|
28
|
+
For example, here's a [Jenkins][] project setup:
|
39
29
|
|
40
|
-
|
41
|
-
|
42
|
-
|
30
|
+
* Source Code Management
|
31
|
+
* Git
|
32
|
+
* Repositories
|
33
|
+
* Refspec:
|
43
34
|
|
44
|
-
|
45
|
-
face-control -S convention,refactor <project> <repository> <pull_request_id>
|
46
|
-
```
|
35
|
+
+refs/pull-requests/*:refs/remotes/origin/pull-requests/*
|
47
36
|
|
48
|
-
|
49
|
-
as the official [Bitbucket Server Command Line Tools][]
|
50
|
-
to connect to your Stash instance.
|
37
|
+
(make Jenkins fetch otherwise ignored Stash-created branches)
|
51
38
|
|
52
|
-
|
39
|
+
* Branches to build
|
40
|
+
* Branch Specifier:
|
53
41
|
|
54
|
-
|
42
|
+
origin/pull-requests/*/merge
|
55
43
|
|
56
|
-
|
44
|
+
(merge results of open non-conflicting pull requests)
|
57
45
|
|
58
|
-
|
59
|
-
|
60
|
-
|
46
|
+
* Build
|
47
|
+
* Execute shell
|
48
|
+
* Command
|
61
49
|
|
62
|
-
|
50
|
+
export PULL_REQUEST_ID=`echo $GIT_BRANCH | cut -d / -f 3`
|
63
51
|
|
64
|
-
|
52
|
+
gem install rubocop face_control
|
53
|
+
npm install -g coffeelint
|
65
54
|
|
66
|
-
|
67
|
-
origin/pull-requests/*/merge
|
68
|
-
```
|
55
|
+
face-control <project> <repository> $PULL_REQUEST_ID
|
69
56
|
|
70
|
-
|
57
|
+
If you don't want to receive RuboCop comments with certain severity level,
|
58
|
+
pass the severity in the `--skip-severity` option like so:
|
71
59
|
|
72
|
-
|
60
|
+
face-control --skip-severity convention <project> <repository> <pull_request_id>
|
73
61
|
|
74
|
-
|
75
|
-
|
62
|
+
You can use just `-S`.
|
63
|
+
You can also pass multiple severity levels as a comma-separated list:
|
76
64
|
|
77
|
-
|
78
|
-
npm install -g coffeelint
|
65
|
+
face-control -S convention,refactor <project> <repository> <pull_request_id>
|
79
66
|
|
80
|
-
face-control
|
81
|
-
|
67
|
+
`face-control` uses the same configuration file (`~/.stashconfig.yml`)
|
68
|
+
as the official [Bitbucket Server Command Line Tools][]
|
69
|
+
to connect to your Stash instance.
|
82
70
|
|
83
71
|
## Etymology
|
84
72
|
|
85
|
-
[Face control][] in Wikipedia
|
86
|
-
|
87
|
-
[![Sponsored by FunBox](https://funbox.ru/badges/sponsored_by_funbox_centered.svg)](https://funbox.ru)
|
73
|
+
[Face control][] in Wikipedia
|
88
74
|
|
89
75
|
[Hound]: https://houndci.com
|
90
76
|
[Bitbucket Server]: https://www.atlassian.com/software/bitbucket/server
|
data/Rakefile
CHANGED
data/face_control.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'face_control'
|
3
|
-
spec.version = '0.
|
3
|
+
spec.version = '0.9.0'
|
4
4
|
spec.authors = ['Ilya Vassilevsky']
|
5
5
|
spec.email = ['vassilevsky@gmail.com']
|
6
6
|
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.add_runtime_dependency 'rubocop'
|
17
17
|
spec.add_runtime_dependency 'httparty'
|
18
18
|
|
19
|
+
spec.add_development_dependency 'bundler', '~> 1.8'
|
19
20
|
spec.add_development_dependency 'rake', '~> 10.0'
|
20
21
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
21
22
|
spec.add_development_dependency 'minitest-reporters', '~> 1.0'
|
@@ -58,7 +58,7 @@ module FaceControl
|
|
58
58
|
def style_guide_url(offense)
|
59
59
|
cop_name = offense['cop_name']
|
60
60
|
config = ::RuboCop::ConfigLoader.default_configuration
|
61
|
-
::RuboCop::Cop::MessageAnnotator.new(config,
|
61
|
+
::RuboCop::Cop::MessageAnnotator.new(config, config.for_cop(cop_name), {}).urls.first
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
data/lib/stash/server.rb
CHANGED
@@ -3,8 +3,6 @@ require 'stash/repository'
|
|
3
3
|
|
4
4
|
module Stash
|
5
5
|
class Server
|
6
|
-
class CommunicationError < StandardError; end
|
7
|
-
|
8
6
|
attr_accessor :root_uri, :user, :password, :logger
|
9
7
|
|
10
8
|
def initialize(root_uri, user, password, logger = nil)
|
@@ -21,18 +19,14 @@ module Stash
|
|
21
19
|
end
|
22
20
|
|
23
21
|
def get(path)
|
24
|
-
|
25
|
-
|
26
|
-
HTTParty.get(endpoint + path, auth.merge(logging))
|
27
|
-
end
|
22
|
+
logged('Response') do
|
23
|
+
HTTParty.get(endpoint + path, auth.merge(logging))
|
28
24
|
end
|
29
25
|
end
|
30
26
|
|
31
27
|
def post(path, data)
|
32
|
-
|
33
|
-
|
34
|
-
HTTParty.post(endpoint + path, auth.merge(content_type).merge(body: data.to_json).merge(logging))
|
35
|
-
end
|
28
|
+
logged('Response') do
|
29
|
+
HTTParty.post(endpoint + path, auth.merge(content_type).merge(body: data.to_json).merge(logging))
|
36
30
|
end
|
37
31
|
end
|
38
32
|
|
@@ -79,13 +73,5 @@ module Stash
|
|
79
73
|
{}
|
80
74
|
end
|
81
75
|
end
|
82
|
-
|
83
|
-
def with_error_handling
|
84
|
-
yield.tap do |response|
|
85
|
-
unless response.success?
|
86
|
-
fail CommunicationError, 'Stash responded with an error'
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
76
|
end
|
91
77
|
end
|
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.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vassilevsky
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.8'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,7 +136,7 @@ dependencies:
|
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0.8'
|
125
|
-
description:
|
139
|
+
description:
|
126
140
|
email:
|
127
141
|
- vassilevsky@gmail.com
|
128
142
|
executables:
|
@@ -160,7 +174,7 @@ files:
|
|
160
174
|
homepage: https://github.com/vassilevsky/face_control
|
161
175
|
licenses: []
|
162
176
|
metadata: {}
|
163
|
-
post_install_message:
|
177
|
+
post_install_message:
|
164
178
|
rdoc_options: []
|
165
179
|
require_paths:
|
166
180
|
- lib
|
@@ -175,8 +189,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
189
|
- !ruby/object:Gem::Version
|
176
190
|
version: '0'
|
177
191
|
requirements: []
|
178
|
-
|
179
|
-
|
192
|
+
rubyforge_project:
|
193
|
+
rubygems_version: 2.6.12
|
194
|
+
signing_key:
|
180
195
|
specification_version: 4
|
181
196
|
summary: Checks Atlassian Stash pull requests and comments on issues in added code
|
182
197
|
test_files: []
|