2015-04-30 16:00:05 +00:00
|
|
|
class Natalie < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Storyboard Code Generator (for Swift)"
|
2015-04-30 16:00:05 +00:00
|
|
|
homepage "https://github.com/krzyzanowskim/Natalie"
|
2015-09-18 16:08:51 +00:00
|
|
|
url "https://github.com/krzyzanowskim/Natalie/archive/0.3.tar.gz"
|
|
|
|
sha256 "8fa28a53e963fb9bcee73b040fb6c6fbbe20d20472c8f42e0c3795603a2295f4"
|
2015-04-30 16:00:05 +00:00
|
|
|
head "https://github.com/krzyzanowskim/Natalie.git"
|
|
|
|
|
2015-08-10 13:25:51 +00:00
|
|
|
bottle do
|
2015-09-19 00:27:25 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "865e3241891fc71e25dd294196c3fb8a3c7a848c22009e5ba0b013197620c551" => :el_capitan
|
|
|
|
sha256 "ba8b1886d28a9ae547b5ba1251f6e9bfc11f9d08b328e26187e49c3339ed28b7" => :yosemite
|
2015-08-10 13:25:51 +00:00
|
|
|
end
|
|
|
|
|
2015-09-18 16:08:51 +00:00
|
|
|
depends_on :xcode => "7.0"
|
2015-04-30 16:00:05 +00:00
|
|
|
|
|
|
|
def install
|
2015-07-13 04:41:51 +00:00
|
|
|
mv "natalie.swift", "natalie-script.swift"
|
|
|
|
system "xcrun", "-sdk", "macosx", "swiftc", "-O", "natalie-script.swift", "-o", "natalie.swift"
|
2015-04-30 16:00:05 +00:00
|
|
|
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
|