rswift 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +56 -0
  7. data/Rakefile +6 -0
  8. data/bin/rswift +7 -0
  9. data/lib/ext/array.rb +12 -0
  10. data/lib/ext/group.rb +24 -0
  11. data/lib/ext/native_target.rb +54 -0
  12. data/lib/ext/project.rb +68 -0
  13. data/lib/rswift.rb +22 -0
  14. data/lib/rswift/attributes_configurator.rb +20 -0
  15. data/lib/rswift/build_settings_configurator.rb +26 -0
  16. data/lib/rswift/build_settings_provider.rb +84 -0
  17. data/lib/rswift/cli.rb +33 -0
  18. data/lib/rswift/configuration.rb +41 -0
  19. data/lib/rswift/constants.rb +106 -0
  20. data/lib/rswift/device_provider.rb +25 -0
  21. data/lib/rswift/files_references_manager.rb +17 -0
  22. data/lib/rswift/group_references_manager.rb +114 -0
  23. data/lib/rswift/project_configurator.rb +41 -0
  24. data/lib/rswift/scheme_configurator.rb +10 -0
  25. data/lib/rswift/target_configurator.rb +22 -0
  26. data/lib/rswift/template_manager.rb +28 -0
  27. data/lib/rswift/templates/app/ios/.gitignore.erb +22 -0
  28. data/lib/rswift/templates/app/ios/Gemfile.erb +4 -0
  29. data/lib/rswift/templates/app/ios/Podfile.erb +11 -0
  30. data/lib/rswift/templates/app/ios/Rakefile.erb +1 -0
  31. data/lib/rswift/templates/app/ios/app/AppDelegate.swift.erb +15 -0
  32. data/lib/rswift/templates/app/ios/app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +73 -0
  33. data/lib/rswift/templates/app/ios/app/Info.plist.erb +45 -0
  34. data/lib/rswift/templates/app/ios/app/LaunchScreen.storyboard.erb +28 -0
  35. data/lib/rswift/templates/app/ios/package.json.erb +14 -0
  36. data/lib/rswift/templates/app/ios/spec/AppDelegateSpec.swift.erb +24 -0
  37. data/lib/rswift/templates/app/ios/spec/Info.plist.erb +24 -0
  38. data/lib/rswift/templates/app/osx/.gitignore.erb +21 -0
  39. data/lib/rswift/templates/app/osx/Gemfile.erb +4 -0
  40. data/lib/rswift/templates/app/osx/Podfile.erb +7 -0
  41. data/lib/rswift/templates/app/osx/Rakefile.erb +1 -0
  42. data/lib/rswift/templates/app/osx/app/AppDelegate.swift.erb +30 -0
  43. data/lib/rswift/templates/app/osx/app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +58 -0
  44. data/lib/rswift/templates/app/osx/app/Info.plist.erb +30 -0
  45. data/lib/rswift/templates/app/osx/app/main.swift.erb +5 -0
  46. data/lib/rswift/templates/app/osx/spec/AppDelegateSpec.swift.erb +24 -0
  47. data/lib/rswift/templates/app/osx/spec/Info.plist.erb +24 -0
  48. data/lib/rswift/templates/app/tvos/.gitignore.erb +21 -0
  49. data/lib/rswift/templates/app/tvos/Gemfile.erb +4 -0
  50. data/lib/rswift/templates/app/tvos/Podfile.erb +11 -0
  51. data/lib/rswift/templates/app/tvos/Rakefile.erb +1 -0
  52. data/lib/rswift/templates/app/tvos/app/AppDelegate.swift.erb +15 -0
  53. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  54. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json.erb +6 -0
  55. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Contents.json.erb +17 -0
  56. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  57. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json.erb +6 -0
  58. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  59. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json.erb +6 -0
  60. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  61. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json.erb +6 -0
  62. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Contents.json.erb +17 -0
  63. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  64. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json.erb +6 -0
  65. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
  66. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json.erb +6 -0
  67. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/Contents.json.erb +26 -0
  68. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/Top Shelf Image.imageset/Contents.json.erb +12 -0
  69. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/Contents.json.erb +6 -0
  70. data/lib/rswift/templates/app/tvos/app/Assets.xcassets/LaunchImage.launchimage/Contents.json.erb +15 -0
  71. data/lib/rswift/templates/app/tvos/app/Info.plist.erb +30 -0
  72. data/lib/rswift/templates/app/tvos/spec/AppDelegateSpec.swift.erb +24 -0
  73. data/lib/rswift/templates/app/tvos/spec/Info.plist.erb +24 -0
  74. data/lib/rswift/templates/app/watchos/wk_app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +55 -0
  75. data/lib/rswift/templates/app/watchos/wk_app/Info.plist.erb +35 -0
  76. data/lib/rswift/templates/app/watchos/wk_app/Interface.storyboard.erb +15 -0
  77. data/lib/rswift/templates/app/watchos/wk_ext/Assets.xcassets/README__ignoredByTemplate__ +1 -0
  78. data/lib/rswift/templates/app/watchos/wk_ext/ExtensionDelegate.swift.erb +4 -0
  79. data/lib/rswift/templates/app/watchos/wk_ext/Info.plist.erb +40 -0
  80. data/lib/rswift/templates/app/watchos/wk_ext/InterfaceController.swift.erb +6 -0
  81. data/lib/rswift/version.rb +3 -0
  82. data/lib/rswift/workspace_provider.rb +11 -0
  83. data/rswift.gemspec +26 -0
  84. metadata +227 -0
@@ -0,0 +1,24 @@
1
+ import Quick
2
+ import Nimble
3
+
4
+ @testable import <%= @name %>
5
+
6
+ class AppDelegateSpec: QuickSpec {
7
+
8
+ override func spec() {
9
+
10
+ var sut: AppDelegate!
11
+
12
+ beforeEach {
13
+ sut = AppDelegate()
14
+ }
15
+
16
+ afterEach {
17
+ sut = nil
18
+ }
19
+
20
+ it("should pass") {
21
+ expect(true).to(beTruthy())
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,24 @@
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>$(PRODUCT_BUNDLE_IDENTIFIER)</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>BNDL</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
+ </dict>
24
+ </plist>
@@ -0,0 +1,21 @@
1
+ build/
2
+ *.pbxuser
3
+ !default.pbxuser
4
+ *.mode1v3
5
+ !default.mode1v3
6
+ *.mode2v3
7
+ !default.mode2v3
8
+ *.perspectivev3
9
+ !default.perspectivev3
10
+ xcuserdata
11
+ *.xccheckout
12
+ *.moved-aside
13
+ DerivedData
14
+ *.hmap
15
+ *.ipa
16
+ *.xcuserstate
17
+ *.xcworkspacedata
18
+ .idea/
19
+ Pods/
20
+ Carthage/
21
+ .irb-history
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'cocoapods'
4
+ gem 'rswift-tvos'
@@ -0,0 +1,11 @@
1
+ platform :tvos, '9.0'
2
+ use_frameworks!
3
+
4
+ target '<%= @name %>' do
5
+ pod 'Reveal-tvOS-SDK', configurations: ['Debug']
6
+ end
7
+
8
+ target '<%= @name %>Specs' do
9
+ pod 'Quick'
10
+ pod 'Nimble'
11
+ end
@@ -0,0 +1 @@
1
+ require 'rswift/tvos'
@@ -0,0 +1,15 @@
1
+ import UIKit
2
+
3
+ @UIApplicationMain
4
+ class AppDelegate: UIResponder, UIApplicationDelegate {
5
+
6
+ var window: UIWindow?
7
+
8
+ func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject:AnyObject]?) -> Bool {
9
+ window = UIWindow(frame: UIScreen.mainScreen().bounds)
10
+ window?.rootViewController = UIViewController()
11
+ window?.backgroundColor = UIColor.whiteColor()
12
+ window?.makeKeyAndVisible()
13
+ return true
14
+ }
15
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "layers" : [
3
+ {
4
+ "filename" : "Front.imagestacklayer"
5
+ },
6
+ {
7
+ "filename" : "Middle.imagestacklayer"
8
+ },
9
+ {
10
+ "filename" : "Back.imagestacklayer"
11
+ }
12
+ ],
13
+ "info" : {
14
+ "version" : 1,
15
+ "author" : "xcode"
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "layers" : [
3
+ {
4
+ "filename" : "Front.imagestacklayer"
5
+ },
6
+ {
7
+ "filename" : "Middle.imagestacklayer"
8
+ },
9
+ {
10
+ "filename" : "Back.imagestacklayer"
11
+ }
12
+ ],
13
+ "info" : {
14
+ "version" : 1,
15
+ "author" : "xcode"
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "assets" : [
3
+ {
4
+ "size" : "1280x768",
5
+ "idiom" : "tv",
6
+ "filename" : "App Icon - Large.imagestack",
7
+ "role" : "primary-app-icon"
8
+ },
9
+ {
10
+ "size" : "400x240",
11
+ "idiom" : "tv",
12
+ "filename" : "App Icon - Small.imagestack",
13
+ "role" : "primary-app-icon"
14
+ },
15
+ {
16
+ "size" : "1920x720",
17
+ "idiom" : "tv",
18
+ "filename" : "Top Shelf Image.imageset",
19
+ "role" : "top-shelf-image"
20
+ }
21
+ ],
22
+ "info" : {
23
+ "version" : 1,
24
+ "author" : "xcode"
25
+ }
26
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "tv",
5
+ "scale" : "1x"
6
+ }
7
+ ],
8
+ "info" : {
9
+ "version" : 1,
10
+ "author" : "xcode"
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "info" : {
3
+ "version" : 1,
4
+ "author" : "xcode"
5
+ }
6
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "orientation" : "landscape",
5
+ "idiom" : "tv",
6
+ "extent" : "full-screen",
7
+ "minimum-system-version" : "9.0",
8
+ "scale" : "1x"
9
+ }
10
+ ],
11
+ "info" : {
12
+ "version" : 1,
13
+ "author" : "xcode"
14
+ }
15
+ }
@@ -0,0 +1,30 @@
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>$(PRODUCT_BUNDLE_IDENTIFIER)</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>UIRequiredDeviceCapabilities</key>
26
+ <array>
27
+ <string>arm64</string>
28
+ </array>
29
+ </dict>
30
+ </plist>
@@ -0,0 +1,24 @@
1
+ import Quick
2
+ import Nimble
3
+
4
+ @testable import <%= @name %>
5
+
6
+ class AppDelegateSpec: QuickSpec {
7
+
8
+ override func spec() {
9
+
10
+ var sut: AppDelegate!
11
+
12
+ beforeEach {
13
+ sut = AppDelegate()
14
+ }
15
+
16
+ afterEach {
17
+ sut = nil
18
+ }
19
+
20
+ it("should pass") {
21
+ expect(true).to(beTruthy())
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,24 @@
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>$(PRODUCT_BUNDLE_IDENTIFIER)</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>BNDL</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
+ </dict>
24
+ </plist>
@@ -0,0 +1,55 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "size" : "24x24",
5
+ "idiom" : "watch",
6
+ "scale" : "2x",
7
+ "role" : "notificationCenter",
8
+ "subtype" : "38mm"
9
+ },
10
+ {
11
+ "size" : "27.5x27.5",
12
+ "idiom" : "watch",
13
+ "scale" : "2x",
14
+ "role" : "notificationCenter",
15
+ "subtype" : "42mm"
16
+ },
17
+ {
18
+ "size" : "29x29",
19
+ "idiom" : "watch",
20
+ "role" : "companionSettings",
21
+ "scale" : "2x"
22
+ },
23
+ {
24
+ "size" : "29x29",
25
+ "idiom" : "watch",
26
+ "role" : "companionSettings",
27
+ "scale" : "3x"
28
+ },
29
+ {
30
+ "size" : "40x40",
31
+ "idiom" : "watch",
32
+ "scale" : "2x",
33
+ "role" : "appLauncher",
34
+ "subtype" : "38mm"
35
+ },
36
+ {
37
+ "size" : "86x86",
38
+ "idiom" : "watch",
39
+ "scale" : "2x",
40
+ "role" : "quickLook",
41
+ "subtype" : "38mm"
42
+ },
43
+ {
44
+ "size" : "98x98",
45
+ "idiom" : "watch",
46
+ "scale" : "2x",
47
+ "role" : "quickLook",
48
+ "subtype" : "42mm"
49
+ }
50
+ ],
51
+ "info" : {
52
+ "version" : 1,
53
+ "author" : "xcode"
54
+ }
55
+ }