Sha256: d91b48682f3305c973ff3811b57b7ef95140e9ed11f33dc00d9034b889112d12
Contents?: true
Size: 669 Bytes
Versions: 29
Compression:
Stored size: 669 Bytes
Contents
require 'json' class UpdateConfig def do (role, solution, gitRoot) steps = {} if File.directory? "#{gitRoot}" # write to configure the registration of the service if (File.exists?("#{gitRoot}/configure.json")) steps = JSON.parse(File.read("#{gitRoot}/configure.json")) else steps["steps"] = [] end conf = { :role => role, :solution => solution } steps["steps"].push(conf) File.open("#{gitRoot}/configure.json", 'w') { |file| file.puts(JSON.generate(steps)) } end end end
Version data entries
29 entries across 29 versions & 2 rubygems