class Terradactyl::Terraform::Commands::Upgrade
Public Instance Methods
execute()
click to toggle source
Calls superclass method
# File lib/terradactyl/commands.rb, line 23 def execute VersionManager.install return 0 unless revision.upgradeable? super end
next_version()
click to toggle source
# File lib/terradactyl/commands.rb, line 30 def next_version @next_version ||= compute_upgrade end
Private Instance Methods
compute_upgrade()
click to toggle source
# File lib/terradactyl/commands.rb, line 40 def compute_upgrade maj, min, _rev = version.split('.') resolution = VersionManager.resolve("~> #{maj}.#{min.to_i + 1}.0") VersionManager.version = resolution VersionManager.version end
revision()
click to toggle source
# File lib/terradactyl/commands.rb, line 36 def revision Terradactyl::Stack.revision end
subcmd()
click to toggle source
# File lib/terradactyl/commands.rb, line 47 def subcmd pre = version.slice(/\d+\.\d+/) sig = self.class.name.split('::').last.downcase sig == 'base' ? '' : "#{pre}#{sig}" end