maigo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +7 -0
- data/bin/maigo +10 -0
- data/lib/maigo.rb +94 -0
- data/lib/maigo/version.rb +3 -0
- data/maigo.gemspec +26 -0
- data/spec/MissingOutlet/MissingOutlet/AppDelegate.swift +46 -0
- data/spec/MissingOutlet/MissingOutlet/Base.lproj/LaunchScreen.xib +41 -0
- data/spec/MissingOutlet/MissingOutlet/Base.lproj/Main.storyboard +47 -0
- data/spec/MissingOutlet/MissingOutlet/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- data/spec/MissingOutlet/MissingOutlet/Info.plist +40 -0
- data/spec/MissingOutlet/MissingOutlet/ViewController.swift +27 -0
- data/spec/maigo_spec.rb +16 -0
- data/spec/spec_helper.rb +2 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 547e5004f32584a2ed103e1b5697afdfd8dc63be
|
4
|
+
data.tar.gz: 9119574f5f096d72146ed0ced9b3b5b2086e61a6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eda841a7c6eed5eda63fe2b96ce3e9487af11f71682752de9e1e31107f8839d16608a5ee8708b40933acb6c8e9313eb9485f3329704943993b6d996ea3edb6f2
|
7
|
+
data.tar.gz: 7377df3c522901242284a2fffbce5fd261ae300c2796ee7797c9fb54dd45d5da8ba509a067f1f25df7dc21ca661f6394e6733c9f941bf54f4a59fa30cfcef17b
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 tady
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Maigo
|
2
|
+
|
3
|
+
Find Missing Outlets in Xcode Storyboard.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'maigo'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install nokogiri
|
19
|
+
$ gem install maigo
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Run `maigo` command:
|
24
|
+
|
25
|
+
$ cd path/to/xcode-project-dir
|
26
|
+
$ maigo
|
27
|
+
|
28
|
+
or
|
29
|
+
|
30
|
+
$ maigo path/to/xcode-project-dir
|
31
|
+
|
32
|
+
and then, you will missing outlets information.
|
33
|
+
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it ( https://github.com/[my-github-username]/maigo/fork )
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/maigo
ADDED
data/lib/maigo.rb
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require "maigo/version"
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
module Maigo
|
7
|
+
|
8
|
+
def self.execute(dir)
|
9
|
+
missing_controllers, missing_outlets = self.find_missing_outlets(dir)
|
10
|
+
|
11
|
+
if missing_controllers.size == 0 && missing_outlets.size == 0
|
12
|
+
puts 'Woot! No missing outlets!'
|
13
|
+
end
|
14
|
+
|
15
|
+
if missing_controllers.size > 0
|
16
|
+
puts 'Missing ViewControllers:'
|
17
|
+
missing_controllers.each do |missing_controller|
|
18
|
+
puts " #{missing_controller}"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
if missing_outlets.size > 0
|
23
|
+
puts 'Missing Outlets:'
|
24
|
+
missing_outlets.each do |missing_outlet|
|
25
|
+
puts " #{missing_outlet}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.find_missing_outlets(dir)
|
31
|
+
storyboard_outlet_hash = {}
|
32
|
+
|
33
|
+
Dir.glob("#{dir}/**/*.storyboard") do |file|
|
34
|
+
xml = Nokogiri::XML(open(file))
|
35
|
+
|
36
|
+
xml.xpath('//viewController').each do |node|
|
37
|
+
storyboard_outlet_hash[node["customClass"]] = []
|
38
|
+
|
39
|
+
node.xpath("connections/outlet").each do |outlet|
|
40
|
+
storyboard_outlet_hash[node["customClass"]] << outlet["property"]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
source_outlet_hash = {}
|
46
|
+
Dir.glob("#{dir}/**/*.swift") do |file|
|
47
|
+
class_name = nil
|
48
|
+
|
49
|
+
open(file).each do |line|
|
50
|
+
if line =~ /class\s+(\w+)/
|
51
|
+
class_name = $1
|
52
|
+
if line =~ /class\s+var/ or line =~ /class\s+func/
|
53
|
+
class_name = nil
|
54
|
+
next
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
next if class_name.nil?
|
60
|
+
|
61
|
+
source_outlet_hash[class_name] = []
|
62
|
+
|
63
|
+
open(file).each do |line|
|
64
|
+
if line =~ /@IBOutlet\s.*var\s(\w+)/
|
65
|
+
outlet_name = $1
|
66
|
+
next if line =~ /\/\/.*@IBOutlet/
|
67
|
+
source_outlet_hash[class_name] << outlet_name
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
missing_controllers = []
|
73
|
+
missing_outlets = []
|
74
|
+
|
75
|
+
# compare outlets
|
76
|
+
storyboard_outlet_hash.each do |controller, outlets|
|
77
|
+
# find missing controllers
|
78
|
+
if source_outlet_hash[controller].nil?
|
79
|
+
missing_controllers << controller
|
80
|
+
next
|
81
|
+
end
|
82
|
+
|
83
|
+
# find missing outlets
|
84
|
+
outlets.each do |outlet|
|
85
|
+
if !source_outlet_hash[controller].include?(outlet)
|
86
|
+
missing_outlets << [controller, outlet]
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
return missing_controllers, missing_outlets
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
data/maigo.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'maigo/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "maigo"
|
8
|
+
spec.version = Maigo::VERSION
|
9
|
+
spec.authors = ["tady"]
|
10
|
+
spec.email = ["a.dat.jp@gmail.com"]
|
11
|
+
spec.summary = %q{Find Missing Outlets in Xcode Storyboard.}
|
12
|
+
spec.description = %q{Find Missing Outlets in Xcode Storyboard.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'nokogiri'
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec"
|
26
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.swift
|
3
|
+
// MissingOutlet
|
4
|
+
//
|
5
|
+
// Created by tady on 11/1/14.
|
6
|
+
// Copyright (c) 2014 tady. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
import UIKit
|
10
|
+
|
11
|
+
@UIApplicationMain
|
12
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
13
|
+
|
14
|
+
var window: UIWindow?
|
15
|
+
|
16
|
+
|
17
|
+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
|
18
|
+
// Override point for customization after application launch.
|
19
|
+
return true
|
20
|
+
}
|
21
|
+
|
22
|
+
func applicationWillResignActive(application: UIApplication) {
|
23
|
+
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
24
|
+
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
25
|
+
}
|
26
|
+
|
27
|
+
func applicationDidEnterBackground(application: UIApplication) {
|
28
|
+
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
29
|
+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
30
|
+
}
|
31
|
+
|
32
|
+
func applicationWillEnterForeground(application: UIApplication) {
|
33
|
+
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
34
|
+
}
|
35
|
+
|
36
|
+
func applicationDidBecomeActive(application: UIApplication) {
|
37
|
+
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
38
|
+
}
|
39
|
+
|
40
|
+
func applicationWillTerminate(application: UIApplication) {
|
41
|
+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
}
|
46
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
3
|
+
<dependencies>
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
|
5
|
+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
6
|
+
</dependencies>
|
7
|
+
<objects>
|
8
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
9
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
10
|
+
<view contentMode="scaleToFill" id="iN0-l3-epB">
|
11
|
+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
|
12
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
13
|
+
<subviews>
|
14
|
+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 tady. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
|
15
|
+
<rect key="frame" x="20" y="439" width="441" height="21"/>
|
16
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
17
|
+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
18
|
+
<nil key="highlightedColor"/>
|
19
|
+
</label>
|
20
|
+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MissingOutlet" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
|
21
|
+
<rect key="frame" x="20" y="140" width="441" height="43"/>
|
22
|
+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
|
23
|
+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
24
|
+
<nil key="highlightedColor"/>
|
25
|
+
</label>
|
26
|
+
</subviews>
|
27
|
+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
28
|
+
<constraints>
|
29
|
+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
|
30
|
+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
|
31
|
+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
|
32
|
+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
|
33
|
+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
|
34
|
+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
|
35
|
+
</constraints>
|
36
|
+
<nil key="simulatedStatusBarMetrics"/>
|
37
|
+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
38
|
+
<point key="canvasLocation" x="548" y="455"/>
|
39
|
+
</view>
|
40
|
+
</objects>
|
41
|
+
</document>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
|
3
|
+
<dependencies>
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
5
|
+
</dependencies>
|
6
|
+
<scenes>
|
7
|
+
<!--View Controller-->
|
8
|
+
<scene sceneID="ufC-wZ-h7g">
|
9
|
+
<objects>
|
10
|
+
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="MissingOutlet" customModuleProvider="target" sceneMemberID="viewController">
|
11
|
+
<layoutGuides>
|
12
|
+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
|
13
|
+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
|
14
|
+
</layoutGuides>
|
15
|
+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
16
|
+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
17
|
+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
18
|
+
<subviews>
|
19
|
+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8Bz-sw-qpQ">
|
20
|
+
<rect key="frame" x="279" y="290" width="42" height="21"/>
|
21
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
22
|
+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
23
|
+
<nil key="highlightedColor"/>
|
24
|
+
</label>
|
25
|
+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xbd-gz-RZI">
|
26
|
+
<rect key="frame" x="243" y="150" width="42" height="21"/>
|
27
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
28
|
+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
29
|
+
<nil key="highlightedColor"/>
|
30
|
+
</label>
|
31
|
+
</subviews>
|
32
|
+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
33
|
+
<constraints>
|
34
|
+
<constraint firstAttribute="centerX" secondItem="8Bz-sw-qpQ" secondAttribute="centerX" id="4aw-WB-Els"/>
|
35
|
+
<constraint firstAttribute="centerY" secondItem="8Bz-sw-qpQ" secondAttribute="centerY" id="aNu-uY-52H"/>
|
36
|
+
</constraints>
|
37
|
+
</view>
|
38
|
+
<connections>
|
39
|
+
<outlet property="myLabel" destination="8Bz-sw-qpQ" id="69A-Oy-TGn"/>
|
40
|
+
<outlet property="myLabel2" destination="Xbd-gz-RZI" id="jJC-nn-jaV"/>
|
41
|
+
</connections>
|
42
|
+
</viewController>
|
43
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
44
|
+
</objects>
|
45
|
+
</scene>
|
46
|
+
</scenes>
|
47
|
+
</document>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{
|
2
|
+
"images" : [
|
3
|
+
{
|
4
|
+
"idiom" : "iphone",
|
5
|
+
"size" : "29x29",
|
6
|
+
"scale" : "2x"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"idiom" : "iphone",
|
10
|
+
"size" : "29x29",
|
11
|
+
"scale" : "3x"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"idiom" : "iphone",
|
15
|
+
"size" : "40x40",
|
16
|
+
"scale" : "2x"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"idiom" : "iphone",
|
20
|
+
"size" : "40x40",
|
21
|
+
"scale" : "3x"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"idiom" : "iphone",
|
25
|
+
"size" : "60x60",
|
26
|
+
"scale" : "2x"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"idiom" : "iphone",
|
30
|
+
"size" : "60x60",
|
31
|
+
"scale" : "3x"
|
32
|
+
}
|
33
|
+
],
|
34
|
+
"info" : {
|
35
|
+
"version" : 1,
|
36
|
+
"author" : "xcode"
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>jp.tady.$(PRODUCT_NAME:rfc1034identifier)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>APPL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
</dict>
|
40
|
+
</plist>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//
|
2
|
+
// ViewController.swift
|
3
|
+
// MissingOutlet
|
4
|
+
//
|
5
|
+
// Created by tady on 11/1/14.
|
6
|
+
// Copyright (c) 2014 tady. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
import UIKit
|
10
|
+
|
11
|
+
class ViewController: UIViewController {
|
12
|
+
|
13
|
+
@IBOutlet weak var myLabel: UILabel!
|
14
|
+
// @IBOutlet weak var myLabel2: UILabel!
|
15
|
+
|
16
|
+
override func viewDidLoad() {
|
17
|
+
super.viewDidLoad()
|
18
|
+
// Do any additional setup after loading the view, typically from a nib.
|
19
|
+
}
|
20
|
+
|
21
|
+
override func didReceiveMemoryWarning() {
|
22
|
+
super.didReceiveMemoryWarning()
|
23
|
+
// Dispose of any resources that can be recreated.
|
24
|
+
}
|
25
|
+
|
26
|
+
}
|
27
|
+
|
data/spec/maigo_spec.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe Maigo do
|
6
|
+
it 'has a version number' do
|
7
|
+
expect(Maigo::VERSION).not_to be nil
|
8
|
+
end
|
9
|
+
|
10
|
+
it '#find_missing_outlets' do
|
11
|
+
dir = File.expand_path('../MissingOutlet', __FILE__)
|
12
|
+
missing_controllers, missing_outlets = Maigo.find_missing_outlets(dir)
|
13
|
+
expect(missing_controllers.size).to eq(0)
|
14
|
+
expect(missing_outlets.size).to eq(1)
|
15
|
+
end
|
16
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: maigo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- tady
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.7'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Find Missing Outlets in Xcode Storyboard.
|
70
|
+
email:
|
71
|
+
- a.dat.jp@gmail.com
|
72
|
+
executables:
|
73
|
+
- maigo
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".travis.yml"
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE.txt
|
82
|
+
- README.md
|
83
|
+
- Rakefile
|
84
|
+
- bin/maigo
|
85
|
+
- lib/maigo.rb
|
86
|
+
- lib/maigo/version.rb
|
87
|
+
- maigo.gemspec
|
88
|
+
- spec/MissingOutlet/MissingOutlet/AppDelegate.swift
|
89
|
+
- spec/MissingOutlet/MissingOutlet/Base.lproj/LaunchScreen.xib
|
90
|
+
- spec/MissingOutlet/MissingOutlet/Base.lproj/Main.storyboard
|
91
|
+
- spec/MissingOutlet/MissingOutlet/Images.xcassets/AppIcon.appiconset/Contents.json
|
92
|
+
- spec/MissingOutlet/MissingOutlet/Info.plist
|
93
|
+
- spec/MissingOutlet/MissingOutlet/ViewController.swift
|
94
|
+
- spec/maigo_spec.rb
|
95
|
+
- spec/spec_helper.rb
|
96
|
+
homepage: ''
|
97
|
+
licenses:
|
98
|
+
- MIT
|
99
|
+
metadata: {}
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options: []
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 2.2.2
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Find Missing Outlets in Xcode Storyboard.
|
120
|
+
test_files:
|
121
|
+
- spec/MissingOutlet/MissingOutlet/AppDelegate.swift
|
122
|
+
- spec/MissingOutlet/MissingOutlet/Base.lproj/LaunchScreen.xib
|
123
|
+
- spec/MissingOutlet/MissingOutlet/Base.lproj/Main.storyboard
|
124
|
+
- spec/MissingOutlet/MissingOutlet/Images.xcassets/AppIcon.appiconset/Contents.json
|
125
|
+
- spec/MissingOutlet/MissingOutlet/Info.plist
|
126
|
+
- spec/MissingOutlet/MissingOutlet/ViewController.swift
|
127
|
+
- spec/maigo_spec.rb
|
128
|
+
- spec/spec_helper.rb
|