mayday 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +46 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +80 -0
  6. data/Rakefile +2 -0
  7. data/bin/mayday +33 -0
  8. data/lib/mayday/abstract_flag/error.rb +7 -0
  9. data/lib/mayday/abstract_flag/warning.rb +11 -0
  10. data/lib/mayday/abstract_flag.rb +90 -0
  11. data/lib/mayday/error.rb +7 -0
  12. data/lib/mayday/reader.rb +108 -0
  13. data/lib/mayday/script_generator.rb +74 -0
  14. data/lib/mayday/target_integrator.rb +69 -0
  15. data/lib/mayday/user_definitions.rb +42 -0
  16. data/lib/mayday/version.rb +3 -0
  17. data/lib/mayday/warning.rb +11 -0
  18. data/lib/mayday.rb +2 -0
  19. data/mayday.gemspec +30 -0
  20. data/spec/fixtures/Fixtures/Fixtures/AppDelegate.swift +46 -0
  21. data/spec/fixtures/Fixtures/Fixtures/Base.lproj/LaunchScreen.xib +41 -0
  22. data/spec/fixtures/Fixtures/Fixtures/Base.lproj/Main.storyboard +25 -0
  23. data/spec/fixtures/Fixtures/Fixtures/Excluded/ExcludedFile.h +13 -0
  24. data/spec/fixtures/Fixtures/Fixtures/Excluded/ExcludedFile.m +15 -0
  25. data/spec/fixtures/Fixtures/Fixtures/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  26. data/spec/fixtures/Fixtures/Fixtures/Info.plist +40 -0
  27. data/spec/fixtures/Fixtures/Fixtures/Pods/SomePodObject.h +13 -0
  28. data/spec/fixtures/Fixtures/Fixtures/Pods/SomePodObject.m +16 -0
  29. data/spec/fixtures/Fixtures/Fixtures/SomeDir/Fixtures-Bridging-Header.h +4 -0
  30. data/spec/fixtures/Fixtures/Fixtures/SomeDir/LongFile.h +5 -0
  31. data/spec/fixtures/Fixtures/Fixtures/SomeDir/LongFile.m +547 -0
  32. data/spec/fixtures/Fixtures/Fixtures/SomeDir/SomeObject.h +15 -0
  33. data/spec/fixtures/Fixtures/Fixtures/SomeDir/SomeObject.m +18 -0
  34. data/spec/fixtures/Fixtures/Fixtures/ViewController.swift +26 -0
  35. data/spec/fixtures/Fixtures/Fixtures.xcodeproj/project.pbxproj +487 -0
  36. data/spec/fixtures/Fixtures/Fixtures.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  37. data/spec/fixtures/Fixtures/Fixtures.xcodeproj/xcuserdata/marklarsen.xcuserdatad/xcschemes/Fixtures.xcscheme +110 -0
  38. data/spec/fixtures/Fixtures/FixturesTests/FixturesTests.swift +36 -0
  39. data/spec/fixtures/Fixtures/FixturesTests/Info.plist +24 -0
  40. data/spec/fixtures/Maydayfile +22 -0
  41. data/spec/fixtures/Maydayfile_ruby_error +11 -0
  42. data/spec/mayday/user_definitions_spec.rb +177 -0
  43. data/spec/spec_helper.rb +16 -0
  44. metadata +223 -0
@@ -0,0 +1,46 @@
1
+ //
2
+ // AppDelegate.swift
3
+ // Fixtures
4
+ //
5
+ // Created by Mark Larsen on 10/16/14.
6
+ // Copyright (c) 2014 marklarr. 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 marklarr. 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="Fixtures" 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,25 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
3
+ <dependencies>
4
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
5
+ </dependencies>
6
+ <scenes>
7
+ <!--View Controller-->
8
+ <scene sceneID="ufC-wZ-h7g">
9
+ <objects>
10
+ <viewController id="vXZ-lx-hvc" customClass="ViewController" 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
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
19
+ </view>
20
+ </viewController>
21
+ <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
22
+ </objects>
23
+ </scene>
24
+ </scenes>
25
+ </document>
@@ -0,0 +1,13 @@
1
+ //
2
+ // ExcludedFile.h
3
+ // Fixtures
4
+ //
5
+ // Created by Mark Larsen on 10/18/14.
6
+ // Copyright (c) 2014 marklarr. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ @interface ExcludedFile : NSObject
12
+
13
+ @end
@@ -0,0 +1,15 @@
1
+ //
2
+ // ExcludedFile.m
3
+ // Fixtures
4
+ //
5
+ // Created by Mark Larsen on 10/18/14.
6
+ // Copyright (c) 2014 marklarr. All rights reserved.
7
+ //
8
+
9
+ #import "ExcludedFile.h"
10
+
11
+ @implementation ExcludedFile
12
+
13
+ // TODO: make some stuff
14
+
15
+ @end
@@ -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>marklarr.$(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,13 @@
1
+ //
2
+ // SomePodObject.h
3
+ // Fixtures
4
+ //
5
+ // Created by Mark Larsen on 10/18/14.
6
+ // Copyright (c) 2014 marklarr. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ @interface SomePodObject : NSObject
12
+
13
+ @end
@@ -0,0 +1,16 @@
1
+ //
2
+ // SomePodObject.m
3
+ // Fixtures
4
+ //
5
+ // Created by Mark Larsen on 10/18/14.
6
+ // Copyright (c) 2014 marklarr. All rights reserved.
7
+ //
8
+
9
+ #import "SomePodObject.h"
10
+
11
+ @implementation SomePodObject
12
+
13
+ // TODO: Make this line shorter... (jk)
14
+ // This is a super long comment line. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
15
+
16
+ @end
@@ -0,0 +1,4 @@
1
+ //
2
+ // Use this file to import your target's public headers that you would like to expose to Swift.
3
+ //
4
+
@@ -0,0 +1,5 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ @interface LongFile : NSObject
4
+
5
+ @end