Sha256: afa68f1663f704545b9906435e68d446e986c044f07d77a9ef30a442aa15dc02

Contents?: true

Size: 569 Bytes

Versions: 112

Compression:

Stored size: 569 Bytes

Contents

require 'json'

class UpdateConfig

    def do (role, solution, gitRoot)

        steps = {}

        # 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

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
canzea-0.1.105 lib/commands/update-config.rb
canzea-0.1.104 lib/commands/update-config.rb
canzea-0.1.103 lib/commands/update-config.rb
canzea-0.1.102 lib/commands/update-config.rb
canzea-0.1.101 lib/commands/update-config.rb
canzea-0.1.100 lib/commands/update-config.rb
canzea-0.1.98 lib/commands/update-config.rb
canzea-0.1.97 lib/commands/update-config.rb
canzea-0.1.96 lib/commands/update-config.rb
canzea-0.1.95 lib/commands/update-config.rb
canzea-0.1.94 lib/commands/update-config.rb
canzea-0.1.93 lib/commands/update-config.rb
canzea-0.1.91 lib/commands/update-config.rb
canzea-0.1.90 lib/commands/update-config.rb
canzea-0.1.89 lib/commands/update-config.rb
canzea-0.1.88 lib/commands/update-config.rb
canzea-0.1.87 lib/commands/update-config.rb
canzea-0.1.86 lib/commands/update-config.rb
canzea-0.1.85 lib/commands/update-config.rb
canzea-0.1.84 lib/commands/update-config.rb