Class: Wabi::Generators::RegistryGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/wabi/generators/registry_generator.rb

Instance Method Summary collapse

Instance Method Details

#update_registryObject



13
14
15
16
17
18
19
20
# File 'lib/wabi/generators/registry_generator.rb', line 13

def update_registry
  path = File.join(destination_root, "config/wabi.lock.json")
  lockfile = Wabi::Lockfile.load(path)
  # Lockfile doesn't currently expose a registry setter; bypass via instance_var.
  lockfile.instance_variable_set(:@registry, url)
  lockfile.save
  say "  registry → #{url}", :green
end