2013-09-20 23:00:54 +00:00
|
|
|
class Datomic < Formula
|
2015-08-17 17:54:23 +00:00
|
|
|
desc "Database separating transactions, storage and queries"
|
2015-01-19 09:11:59 +00:00
|
|
|
homepage "http://www.datomic.com/"
|
2015-09-23 04:19:49 +00:00
|
|
|
url "https://my.datomic.com/downloads/free/0.9.5302"
|
|
|
|
version "0.9.5302"
|
|
|
|
sha256 "6fc4fa8d6fa290c19405dbc11cf7f20dbe94077bd5dddc65cfd10b8958f42950"
|
2013-09-20 23:00:54 +00:00
|
|
|
|
2015-02-24 08:26:21 +00:00
|
|
|
depends_on :java
|
2013-09-20 23:00:54 +00:00
|
|
|
|
|
|
|
def install
|
2015-01-19 09:11:59 +00:00
|
|
|
libexec.install Dir["*"]
|
2015-02-27 18:17:32 +00:00
|
|
|
(bin/"datomic").write_env_script libexec/"bin/datomic", Language::Java.java_home_env
|
2015-08-17 17:54:23 +00:00
|
|
|
|
2015-07-15 14:17:32 +00:00
|
|
|
%w[transactor repl repl-jline rest shell groovysh maven-install].each do |file|
|
2015-02-27 18:17:32 +00:00
|
|
|
(bin/"datomic-#{file}").write_env_script libexec/"bin/#{file}", Language::Java.java_home_env
|
2015-02-24 08:26:21 +00:00
|
|
|
end
|
2013-09-20 23:00:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
2015-01-19 09:11:59 +00:00
|
|
|
All commands have been installed with the prefix "datomic-".
|
2013-10-30 17:44:55 +00:00
|
|
|
|
|
|
|
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.
|
2013-09-20 23:00:54 +00:00
|
|
|
EOS
|
|
|
|
end
|
2015-01-19 09:11:59 +00:00
|
|
|
|
|
|
|
test do
|
2015-08-17 17:54:23 +00:00
|
|
|
IO.popen("#{bin}/datomic-repl", "r+") do |pipe|
|
|
|
|
assert_equal "Clojure 1.6.0", pipe.gets.chomp
|
|
|
|
pipe.puts "^C"
|
|
|
|
pipe.close_write
|
|
|
|
pipe.close
|
|
|
|
end
|
2015-01-19 09:11:59 +00:00
|
|
|
end
|
2013-09-20 23:00:54 +00:00
|
|
|
end
|