codeclimate 0.2.6 → 0.2.7
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_registry.rb +4 -2
- data/lib/cc/analyzer/engines_runner.rb +4 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89202f61cd85559f4e0531916fa59183a2ea9a01
|
4
|
+
data.tar.gz: 1d7073a763b74d1813b28d2b892f43c2e3ffeced
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ec65cca81cf694dd51200dc44367bba0044afca7c48f90f5305b1ba8685f29da5b3c993f98350b36b64832321fd4521c017e8b09e75e8d11eb09c4c6d026251
|
7
|
+
data.tar.gz: 1833d8881ea7881a34bc9ed565af19fee320755b1b7a739610dcecb00f845ec404fb8229a84e7d40c373eccacc64c2fccde076e37533275bccc0a5879d1c3a82
|
@@ -21,11 +21,13 @@ module CC
|
|
21
21
|
@config
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
24
|
+
def key?(engine_name)
|
25
25
|
return true if dev_mode?
|
26
|
-
list.
|
26
|
+
list.key?(engine_name)
|
27
27
|
end
|
28
28
|
|
29
|
+
alias_method :exists?, :key?
|
30
|
+
|
29
31
|
private
|
30
32
|
|
31
33
|
def dev_mode?
|
@@ -46,10 +46,9 @@ module CC
|
|
46
46
|
|
47
47
|
def engines
|
48
48
|
@engines ||= enabled_engines.map do |name, config|
|
49
|
-
metadata = registry_lookup(name)
|
50
49
|
label = @container_label || SecureRandom.uuid
|
51
50
|
|
52
|
-
Engine.new(name, metadata, @source_dir, engine_config(config), label)
|
51
|
+
Engine.new(name, metadata(name), @source_dir, engine_config(config), label)
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
@@ -69,19 +68,15 @@ module CC
|
|
69
68
|
def enabled_engines
|
70
69
|
{}.tap do |ret|
|
71
70
|
@config.engines.each do |name, config|
|
72
|
-
if config.enabled?
|
71
|
+
if config.enabled? && @registry.key?(name)
|
73
72
|
ret[name] = config
|
74
73
|
end
|
75
74
|
end
|
76
75
|
end
|
77
76
|
end
|
78
77
|
|
79
|
-
def
|
80
|
-
|
81
|
-
metadata
|
82
|
-
else
|
83
|
-
raise InvalidEngineName, "unknown engine name: #{engine_name}"
|
84
|
-
end
|
78
|
+
def metadata(engine_name)
|
79
|
+
@registry[engine_name]
|
85
80
|
end
|
86
81
|
|
87
82
|
def exclude_paths
|