aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXu Cheng2015-03-03 18:18:45 +0800
committerXu Cheng2015-03-03 21:18:01 +0800
commiteda87c82b3750e99db7b07aac28fa5fa24d7fe6a (patch)
tree33d72c7605251d4f1d9085c8471317be9485d717 /Library/Formula
parentc2f6f1df541f8ddf230d8cbbd725b9b5b0516553 (diff)
downloadhomebrew-eda87c82b3750e99db7b07aac28fa5fa24d7fe6a.tar.bz2
auto-scaling: drop AmazonWebServicesFormula
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/auto-scaling.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/Library/Formula/auto-scaling.rb b/Library/Formula/auto-scaling.rb
index 7464d67aa..93673ce43 100644
--- a/Library/Formula/auto-scaling.rb
+++ b/Library/Formula/auto-scaling.rb
@@ -1,25 +1,29 @@
-class AutoScaling < AmazonWebServicesFormula
+class AutoScaling < Formula
homepage "https://aws.amazon.com/developertools/2535"
url "https://ec2-downloads.s3.amazonaws.com/AutoScaling-2011-01-01.zip"
version "1.0.61.6"
sha1 "2e3aaaa2567f4dcafcedbfc05678270ab02ed341"
- def caveats
- <<-EOS.undent
- Before you can use these tools you must populate a file and export some variables to your $SHELL.
-
- You must create a credential file containing:
-
- AWSAccessKeyId=<Your AWS Access ID>
- AWSSecetKey=<Your AWS Secret Key>
+ depends_on :java
- Then to export the needed variables, add them to your dotfiles.
- * On Bash, add them to `~/.bash_profile`.
- * On Zsh, add them to `~/.zprofile` instead.
+ def install
+ env = Language::Java.java_home_env.merge(:AWS_AUTO_SCALING_HOME => libexec)
+ rm Dir["bin/*.cmd"] # Remove Windows versions
+ libexec.install Dir["*"]
+ Pathname.glob("#{libexec}/bin/*") do |file|
+ next if file.directory?
+ basename = file.basename
+ next if basename.to_s == "service"
+ (bin/basename).write_env_script file, env
+ end
+ end
- export JAVA_HOME="$(/usr/libexec/java_home)"
- export AWS_AUTO_SCALING_HOME="#{libexec}"
- export AWS_CREDENTIAL_FILE="<Path to credential file>"
+ def caveats
+ <<-EOS.undent
+ Before you can use these tools you must export some variables to your $SHELL.
+ export AWS_ACCESS_KEY="<Your AWS Access ID>"
+ export AWS_SECRET_KEY="<Your AWS Secret Key>"
+ export AWS_CREDENTIAL_FILE="<Path to the credentials file>"
See the website for more details:
https://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/UsingTheCommandLineTools.html
@@ -27,8 +31,6 @@ class AutoScaling < AmazonWebServicesFormula
end
test do
- ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
- ENV["AWS_AUTO_SCALING_HOME"] = libexec
assert_match version.to_s, shell_output("#{bin}/as-version")
end
end