codeclimate 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cc/analyzer/engine.rb +3 -9
- data/lib/cc/cli/analyze.rb +13 -8
- 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: cf5a0ee507e4560e5d9f6c132e9bf5f4f9281e26
|
4
|
+
data.tar.gz: ac2be576f75ae45b8fd6016dd287123feb0ae9ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc444e3547da094f06a8ae909f7e17f0f5098ba095f64ecf82a9c9de4c060d260feabb23d0e5d51fb4b68c9e7e6b0efbfbc5bbc8b939671f76bd00693e9f1ff1
|
7
|
+
data.tar.gz: ca5f03d8964ca13aa3d7fcb208ee2caf718f71da1b7a4c593de2f5fa5b82fc279f1e8ad82c41b1e91d0cb46192c607bfb1da3bc1ff1d33cdbe365cb2dcda4b86
|
data/lib/cc/analyzer/engine.rb
CHANGED
@@ -89,22 +89,16 @@ module CC
|
|
89
89
|
"--memory-swap", "-1",
|
90
90
|
"--net", "none",
|
91
91
|
"--volume", "#{@code_path}:/code:ro",
|
92
|
-
"--
|
92
|
+
"--volume", "#{config_file}:/config.json:ro",
|
93
93
|
"--user", "9000:9000",
|
94
94
|
@metadata["image"],
|
95
95
|
@metadata["command"], # String or Array
|
96
96
|
].flatten.compact
|
97
97
|
end
|
98
98
|
|
99
|
-
def
|
100
|
-
contents = "ENGINE_CONFIG=#{@config_json}"
|
101
|
-
|
102
|
-
if contents.size > 64 * 1024
|
103
|
-
raise EngineFailure, "Config for engine #{name} exceeds 64k character limit"
|
104
|
-
end
|
105
|
-
|
99
|
+
def config_file
|
106
100
|
path = File.join("/tmp/cc", SecureRandom.uuid)
|
107
|
-
File.write(path,
|
101
|
+
File.write(path, @config_json)
|
108
102
|
path
|
109
103
|
end
|
110
104
|
|
data/lib/cc/cli/analyze.rb
CHANGED
@@ -70,14 +70,19 @@ module CC
|
|
70
70
|
|
71
71
|
def engines
|
72
72
|
@engines ||= config.engine_names.map do |engine_name|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
73
|
+
entry = registry_entry(engine_name)
|
74
|
+
if entry.nil?
|
75
|
+
fatal("unknown engine name: #{engine_name}")
|
76
|
+
else
|
77
|
+
Engine.new(
|
78
|
+
engine_name,
|
79
|
+
entry,
|
80
|
+
path,
|
81
|
+
engine_config(engine_name),
|
82
|
+
SecureRandom.uuid
|
83
|
+
)
|
84
|
+
end
|
85
|
+
end.compact
|
81
86
|
end
|
82
87
|
|
83
88
|
def formatter
|
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.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code Climate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|