56038b3dbe
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>
22 lines
676 B
Ruby
22 lines
676 B
Ruby
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
|