codeclimate 0.31.1 → 0.32.0.rc1
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/lib/cc/analyzer/engine.rb +13 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a003acd150b7c909e5704a72f24861a4da55d0a
|
4
|
+
data.tar.gz: 0922cd0fab520dde57db0125adc83dcf5ae7645a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f53361ace438be54fddf036a0e73a3efce48bc39d986478421cc1e44b1cd1d0d47d822938eb6587cccf1b3dca541a726533891b074237f33d860f67a043cc19
|
7
|
+
data.tar.gz: 2698e1e791dde54f7c8633c9889aae7921e95941417da28d18a7eb1c50aafd043816ce623401a783773dd021d4d923fc2ae04ae0aee2a98482e0e229661a1374
|
data/lib/cc/analyzer/engine.rb
CHANGED
@@ -21,9 +21,9 @@ module CC
|
|
21
21
|
def run(stdout_io, container_listener)
|
22
22
|
composite_listener = CompositeContainerListener.new(
|
23
23
|
container_listener,
|
24
|
-
LoggingContainerListener.new(
|
25
|
-
StatsdContainerListener.new(
|
26
|
-
RaisingContainerListener.new(
|
24
|
+
LoggingContainerListener.new(qualified_name, Analyzer.logger),
|
25
|
+
StatsdContainerListener.new(qualified_name.tr(":", "."), Analyzer.statsd),
|
26
|
+
RaisingContainerListener.new(qualified_name, EngineFailure, EngineTimeout),
|
27
27
|
)
|
28
28
|
|
29
29
|
container = Container.new(
|
@@ -34,11 +34,11 @@ module CC
|
|
34
34
|
)
|
35
35
|
|
36
36
|
container.on_output("\0") do |raw_output|
|
37
|
-
CLI.debug("#{
|
37
|
+
CLI.debug("#{qualified_name} engine output: #{raw_output.strip}")
|
38
38
|
output = EngineOutput.new(raw_output)
|
39
39
|
|
40
40
|
unless output.valid?
|
41
|
-
stdout_io.failed("#{
|
41
|
+
stdout_io.failed("#{qualified_name} produced invalid output: #{output.error[:message]}")
|
42
42
|
container.stop
|
43
43
|
end
|
44
44
|
|
@@ -48,13 +48,13 @@ module CC
|
|
48
48
|
end
|
49
49
|
|
50
50
|
write_config_file
|
51
|
-
CLI.debug("#{
|
51
|
+
CLI.debug("#{qualified_name} engine config: #{config_file.read}")
|
52
52
|
container.run(container_options).tap do |result|
|
53
|
-
CLI.debug("#{
|
53
|
+
CLI.debug("#{qualified_name} engine stderr: #{result.stderr}")
|
54
54
|
end
|
55
55
|
rescue Container::ImageRequired
|
56
56
|
# Provide a clearer message given the context we have
|
57
|
-
message = "Unable to find an image for #{
|
57
|
+
message = "Unable to find an image for #{qualified_name}."
|
58
58
|
message << " Available channels: #{@metadata["channels"].keys.inspect}."
|
59
59
|
raise Container::ImageRequired, message
|
60
60
|
ensure
|
@@ -63,6 +63,10 @@ module CC
|
|
63
63
|
|
64
64
|
private
|
65
65
|
|
66
|
+
def qualified_name
|
67
|
+
"#{name}:#{@config.fetch("channel", "stable")}"
|
68
|
+
end
|
69
|
+
|
66
70
|
def container_options
|
67
71
|
[
|
68
72
|
"--cap-drop", "all",
|
@@ -78,7 +82,7 @@ module CC
|
|
78
82
|
end
|
79
83
|
|
80
84
|
def container_name
|
81
|
-
@container_name ||= "cc-engines-#{
|
85
|
+
@container_name ||= "cc-engines-#{qualified_name.tr(":", "-")}-#{SecureRandom.uuid}"
|
82
86
|
end
|
83
87
|
|
84
88
|
def write_config_file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codeclimate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.32.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -244,9 +244,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
version: '0'
|
245
245
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
246
246
|
requirements:
|
247
|
-
- - "
|
247
|
+
- - ">"
|
248
248
|
- !ruby/object:Gem::Version
|
249
|
-
version:
|
249
|
+
version: 1.3.1
|
250
250
|
requirements: []
|
251
251
|
rubyforge_project:
|
252
252
|
rubygems_version: 2.4.5
|