<commit_before>require 'brewkit'

class Ec2ApiTools <Formula
  @homepage='http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351'
  @url='http://ec2-downloads.s3.amazonaws.com/ec2-api-tools-1.3-41620.zip'
  @md5='14734acff6ac8f6899de0398d3eeb0f6'
  
  def install
    # Nothing to be done but copying things into place
    FileUtils.rm Dir['bin/*\.cmd']
    
    (prefix+bin).install Dir['bin/ec2-*']
    prefix.install 'lib'
  end
  
  def caveats
    puts <<-EOS
==============================================================================
Before you can utilize the EC2 API tools, you must export several environment
variables to your $SHELL. The easiest way to do this is to add them to your
dotfiles. If you’re running the `bash` shell (the default), you’ll want to add
them to `~/.bash_profile`. If this is the case, run `nano ~/.bash_profile` at
a terminal to edit said file. zsh users will want to edit `~/.zprofile`
instead.

    export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home/"
    export EC2_HOME="#{prefix.to_s}/"

However, you’re still not ready to use the tools. You need to download your
X.509 certificate and private key from Amazon Web Services. These files are
available at the following URL:

http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key

You should download two `.pem` files, one starting with `pk-`, and one
starting with `cert-`. You need to put both into a folder in your home
directory, `~/.ec2`, and then add the following to your profile file:

    export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)"
    export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)"

==============================================================================
    EOS
  end
  
end<commit_msg>`#caveats` expects me to return a string, I don’t have to `#puts` it myself.<commit_after>require 'brewkit'

class Ec2ApiTools <Formula
  @homepage='http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351'
  @url='http://ec2-downloads.s3.amazonaws.com/ec2-api-tools-1.3-41620.zip'
  @md5='14734acff6ac8f6899de0398d3eeb0f6'
  
  def install
    # Nothing to be done but copying things into place
    FileUtils.rm Dir['bin/*\.cmd']
    
    (prefix+bin).install Dir['bin/ec2-*']
    prefix.install 'lib'
  end
  
  def caveats
    return <<-EOS
Before you can utilize the EC2 API tools, you must export several environment
variables to your $SHELL. The easiest way to do this is to add them to your
dotfiles. If you’re running the `bash` shell (the default), you’ll want to add
them to `~/.bash_profile`. If this is the case, run `nano ~/.bash_profile` at
a terminal to edit said file. zsh users will want to edit `~/.zprofile`
instead.

    export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home/"
    export EC2_HOME="#{prefix.to_s}/"

However, you’re still not ready to use the tools. You need to download your
X.509 certificate and private key from Amazon Web Services. These files are
available at the following URL:

http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key

You should download two `.pem` files, one starting with `pk-`, and one
starting with `cert-`. You need to put both into a folder in your home
directory, `~/.ec2`, and then add the following to your profile file:

    export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)"
    export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)"

    EOS
  end
  
end
{'fraction_non_alphanumeric': 0.15640358485111303, 'fraction_numerical': 0.025440878866724487, 'mean_word_length': 3.9784172661870505, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3185027', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1100, 'n_words': 372}