diff options
| author | Adam Vandenberg | 2014-08-05 21:12:42 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-08-05 21:12:59 -0700 |
| commit | 8bb6ff66bf0f1638e3af49a75bc80f1dbfabf4b5 (patch) | |
| tree | 818a2b01dcd7368029dc43d1efeee1508a817600 /Library | |
| parent | 7005959f4900655921f5279d5eddf24a46e744f9 (diff) | |
| download | homebrew-8bb6ff66bf0f1638e3af49a75bc80f1dbfabf4b5.tar.bz2 | |
leiningen: modernize
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/leiningen.rb | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/Library/Formula/leiningen.rb b/Library/Formula/leiningen.rb index 592d2f5b0..f936e3d52 100644 --- a/Library/Formula/leiningen.rb +++ b/Library/Formula/leiningen.rb @@ -1,28 +1,27 @@ -require 'formula' +require "formula" class Leiningen < Formula - homepage 'https://github.com/technomancy/leiningen' - url 'https://github.com/technomancy/leiningen/archive/2.4.3.tar.gz' - sha1 '809bf399ea69877a77a69ca8f45a80d92f58669d' - - head 'https://github.com/technomancy/leiningen.git' - - resource 'jar' do - url 'https://github.com/technomancy/leiningen/releases/download/2.4.3/leiningen-2.4.3-standalone.jar' - sha1 'a875779c2b6ce02320ccfb153c3ce3995f19cc3a' + homepage "https://github.com/technomancy/leiningen" + head "https://github.com/technomancy/leiningen.git" + url "https://github.com/technomancy/leiningen/archive/2.4.3.tar.gz" + sha1 "809bf399ea69877a77a69ca8f45a80d92f58669d" + + resource "jar" do + url "https://github.com/technomancy/leiningen/releases/download/2.4.3/leiningen-2.4.3-standalone.jar" + sha1 "a875779c2b6ce02320ccfb153c3ce3995f19cc3a" end def install - libexec.install resource('jar') + libexec.install resource("jar") # bin/lein autoinstalls and autoupdates, which doesn't work too well for us inreplace "bin/lein-pkg" do |s| - s.change_make_var! 'LEIN_JAR', libexec/"leiningen-#{version}-standalone.jar" + s.change_make_var! "LEIN_JAR", libexec/"leiningen-#{version}-standalone.jar" end - bin.install "bin/lein-pkg" => 'lein' - bash_completion.install 'bash_completion.bash' => 'lein-completion.bash' - zsh_completion.install 'zsh_completion.zsh' => '_lein' + bin.install "bin/lein-pkg" => "lein" + bash_completion.install "bash_completion.bash" => "lein-completion.bash" + zsh_completion.install "zsh_completion.zsh" => "_lein" end def caveats; <<-EOS.undent @@ -33,18 +32,18 @@ class Leiningen < Formula end test do - (testpath/'project.clj').write <<-EOS.undent + (testpath/"project.clj").write <<-EOS.undent (defproject brew-test "1.0" :dependencies [[org.clojure/clojure "1.5.1"]]) EOS - (testpath/'src/brew_test/core.clj').write <<-EOS.undent + (testpath/"src/brew_test/core.clj").write <<-EOS.undent (ns brew-test.core) (defn adds-two "I add two to a number" [x] (+ x 2)) EOS - (testpath/'test/brew_test/core_test.clj').write <<-EOS.undent + (testpath/"test/brew_test/core_test.clj").write <<-EOS.undent (ns brew-test.core-test (:require [clojure.test :refer :all] [brew-test.core :refer :all])) @@ -52,7 +51,7 @@ class Leiningen < Formula (testing "adds-two yields 4 for input of 2" (is (= 4 (adds-two 2))))) EOS - system "#{bin}/lein", 'test' + system "#{bin}/lein", "test" end end |
