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.149 lib/commands/update-config.rb
canzea-0.1.148 lib/commands/update-config.rb
canzea-0.1.147 lib/commands/update-config.rb
canzea-0.1.144 lib/commands/update-config.rb
canzea-0.1.143 lib/commands/update-config.rb
canzea-0.1.142 lib/commands/update-config.rb
canzea-0.1.141 lib/commands/update-config.rb
canzea-0.1.140 lib/commands/update-config.rb
canzea-0.1.139 lib/commands/update-config.rb
canzea-0.1.138 lib/commands/update-config.rb
canzea-0.1.137 lib/commands/update-config.rb
canzea-0.1.136 lib/commands/update-config.rb
canzea-0.1.135 lib/commands/update-config.rb
canzea-0.1.134 lib/commands/update-config.rb
canzea-0.1.133 lib/commands/update-config.rb
canzea-0.1.132 lib/commands/update-config.rb
canzea-0.1.131 lib/commands/update-config.rb
canzea-0.1.130 lib/commands/update-config.rb
canzea-0.1.129 lib/commands/update-config.rb
canzea-0.1.126 lib/commands/update-config.rb