Skip to content

Commit 5e2fa78

Browse files
committed
Merge pull request #4 from codeclimate/gd-config
Parse JSON config from file instead of environment
2 parents aaca365 + 84176ae commit 5e2fa78

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/bundler-audit

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), "../lib"))
44

55
require 'cc/engine/bundler_audit'
66

7-
def parse_engine_config(raw)
8-
raw ? JSON.parse(raw) : {}
7+
if File.exists?("/config.json")
8+
engine_config = JSON.parse(File.read("/config.json"))
9+
else
10+
engine_config = {}
911
end
10-
engine_config = parse_engine_config(ENV['ENGINE_CONFIG'])
12+
1113
CC::Engine::BundlerAudit.new(
1214
directory: "/code", engine_config: engine_config, io: STDOUT
1315
).run

0 commit comments

Comments
 (0)