<commit_before>require "heroku/command/base"
require "heroku/updater"

# update the heroku client
#
class Heroku::Command::Update < Heroku::Command::Base

  # update
  #
  # update the heroku client
  #
  # Example:
  #
  # $ heroku update
  # Updating from v1.2.3... done, updated to v2.3.4
  #
  def index
    validate_arguments!
    update_from_url("https://toolbelt.herokuapp.com/download/zip")
  end

  # update:beta
  #
  # update to the latest beta client
  #
  # $ heroku update
  # Updating from v1.2.3... done, updated to v2.3.4.pre
  #
  def beta
    validate_arguments!
    update_from_url("https://toolbelt.herokuapp.com/download/beta-zip")
  end

private

  def update_from_url(url)
    Heroku::Updater.check_disabled!
    action("Updating from #{Heroku::VERSION}") do
      new_version = Heroku::Updater.update(url)
      status "updated to #{new_version}"
    end
  end

end<commit_msg>clearer messaging around update when new version and old version match closes #442<commit_after>require "heroku/command/base"
require "heroku/updater"

# update the heroku client
#
class Heroku::Command::Update < Heroku::Command::Base

  # update
  #
  # update the heroku client
  #
  # Example:
  #
  # $ heroku update
  # Updating from v1.2.3... done, updated to v2.3.4
  #
  def index
    validate_arguments!
    update_from_url("https://toolbelt.herokuapp.com/download/zip")
  end

  # update:beta
  #
  # update to the latest beta client
  #
  # $ heroku update
  # Updating from v1.2.3... done, updated to v2.3.4.pre
  #
  def beta
    validate_arguments!
    update_from_url("https://toolbelt.herokuapp.com/download/beta-zip")
  end

private

  def update_from_url(url)
    Heroku::Updater.check_disabled!
    action("Updating from #{Heroku::VERSION}") do
      new_version = Heroku::Updater.update(url)
      if new_version == Heroku::VERSION
        status("nothing to update")
      else
        status("updated to #{new_version}")
      end
    end
  end

end
{'fraction_non_alphanumeric': 0.11606690319310695, 'fraction_numerical': 0.013684744044602128, 'mean_word_length': 3.1557894736842105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4011888', 'n_tokens_mistral': 687, 'n_tokens_neox': 680, 'n_words': 156}