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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8705ead47b838010c6b383a5b61e64c8874c9f00
4
- data.tar.gz: 62b359de31721437f1aca2f9223cbd96aecafa7a
3
+ metadata.gz: cf5a0ee507e4560e5d9f6c132e9bf5f4f9281e26
4
+ data.tar.gz: ac2be576f75ae45b8fd6016dd287123feb0ae9ff
5
5
  SHA512:
6
- metadata.gz: 64527cc50b7953f1e352cd14117ebd5fc09db320402346073353ba9492aaf36b6e83ccc0b800264c60d190e5a813c39465de4a863c1732df2d6e690d7105ae15
7
- data.tar.gz: 596f576534d23d8ca60055827ca3a2fd0b2135e07e0e4a068bc92b228f24591878ce47fd575ee90d3c7da17a73f7a95307cb9a6414cb45b670562105fa740554
6
+ metadata.gz: fc444e3547da094f06a8ae909f7e17f0f5098ba095f64ecf82a9c9de4c060d260feabb23d0e5d51fb4b68c9e7e6b0efbfbc5bbc8b939671f76bd00693e9f1ff1
7
+ data.tar.gz: ca5f03d8964ca13aa3d7fcb208ee2caf718f71da1b7a4c593de2f5fa5b82fc279f1e8ad82c41b1e91d0cb46192c607bfb1da3bc1ff1d33cdbe365cb2dcda4b86
@@ -89,22 +89,16 @@ module CC
89
89
  "--memory-swap", "-1",
90
90
  "--net", "none",
91
91
  "--volume", "#{@code_path}:/code:ro",
92
- "--env-file", env_file,
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 env_file
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, contents)
101
+ File.write(path, @config_json)
108
102
  path
109
103
  end
110
104
 
@@ -70,14 +70,19 @@ module CC
70
70
 
71
71
  def engines
72
72
  @engines ||= config.engine_names.map do |engine_name|
73
- Engine.new(
74
- engine_name,
75
- registry_entry(engine_name),
76
- path,
77
- engine_config(engine_name),
78
- SecureRandom.uuid
79
- )
80
- end
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.16
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-02 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport