-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eject 0.1.12 (new formula) #6893
Changes from 4 commits
36a5fd9
9c15271
bcdf251
15ef310
ff52020
b89bbe7
7de4d53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class Eject < Formula | ||
desc "Generate swift code from Interface Builder xibs" | ||
homepage "https://github.com/Raizlabs/Eject" | ||
url "https://github.com/Raizlabs/Eject/archive/0.1.12.tar.gz" | ||
sha256 "a4dae3d37f780d274f53ed25d9dc1a27d5245289f9b8cbaaf8be71bc9334de18" | ||
|
||
depends_on :xcode => :build | ||
|
||
def install | ||
xcodebuild | ||
bin.install "build/Release/eject.app/Contents/MacOS/eject" | ||
frameworks_path = "build/Release/eject.app/Contents/Frameworks" | ||
mv frameworks_path, frameworks | ||
end | ||
|
||
test do | ||
xib = File.open "view.xib", "a+" do |file| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
file.write <<-XML | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view contentMode="scaleToFill" id="iN0-l3-epB"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
</view> | ||
</objects> | ||
</document> | ||
XML | ||
end | ||
|
||
swift = <<-SWIFT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
// Create Views | ||
let view = UIView() | ||
view.frame = CGRect(x: 0, y: 0, width: 375, height: 667) | ||
view.autoresizingMask = [.flexibleHeight, .flexibleWidth] | ||
view.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1) | ||
SWIFT | ||
|
||
assert_equal swift, shell_output("#{bin}/eject --file view.xib") | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing on Yosemite so may need scoped to e.g. Xcode 8: https://bot.brew.sh/job/Homebrew%20Core/11454/version=yosemite/testReport/junit/brew-test-bot/yosemite/install_eject/