<commit_before>require "heroku/command/base"

# check status of Heroku platform
#
class Heroku::Command::Status < Heroku::Command::Base



  # status
  #
  # display current status of Heroku platform
  #
  def index
    heroku_status_host = ENV['HEROKU_STATUS_HOST'] || "status.heroku.com"
    status = json_decode(heroku.get("https://#{heroku_status_host}/status.json"))

    display('')
    if status.values.all? {|value| value == 'green'}
      display("All Systems Go: No known issues at this time.")
    else
      status.each do |key, value|
        display("#{key}: #{value}")
      end
      response = heroku.xml(heroku.get("https://#{heroku_status_host}/feed"))
      entry = response.elements.to_a("//entry").first
      display('')
      display(entry.elements['title'].text)
      display(entry.elements['content'].text.gsub(/\n\n/, "\n  ").gsub(/<[^>]*>/, ''))
    end
    display('')

  end

end
<commit_msg>change status messaging to be more inline with new status site<commit_after>require "heroku/command/base"

# check status of Heroku platform
#
class Heroku::Command::Status < Heroku::Command::Base



  # status
  #
  # display current status of Heroku platform
  #
  def index
    heroku_status_host = ENV['HEROKU_STATUS_HOST'] || "status.heroku.com"
    status = json_decode(heroku.get("https://#{heroku_status_host}/status.json"))

    display('')
    if status.values.all? {|value| value == 'green'}
      display("No known issues at this time.")
    else
      status.each do |key, value|
        display("#{key}: #{value}")
      end
      response = heroku.xml(heroku.get("https://#{heroku_status_host}/feed"))
      entry = response.elements.to_a("//entry").first
      display('')
      display(entry.elements['title'].text)
      display(entry.elements['content'].text.gsub(/\n\n/, "\n  ").gsub(/<[^>]*>/, ''))
    end
    display('')

  end

end

{'fraction_non_alphanumeric': 0.17083555082490687, 'fraction_numerical': 0.0, 'mean_word_length': 3.311926605504587, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6691384', 'n_tokens_mistral': 616, 'n_tokens_neox': 606, 'n_words': 127}