codeclimate 0.24.1 → 0.24.2

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
2
  SHA1:
3
- metadata.gz: 4dd9b749a17cadd5f158371ee941df9700a370db
4
- data.tar.gz: 81e0fb553f138e47cd745d7a53a133bd99c88774
3
+ metadata.gz: 31b0fd30796eb06700a333c52372256b44e37ff4
4
+ data.tar.gz: bd44ce0004e2dd5414c93e0ab59a4f12d8182647
5
5
  SHA512:
6
- metadata.gz: bc45bc66d3ea3a361566abbd93c6761f229dad4eef8f0be50a651ee0f214386c2a380abdd2812821c97285e9787d7ea3766acce6828911c38f1b929c1f940378
7
- data.tar.gz: e1953de4315f77d1f697ac82d2b4afbb66ee2fcfc0bda7a783c0e94774d9fbc11cacce6a595fb2913bf77bc93e0bc67a55c7ecbe29ae062a90470d4465c82485
6
+ metadata.gz: 414fca4cbb75a7717c1da63c7ecb0755edd614cb6b103de745857d3b098956da1dbfd7a51f1f36a0034d8e07a588cd446073d64989546c8f061444de9f22823e
7
+ data.tar.gz: 01fe8c92ce248edc7d8c93dda78fcd0613b415fa70e0e52d8d4e8a56213727c33a8ca6c91a95d1432f54e86dd00bf4907e406d371c7d2794226f822a94d25f94
@@ -34,7 +34,7 @@ module CC
34
34
  )
35
35
 
36
36
  container.on_output("\0") do |raw_output|
37
- CLI.debug "engine output: #{raw_output.inspect}"
37
+ CLI.debug("#{name} engine output: #{raw_output.strip}")
38
38
  output = EngineOutput.new(raw_output)
39
39
 
40
40
  unless output_filter.filter?(output)
@@ -43,8 +43,10 @@ module CC
43
43
  end
44
44
 
45
45
  write_config_file
46
- CLI.debug "engine config: #{config_file.read.inspect}"
47
- container.run(container_options)
46
+ CLI.debug("#{name} engine config: #{config_file.read}")
47
+ container.run(container_options).tap do |result|
48
+ CLI.debug("#{name} engine stderr: #{result.stderr}")
49
+ end
48
50
  ensure
49
51
  delete_config_file
50
52
  end
@@ -7,7 +7,7 @@ module CC
7
7
  end
8
8
 
9
9
  def start
10
- return unless $stdout.tty?
10
+ return unless $stdout.tty? && !CLI.debug?
11
11
  @thread = Thread.new do
12
12
  loop do
13
13
  @spinning = true
data/lib/cc/cli.rb CHANGED
@@ -18,8 +18,12 @@ module CC
18
18
  autoload :ValidateConfig, "cc/cli/validate_config"
19
19
  autoload :Version, "cc/cli/version"
20
20
 
21
+ def self.debug?
22
+ ENV["CODECLIMATE_DEBUG"]
23
+ end
24
+
21
25
  def self.debug(message, values = {})
22
- if ENV["CODECLIMATE_DEBUG"]
26
+ if debug?
23
27
  if values.any?
24
28
  message << " "
25
29
  message << values.map { |k, v| "#{k}=#{v.inspect}" }.join(" ")
data/lib/cc/cli/init.rb CHANGED
@@ -64,9 +64,8 @@ module CC
64
64
  end
65
65
 
66
66
  def available_engine_configs
67
- engine_names = existing_cc_config.engines.select do |_, config|
68
- config.enabled?
69
- end.keys
67
+ engines = existing_cc_config.engines || {}
68
+ engine_names = engines.select { |_, config| config.enabled? }.keys
70
69
 
71
70
  all_paths = engine_names.flat_map do |engine_name|
72
71
  engine_directory = File.expand_path("../../../../config/#{engine_name}", __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.24.1
4
+ version: 0.24.2
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-04-01 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport