Skip to content

Commit

Permalink
Merge pull request #56 from vadymmarkov/swift-3
Browse files Browse the repository at this point in the history
Swift 3 migration
  • Loading branch information
vadymmarkov authored Sep 27, 2016
2 parents 034f372 + b533e7a commit 59c7d12
Show file tree
Hide file tree
Showing 30 changed files with 262 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2
3.0
32 changes: 32 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
included:
- Sources
- Tests
excluded:
- Carthage
- Pods
- Packages
opt_in_rules:
- empty_count
disabled_rules:
- valid_docs
- type_name
force_cast: warning
force_try:
severity: warning
line_length: 120
function_body_length:
- 150
type_body_length:
warning: 300
error: 400
file_length:
warning: 500
error: 1200
type_name:
min_length: 3
max_length:
warning: 40
error: 50
variable_name:
min_length: 2
reporter: "xcode"
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
osx_image: xcode7.3
osx_image: xcode8
language: objective-c
xcode_sdk: iphonesimulator9.3
xcode_sdk: iphonesimulator10.0

before_install:
- brew update
Expand All @@ -9,6 +9,6 @@ before_install:

script:
- xcodebuild clean build -project Fakery.xcodeproj -scheme Fakery-iOS -sdk iphonesimulator
- xcodebuild test -project Fakery.xcodeproj -scheme Fakery-iOS -sdk iphonesimulator
- xcodebuild test -project Fakery.xcodeproj -scheme Fakery-iOS -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0'
- xcodebuild clean build -project Fakery.xcodeproj -scheme Fakery-Mac -sdk macosx
- xcodebuild test -project Fakery.xcodeproj -scheme Fakery-Mac -sdk macosx
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Quick/Quick" "v0.9.2"
github "Quick/Nimble" "v4.0.0"
github "Quick/Quick"
github "Quick/Nimble"
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Quick/Nimble" "v4.0.0"
github "Quick/Quick" "v0.9.2"
github "Quick/Nimble" "v5.0.0"
github "Quick/Quick" "v0.10.0"
72 changes: 69 additions & 3 deletions Fakery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@
BC827FA41BFA3CE1005F09A4 /* Frameworks */,
BC827FA51BFA3CE1005F09A4 /* Headers */,
BC827FA61BFA3CE1005F09A4 /* Resources */,
D51B4F371D9AE2BE009FE24D /* SwiftLint */,
);
buildRules = (
);
Expand Down Expand Up @@ -537,6 +538,7 @@
BCF0DF361BF9F77E00427DB4 /* Frameworks */,
BCF0DF371BF9F77E00427DB4 /* Headers */,
BCF0DF381BF9F77E00427DB4 /* Resources */,
D51B4F361D9AE2A0009FE24D /* SwiftLint */,
);
buildRules = (
);
Expand Down Expand Up @@ -574,6 +576,7 @@
BDC291241D9441F2007DA2FC /* Frameworks */,
BDC291251D9441F2007DA2FC /* Headers */,
BDC291261D9441F2007DA2FC /* Resources */,
D51B4F381D9AE2CD009FE24D /* SwiftLint */,
);
buildRules = (
);
Expand All @@ -591,14 +594,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Vadym Markov";
TargetAttributes = {
BC827FA71BFA3CE1005F09A4 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
BC827FB01BFA3CE1005F09A4 = {
CreatedOnToolsVersion = 7.1.1;
LastSwiftMigration = 0800;
};
BCF0DF391BF9F77E00427DB4 = {
CreatedOnToolsVersion = 7.1.1;
Expand Down Expand Up @@ -759,6 +764,48 @@
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks";
};
D51B4F361D9AE2A0009FE24D /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = SwiftLint;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
D51B4F371D9AE2BE009FE24D /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = SwiftLint;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
D51B4F381D9AE2CD009FE24D /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = SwiftLint;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
};
D5BA6B7F1D99D429000D5F46 /* Copy frameworks with Carthage */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -915,7 +962,7 @@
BC827FB91BFA3CE1005F09A4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -931,13 +978,14 @@
PRODUCT_NAME = Fakery;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
BC827FBA1BFA3CE1005F09A4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -953,6 +1001,7 @@
PRODUCT_NAME = Fakery;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -968,6 +1017,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.Fakery-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -983,6 +1033,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.Fakery-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -999,8 +1050,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -1048,8 +1101,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -1070,6 +1125,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -1080,6 +1136,7 @@
BCF0DF4F1BF9F77E00427DB4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1091,12 +1148,14 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.Fakery";
PRODUCT_NAME = Fakery;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
BCF0DF501BF9F77E00427DB4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1108,6 +1167,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.Fakery";
PRODUCT_NAME = Fakery;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -1119,6 +1179,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.FakeryTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -1130,13 +1191,15 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.vadym-markov.FakeryTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
BDC2912E1D9441F2007DA2FC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1149,6 +1212,7 @@
PRODUCT_NAME = Fakery;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
Expand All @@ -1158,6 +1222,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -1170,6 +1235,7 @@
PRODUCT_NAME = Fakery;
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 59c7d12

Please sign in to comment.