Class: Minfra::Cli::Project::Tag
- Defined in:
- lib/minfra/cli/commands/project/tag.rb
Instance Method Summary collapse
Methods included from Logging
#debug, #deprecated, #error, #exit_error, #info, #warn
Methods included from Common
Instance Method Details
#update(domain, new_tag) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/minfra/cli/commands/project/tag.rb', line 9 def update(domain, new_tag) = JSON.parse(File.read()) raise ArgumentError, "#{path} doesn't contain #{domain}" unless [[:environment]].key?(domain) [[:environment]][domain] = new_tag = JSON.pretty_unparse() File.write(, "#{}\n") puts "#{} - UPDATED" puts end |