Sha256: 878abe920442d3b14ba8977d1bf4747a5046ca2f906980029bd4266139282c2b

Contents?: true

Size: 613 Bytes

Versions: 34

Compression:

Stored size: 613 Bytes

Contents

require "td/updater"

module TreasureData
module Command

  def update(op)
    # for gem installation, this command is disallowed -
    #   it only works for the toolbelt.
    if Updater.disable?
      $stderr.puts Updater.disable_message
      exit
    end

    start_time = Time.now
    $stdout.puts "Updating 'td' from #{TOOLBELT_VERSION}..."
    if new_version = Updater.update
      $stdout.puts "Successfully updated to #{new_version} in #{Command.humanize_time((Time.now - start_time).to_i)}."
    else
      $stdout.puts "Nothing to update."
    end
  end

end # module Command
end # module TreasureData

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
td-0.15.0 lib/td/command/update.rb
td-0.14.1 lib/td/command/update.rb
td-0.14.0 lib/td/command/update.rb
td-0.13.2 lib/td/command/update.rb
td-0.13.1 lib/td/command/update.rb
td-0.13.0 lib/td/command/update.rb
td-0.12.0 lib/td/command/update.rb
td-0.11.14 lib/td/command/update.rb
td-0.11.13 lib/td/command/update.rb
td-0.11.12 lib/td/command/update.rb
td-0.11.11.2 lib/td/command/update.rb
td-0.11.11.1 lib/td/command/update.rb
td-0.11.11 lib/td/command/update.rb
td-0.11.10 lib/td/command/update.rb