codeclimate 0.2.2 → 0.2.4

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: 4eaa894c7daf510f8325a28f45b6ea94e3ac624f
4
- data.tar.gz: 970642c888d0ffba83902a3d2e5cb87d4fd5f2ae
3
+ metadata.gz: 3dbff022149c78ea083976a0acf56e1da6d5b1d8
4
+ data.tar.gz: 2d6297f56bf20b11b0159cb661f4123841a600e9
5
5
  SHA512:
6
- metadata.gz: e830fc4052ebd1d086c488ea7c3726f86d63dc3953b2d72ff1feabb42cc870cf9bbf66ce50bbead8623a902406b36918c651c089a70c5e3264e8f46d111536fe
7
- data.tar.gz: cc8146b5b5a74f82798be4c6b40a6f40075406e81b07855b444be19304b2b2257b4944fd143dc5750002d4edbbd08ef61298c1d5c3602b27651b8f7910e5eecf
6
+ metadata.gz: e3f1a4161715e07abde090de18b58b219d9a538440b5fc59482d225c8a221d6c4ac8204a1771407f7588d4e82cdc7d3a4cb13123369aabc39b1ee99a4db367d6
7
+ data.tar.gz: ecd82f39eaabca068d9793158b6d060d7a364e382bf851e41bd3b2d8f4a1b2b3ce2f0c8d26791aad65d6bce2e9b429118af75fd84ff6f1c45ce3efe0ea7b14b7
@@ -48,12 +48,24 @@ module CC
48
48
  @engines ||= enabled_engines.map do |name, config|
49
49
  metadata = registry_lookup(name)
50
50
  label = @container_label || SecureRandom.uuid
51
- engine_config = config.merge!(exclude_paths: exclude_paths)
52
51
 
53
- Engine.new(name, metadata, @source_dir, engine_config, label)
52
+ Engine.new(name, metadata, @source_dir, engine_config(config), label)
54
53
  end
55
54
  end
56
55
 
56
+ def engine_config(config)
57
+ config = config.merge(exclude_paths: exclude_paths)
58
+
59
+ # The yaml gem turns a config file string into a hash, but engines expect the string
60
+ # So we (for now) need to turn it into a string in that one scenario.
61
+ # TODO: update the engines to expect the hash and then remove this.
62
+ if config.fetch("config", {}).keys.size == 1 && config["config"].key?("file")
63
+ config["config"] = config["config"]["file"]
64
+ end
65
+
66
+ config
67
+ end
68
+
57
69
  def enabled_engines
58
70
  {}.tap do |ret|
59
71
  @config.engines.each do |name, config|
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.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code Climate