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.17.1 lib/td/command/update.rb
td-0.17.0 lib/td/command/update.rb
td-0.16.10 lib/td/command/update.rb
td-0.16.9 lib/td/command/update.rb
td-0.16.8 lib/td/command/update.rb
td-0.16.7 lib/td/command/update.rb
td-0.16.6 lib/td/command/update.rb
td-0.16.5 lib/td/command/update.rb
td-0.16.4 lib/td/command/update.rb
td-0.16.3 lib/td/command/update.rb
td-0.16.1 lib/td/command/update.rb
td-0.16.0 lib/td/command/update.rb
td-0.15.9 lib/td/command/update.rb
td-0.15.8 lib/td/command/update.rb
td-0.15.7 lib/td/command/update.rb
td-0.15.6 lib/td/command/update.rb
td-0.15.5 lib/td/command/update.rb
td-0.15.4 lib/td/command/update.rb
td-0.15.3 lib/td/command/update.rb
td-0.15.2 lib/td/command/update.rb