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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 325aba4c4fdce156c0dae24d9c5cf10b2993b4b70e0fcf184d3645cea22f5563
4
- data.tar.gz: 700af54ea35e67f76d9245acb0fc5e63dfaa766295b357d27d71cf5e0a7de3a2
2
+ SHA1:
3
+ metadata.gz: c1715692f36c358683ee2c9cd0d87f58725036f2
4
+ data.tar.gz: b41cc0e5f1be6758ffb5739316b4993c62cdfe38
5
5
  SHA512:
6
- metadata.gz: d5df85b4788e83c52f3cb051fee19d5137794b3ae9096e2bcc626b0585783515bb1479d52bf9c1cc2fab1d0cd829cbbc69120ccdf48f95e9e686144e4a047163
7
- data.tar.gz: 308cb4a0b3d91dc19b1da72b537ed7dbd17f327554bbbc091e7ef16cd895f4828391490843ae3e63c554e0c73d4ce7935bb86131120d176b094f2390a70c9f0f
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
- ```bash
20
- gem install face_control
21
- ```
19
+ gem install face_control
22
20
 
23
- You also need to have CoffeeLint installed and available in `PATH`.
21
+ You also need to have CoffeeLint installed and available in PATH.
24
22
 
25
23
  ## Usage
26
24
 
27
- ```bash
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
- If you don't want to receive RuboCop comments with certain severity level,
34
- pass the severity in the `--skip-severity` option like so:
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
- Instead of `--skip-severity` you can use just `-S`.
41
-
42
- You can also pass multiple severity levels as a comma-separated list:
30
+ * Source Code Management
31
+ * Git
32
+ * Repositories
33
+ * Refspec:
43
34
 
44
- ```bash
45
- face-control -S convention,refactor <project> <repository> <pull_request_id>
46
- ```
35
+ +refs/pull-requests/*:refs/remotes/origin/pull-requests/*
47
36
 
48
- `face-control` uses the same configuration file (`~/.stashconfig.yml`)
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
- ## Example
39
+ * Branches to build
40
+ * Branch Specifier:
53
41
 
54
- Here's a [Jenkins][] project setup as an example:
42
+ origin/pull-requests/*/merge
55
43
 
56
- _Source Code Management Git Repositories → Refspec:_
44
+ (merge results of open non-conflicting pull requests)
57
45
 
58
- ```
59
- +refs/pull-requests/*:refs/remotes/origin/pull-requests/*
60
- ```
46
+ * Build
47
+ * Execute shell
48
+ * Command
61
49
 
62
- It makes Jenkins fetch otherwise ignored Stash-created branches.
50
+ export PULL_REQUEST_ID=`echo $GIT_BRANCH | cut -d / -f 3`
63
51
 
64
- _Source Code Management → Git → Branches to build → Branch Specifier:_
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
- Merge results of open non-conflicting pull requests.
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
- _Build Execute shell Command:_
60
+ face-control --skip-severity convention <project> <repository> <pull_request_id>
73
61
 
74
- ```bash
75
- export PULL_REQUEST_ID=`echo $GIT_BRANCH | cut -d / -f 3`
62
+ You can use just `-S`.
63
+ You can also pass multiple severity levels as a comma-separated list:
76
64
 
77
- gem install rubocop face_control
78
- npm install -g coffeelint
65
+ face-control -S convention,refactor <project> <repository> <pull_request_id>
79
66
 
80
- face-control <project> <repository> $PULL_REQUEST_ID
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
@@ -1,3 +1,4 @@
1
+ require 'bundler/gem_tasks'
1
2
  require 'rake/testtask'
2
3
 
3
4
  Rake::TestTask.new(:test) do |t|
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'face_control'
3
- spec.version = '0.8.6'
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, cop_name, config.for_cop(cop_name), {}).urls.first
61
+ ::RuboCop::Cop::MessageAnnotator.new(config, config.for_cop(cop_name), {}).urls.first
62
62
  end
63
63
  end
64
64
  end
@@ -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
- with_error_handling do
25
- logged('Response') do
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
- with_error_handling do
33
- logged('Response') do
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.8.6
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: 2020-09-10 00:00:00.000000000 Z
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
- rubygems_version: 3.0.3
179
- signing_key:
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: []