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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d22f3f348dc789674ada7a4873bcde294a7b278
4
- data.tar.gz: 65f5b34f666a35b6fcf9e69968e7597c3ae0318a
3
+ metadata.gz: 89202f61cd85559f4e0531916fa59183a2ea9a01
4
+ data.tar.gz: 1d7073a763b74d1813b28d2b892f43c2e3ffeced
5
5
  SHA512:
6
- metadata.gz: 6fbe2daeb6327989f76ef44b242633107fcad116433fdf21f58cdc0d338e8a77c5b4c4adbe8736cc53b0965d813f56edf11e5bc5391eec48e6d8e2a472bade75
7
- data.tar.gz: 517de74c052b220eab45ebd736623da94d5523b223deebb0a8108c8320df0543960c74c75529f816f2ee9ce05c4cd5dd18588ee7850a3141f5e4f85a49a5f3e1
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 exists?(engine_name)
24
+ def key?(engine_name)
25
25
  return true if dev_mode?
26
- list.keys.include?(engine_name)
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 registry_lookup(engine_name)
80
- if (metadata = @registry[engine_name])
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate