diff options
| author | Baptiste Fontaine | 2015-01-19 10:11:59 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-19 18:35:29 +0100 |
| commit | 259b115ae0928673a12f01960b4d299e0daa85da (patch) | |
| tree | 423c02cd180eaca2d23eccdcfdd8acbfdbcffd8e /Library/Formula/datomic.rb | |
| parent | fa20669ecabc7b0da9f6deee236ef7985024d13d (diff) | |
| download | homebrew-259b115ae0928673a12f01960b4d299e0daa85da.tar.bz2 | |
datomic 0.9.5130
Closes #36023.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/datomic.rb')
| -rw-r--r-- | Library/Formula/datomic.rb | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Library/Formula/datomic.rb b/Library/Formula/datomic.rb index 7ed93b563..978955df1 100644 --- a/Library/Formula/datomic.rb +++ b/Library/Formula/datomic.rb @@ -1,14 +1,13 @@ -require 'formula' - class Datomic < Formula - homepage 'http://www.datomic.com/' - url 'https://my.datomic.com/downloads/free/0.9.5067' - sha256 'babba5f85070ea656bd9580d89023ce5ca796458292d65211a186197a9ebab0a' - version '0.9.5067' + homepage "http://www.datomic.com/" + url "https://my.datomic.com/downloads/free/0.9.5130" + sha256 "3fd1d7a8a2c400f570899e6bb77af246ea7d7561f7692b84f299064b8b22b681" + version "0.9.5130" - def write_libexec_alias *script_names + def write_libexec_alias(*script_names) + base = "datomic" script_names.each do |script_name| - alias_name = script_name == 'datomic' ? 'datomic' : "datomic-#{script_name}" + alias_name = script_name == base ? base : "#{base}-#{script_name}" (bin + alias_name).write <<-EOS.undent #!/bin/bash cd #{libexec} && exec "bin/#{script_name}" "$@" @@ -17,19 +16,27 @@ class Datomic < Formula end def install - libexec.install Dir['*'] - write_libexec_alias 'datomic', 'transactor', 'repl', 'repl-jline', 'rest', 'shell' + libexec.install Dir["*"] + binaries = %w[datomic transactor repl repl-jline rest shell] + write_libexec_alias(*binaries) end def caveats <<-EOS.undent You may need to set JAVA_HOME: export JAVA_HOME="$(/usr/libexec/java_home)" - All commands have been installed with the prefix 'datomic-'. + All commands have been installed with the prefix "datomic-". We agreed to the Datomic Free Edition License for you: http://www.datomic.com/datomic-free-edition-license.html If this is unacceptable you should uninstall. EOS end + + test do + ENV["JAVA_HOME"] = `/usr/libexec/java_home`.strip + + help = pipe_output("#{bin}/datomic-shell", "Shell.help();\n") + assert_match(/^\* Basics/, help) + end end |
