codeclimate 0.16.5 → 0.16.6
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 -4
- data/lib/cc/analyzer/formatters.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c535ed15891191cd0766b23d1d285773ebae2fa
|
4
|
+
data.tar.gz: a74f975545645d27a003f10fdfe42aac293e2e37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45eecc9bbfe2dc4970d20bed2c4194af30b8995593f77217535cc2a9796b1acc871e5b37f25534e5164854f789a6eb79247df0c7c73b2b47f69ff1973481e63d
|
7
|
+
data.tar.gz: 656b3613a9bc4cb937c2284e83cbcc58f53e75ed12a489c8e6b625add2b6d4fdd2ace153c691993abfc21eeebe154cb9d923f62163f27f2aa80c9523d63cf871
|
data/lib/cc/analyzer/engine.rb
CHANGED
@@ -41,7 +41,10 @@ module CC
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
write_config_file
|
44
45
|
container.run(container_options)
|
46
|
+
ensure
|
47
|
+
delete_config_file
|
45
48
|
end
|
46
49
|
|
47
50
|
private
|
@@ -63,11 +66,17 @@ module CC
|
|
63
66
|
@container_name ||= "cc-engines-#{name}-#{SecureRandom.uuid}"
|
64
67
|
end
|
65
68
|
|
69
|
+
def write_config_file
|
70
|
+
FileUtils.mkdir_p(File.dirname(config_file))
|
71
|
+
File.write(config_file, @config.to_json)
|
72
|
+
end
|
73
|
+
|
74
|
+
def delete_config_file
|
75
|
+
File.delete(config_file) if File.file?(config_file)
|
76
|
+
end
|
77
|
+
|
66
78
|
def config_file
|
67
|
-
|
68
|
-
FileUtils.mkdir_p("/tmp/cc")
|
69
|
-
File.write(path, @config.to_json)
|
70
|
-
path
|
79
|
+
@config_file ||= File.join("/tmp/cc", SecureRandom.uuid)
|
71
80
|
end
|
72
81
|
|
73
82
|
def output_filter
|
@@ -12,7 +12,7 @@ module CC
|
|
12
12
|
}.freeze
|
13
13
|
|
14
14
|
def self.resolve(name)
|
15
|
-
FORMATTERS[name.to_sym] or raise InvalidFormatterError, "'#{name}' is not a valid formatter. Valid options are: #{FORMATTERS.keys.join(', ')}"
|
15
|
+
FORMATTERS[name.to_sym] or raise Formatter::InvalidFormatterError, "'#{name}' is not a valid formatter. Valid options are: #{FORMATTERS.keys.join(', ')}"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
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.16.
|
4
|
+
version: 0.16.6
|
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-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|