natalie 0.1 (new formula)

Adding Natalie

Removing require

Formatting code

Removing empty line

Removing empty line

Adding Formula test

Copying to etc only if needed, adding head link

Installing example on share folder, refactoring test

Removing ```File.exists?``` call

Limiting to Xcode 6.3 which supports Swift 1.2

Closes Homebrew/homebrew#39220.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
Christian Sampaio 2015-04-30 13:00:05 -03:00 committed by Tim D. Smith
parent 5a33372757
commit 56038b3dbe

22
Formula/natalie.rb Normal file
View file

@ -0,0 +1,22 @@
class Natalie < Formula
homepage "https://github.com/krzyzanowskim/Natalie"
url "https://github.com/krzyzanowskim/Natalie/archive/0.1.tar.gz"
sha256 "943dab1b7ac16555ec3047983a3c397f7ebe7559d3c098c02a6ee6d8e966655e"
head "https://github.com/krzyzanowskim/Natalie.git"
depends_on :xcode => "6.3"
def install
bin.install "natalie.swift"
share.install "NatalieExample"
end
test do
example_path = "#{share}/NatalieExample"
output_path = testpath/"Storyboards.swift"
generated_code = `#{bin}/natalie.swift #{example_path}`
output_path.write(generated_code)
line_count = `wc -l #{output_path}`
assert line_count.to_i > 1
end
end