pronto-goodcheck 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pronto/goodcheck.rb +22 -4
- data/lib/pronto/goodcheck/version.rb +1 -1
- data/pronto-goodcheck.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 883d98d9920e48fcb54226b917c0bdb348ec14716084f59f49cfbfba8ea1a336
|
4
|
+
data.tar.gz: ff2ef585fed8c532d2e6122caa852b1b626859255f51e9ddaaa1f7e8364e5b74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99d6e25b71bcbf628f5a15387f60a62ee30f8fbfd6546e11bdcb997df5c4063738d2a76aea4eed653d54222be4f1aaf5498638e858fbdc3e03fa5c324a196152
|
7
|
+
data.tar.gz: a31a8627a5bd4ea5e75a81dc0bf0dda85e5a5fbfc455a6510feb823ef887fd939658d3253333a7551f04752c841469ccd7ee4392313c6f276fde2620a1169d12
|
data/lib/pronto/goodcheck.rb
CHANGED
@@ -7,16 +7,22 @@ require "json"
|
|
7
7
|
module Pronto
|
8
8
|
class GoodcheckRunner < Runner
|
9
9
|
def run
|
10
|
-
files = patches_with_changes
|
10
|
+
files = patches_with_changes
|
11
|
+
.map { |patch| project_relative_path(patch) }
|
11
12
|
stdout = StringIO.new
|
12
13
|
stderr = StringIO.new
|
13
|
-
reporter = ::Goodcheck::Reporters::JSON.new(
|
14
|
+
reporter = ::Goodcheck::Reporters::JSON.new(
|
15
|
+
stdout: stdout,
|
16
|
+
stderr: stderr,
|
17
|
+
)
|
14
18
|
runner = ::Goodcheck::Commands::Check.new(
|
15
19
|
config_path: Pathname("goodcheck.yml"),
|
16
20
|
rules: [],
|
17
21
|
targets: files,
|
18
22
|
reporter: reporter,
|
19
|
-
stderr: stderr
|
23
|
+
stderr: stderr,
|
24
|
+
home_path: goodcheck_home_path,
|
25
|
+
force_download: false,
|
20
26
|
)
|
21
27
|
runner.run
|
22
28
|
analysis = JSON.load(stdout.string)
|
@@ -44,7 +50,7 @@ module Pronto
|
|
44
50
|
|
45
51
|
def patch_for_issue(issue)
|
46
52
|
patches_with_changes.find do |patch|
|
47
|
-
patch.
|
53
|
+
patch.delta.new_file[:path].to_s == issue["path"]
|
48
54
|
end
|
49
55
|
end
|
50
56
|
|
@@ -61,5 +67,17 @@ module Pronto
|
|
61
67
|
|
62
68
|
Message.new(path, line, :info, message, nil, self.class)
|
63
69
|
end
|
70
|
+
|
71
|
+
def goodcheck_home_path
|
72
|
+
if (path = ENV["GOODCHECK_HOME"])
|
73
|
+
Pathname(path)
|
74
|
+
else
|
75
|
+
Pathname(Dir.home) + ".goodcheck"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def project_relative_path(patch)
|
80
|
+
Pathname(patch.delta.new_file[:path])
|
81
|
+
end
|
64
82
|
end
|
65
83
|
end
|
data/pronto-goodcheck.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
|
-
spec.add_dependency "goodcheck", ">= 1.
|
23
|
+
spec.add_dependency "goodcheck", ">= 1.5.0"
|
24
24
|
spec.add_dependency "pronto", ">= 0.9.5"
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.15"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-goodcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Fung
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: goodcheck
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pronto
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|