diff --git a/.gitignore b/.gitignore index 533fb64..dc17f80 100644 --- a/.gitignore +++ b/.gitignore @@ -13,10 +13,12 @@ *.xcuserstate ._* .AppleDouble +.build/ .DS_Store .LSOverride build/ Carthage/Build DerivedData Icon +run-tests xcuserdata diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..3c18da7 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +swift-2.2-SNAPSHOT-2015-12-22-a diff --git a/.travis.yml b/.travis.yml index 1a24bb0..2110669 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,20 @@ +matrix: + include: + - os: osx + env: ACTION=lint + - os: osx + env: ACTION=iOS + - os: osx + env: ACTION=OSX + - os: osx + env: ACTION=tvOS + - os: osx + env: ACTION=carthage + - os: osx + env: ACTION=oss-osx + language: objective-c osx_image: xcode7.2 -env: - - ACTION=lint - - ACTION=test-iOS - - ACTION=test-OSX - - ACTION=test-tvOS - - ACTION=test-carthage script: - - make $ACTION + - make install-$ACTION && make test-$ACTION diff --git a/CHANGELOG.md b/CHANGELOG.md index 87cc2cc..679b183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - Add universal framework support. This also adds watchOS support. [Keith Smiley](https://github.com/keith) [#20](https://github.com/lyft/mapper/pull/20) +- Add Swift package manager support + [Keith Smiley](https://github.com/keith) + [#22](https://github.com/lyft/mapper/pull/22) ## Bug Fixes diff --git a/Makefile b/Makefile index 9690b16..9c1a0f0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,27 @@ -lint: +# Install Tasks + +install-iOS: + true + +install-OSX: + true + +install-tvOS: + true + +install-lint: brew install https://raw.githubusercontent.com/Homebrew/homebrew/fffa4b271ba57c7633e8e24cae543a197a9e3e01/Library/Formula/swiftlint.rb + +install-carthage: + brew rm carthage || true + brew install https://raw.githubusercontent.com/Homebrew/homebrew/96664cb3befd42f933de07d9fc0f61e8756d86c3/Library/Formula/carthage.rb + +install-oss-osx: + curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/b07054552689910f79b3496221f7421a811f9f70/swiftenv-install.sh | bash + +# Run Tasks + +test-lint: swiftlint lint --strict 2>/dev/null test-iOS: @@ -29,10 +51,11 @@ test-tvOS: | xcpretty -ct test-carthage: - brew rm carthage || true - brew install https://raw.githubusercontent.com/Homebrew/homebrew/96664cb3befd42f933de07d9fc0f61e8756d86c3/Library/Formula/carthage.rb carthage build --no-skip-current ls Carthage/build/Mac/Mapper.framework ls Carthage/build/iOS/Mapper.framework ls Carthage/build/tvOS/Mapper.framework ls Carthage/build/watchOS/Mapper.framework + +test-oss-osx: + . ~/.swiftenv/init && swift build diff --git a/Mapper.xcodeproj/project.pbxproj b/Mapper.xcodeproj/project.pbxproj index 5277a12..7d51c26 100644 --- a/Mapper.xcodeproj/project.pbxproj +++ b/Mapper.xcodeproj/project.pbxproj @@ -3,26 +3,26 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 47; objects = { /* Begin PBXBuildFile section */ C201748E1BD5509D00E4FE18 /* Mapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C20174831BD5509D00E4FE18 /* Mapper.framework */; }; - C201749E1BD550C200E4FE18 /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C201749D1BD550C200E4FE18 /* Mapper.swift */; }; - C20174A01BD550F900E4FE18 /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C201749F1BD550F900E4FE18 /* Mappable.swift */; }; - C21A55D11BE7F1D6006B12E8 /* InitializerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C21A55D01BE7F1D6006B12E8 /* InitializerTests.swift */; }; - C233A2091BD98A870078125F /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C233A2081BD98A870078125F /* Errors.swift */; }; - C233A2571BD990140078125F /* Convertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = C233A2561BD990140078125F /* Convertible.swift */; }; - C233A25A1BD9903F0078125F /* NSURL+Convertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = C233A2591BD9903F0078125F /* NSURL+Convertible.swift */; }; - C2569A131BF3E87100A7CF10 /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2569A121BF3E87100A7CF10 /* Transform.swift */; }; - C2569A151BF3E88400A7CF10 /* Transform+Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2569A141BF3E88400A7CF10 /* Transform+Dictionary.swift */; }; - C2569A171BF3E8AB00A7CF10 /* TransformTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2569A161BF3E8AB00A7CF10 /* TransformTests.swift */; }; - C266A0CE1BD81901002A641F /* NormalValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0CD1BD81901002A641F /* NormalValueTests.swift */; }; - C266A0D01BD81908002A641F /* OptionalValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0CF1BD81908002A641F /* OptionalValueTests.swift */; }; - C266A0D21BD8190F002A641F /* MappableValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0D11BD8190F002A641F /* MappableValueTests.swift */; }; - C266A0D41BD81917002A641F /* ConvertibleValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0D31BD81917002A641F /* ConvertibleValueTests.swift */; }; - C266A0D61BD81928002A641F /* RawRepresentibleValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0D51BD81928002A641F /* RawRepresentibleValueTests.swift */; }; - C266A0D81BD81A62002A641F /* CustomTransformationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C266A0D71BD81A62002A641F /* CustomTransformationTests.swift */; }; + C2C036FA1C2B1A0B003FB853 /* Convertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F31C2B1A0B003FB853 /* Convertible.swift */; }; + C2C036FB1C2B1A0B003FB853 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F41C2B1A0B003FB853 /* Errors.swift */; }; + C2C036FC1C2B1A0B003FB853 /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F51C2B1A0B003FB853 /* Mappable.swift */; }; + C2C036FD1C2B1A0B003FB853 /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F61C2B1A0B003FB853 /* Mapper.swift */; }; + C2C036FE1C2B1A0B003FB853 /* NSURL+Convertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F71C2B1A0B003FB853 /* NSURL+Convertible.swift */; }; + C2C036FF1C2B1A0B003FB853 /* Transform+Dictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F81C2B1A0B003FB853 /* Transform+Dictionary.swift */; }; + C2C037001C2B1A0B003FB853 /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C036F91C2B1A0B003FB853 /* Transform.swift */; }; + C2C0370A1C2B1A14003FB853 /* ConvertibleValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037021C2B1A14003FB853 /* ConvertibleValueTests.swift */; }; + C2C0370B1C2B1A14003FB853 /* CustomTransformationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037031C2B1A14003FB853 /* CustomTransformationTests.swift */; }; + C2C0370C1C2B1A14003FB853 /* InitializerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037041C2B1A14003FB853 /* InitializerTests.swift */; }; + C2C0370D1C2B1A14003FB853 /* MappableValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037051C2B1A14003FB853 /* MappableValueTests.swift */; }; + C2C0370E1C2B1A14003FB853 /* NormalValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037061C2B1A14003FB853 /* NormalValueTests.swift */; }; + C2C0370F1C2B1A14003FB853 /* OptionalValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037071C2B1A14003FB853 /* OptionalValueTests.swift */; }; + C2C037101C2B1A14003FB853 /* RawRepresentibleValueTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037081C2B1A14003FB853 /* RawRepresentibleValueTests.swift */; }; + C2C037111C2B1A14003FB853 /* TransformTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2C037091C2B1A14003FB853 /* TransformTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,37 +37,29 @@ /* Begin PBXFileReference section */ C20174831BD5509D00E4FE18 /* Mapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Mapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C20174881BD5509D00E4FE18 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C201748D1BD5509D00E4FE18 /* MapperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - C20174941BD5509D00E4FE18 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C201749D1BD550C200E4FE18 /* Mapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Mapper.swift; sourceTree = ""; }; - C201749F1BD550F900E4FE18 /* Mappable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Mappable.swift; sourceTree = ""; }; - C2199C3E1C29EFE700292F9C /* UniversalFramework_Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Base.xcconfig; sourceTree = ""; }; - C2199C3F1C29EFE700292F9C /* UniversalFramework_Framework.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Framework.xcconfig; sourceTree = ""; }; - C2199C401C29EFE700292F9C /* UniversalFramework_Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Test.xcconfig; sourceTree = ""; }; - C21A55D01BE7F1D6006B12E8 /* InitializerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InitializerTests.swift; sourceTree = ""; }; - C233A2081BD98A870078125F /* Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = ""; }; - C233A2561BD990140078125F /* Convertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Convertible.swift; sourceTree = ""; }; - C233A2591BD9903F0078125F /* NSURL+Convertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSURL+Convertible.swift"; sourceTree = ""; }; - C2569A121BF3E87100A7CF10 /* Transform.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transform.swift; sourceTree = ""; }; - C2569A141BF3E88400A7CF10 /* Transform+Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Transform+Dictionary.swift"; sourceTree = ""; }; - C2569A161BF3E8AB00A7CF10 /* TransformTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransformTests.swift; sourceTree = ""; }; - C266A0CD1BD81901002A641F /* NormalValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalValueTests.swift; sourceTree = ""; }; - C266A0CF1BD81908002A641F /* OptionalValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OptionalValueTests.swift; sourceTree = ""; }; - C266A0D11BD8190F002A641F /* MappableValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MappableValueTests.swift; sourceTree = ""; }; - C266A0D31BD81917002A641F /* ConvertibleValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConvertibleValueTests.swift; sourceTree = ""; }; - C266A0D51BD81928002A641F /* RawRepresentibleValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawRepresentibleValueTests.swift; sourceTree = ""; }; - C266A0D71BD81A62002A641F /* CustomTransformationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTransformationTests.swift; sourceTree = ""; }; + C2C036D11C2B180D003FB853 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C2C036D41C2B180D003FB853 /* UniversalFramework_Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Base.xcconfig; sourceTree = ""; }; + C2C036D51C2B180D003FB853 /* UniversalFramework_Framework.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Framework.xcconfig; sourceTree = ""; }; + C2C036D61C2B180D003FB853 /* UniversalFramework_Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = UniversalFramework_Test.xcconfig; sourceTree = ""; }; + C2C036F31C2B1A0B003FB853 /* Convertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Convertible.swift; sourceTree = ""; }; + C2C036F41C2B1A0B003FB853 /* Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = ""; }; + C2C036F51C2B1A0B003FB853 /* Mappable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Mappable.swift; sourceTree = ""; }; + C2C036F61C2B1A0B003FB853 /* Mapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Mapper.swift; sourceTree = ""; }; + C2C036F71C2B1A0B003FB853 /* NSURL+Convertible.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSURL+Convertible.swift"; sourceTree = ""; }; + C2C036F81C2B1A0B003FB853 /* Transform+Dictionary.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Transform+Dictionary.swift"; sourceTree = ""; }; + C2C036F91C2B1A0B003FB853 /* Transform.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transform.swift; sourceTree = ""; }; + C2C037021C2B1A14003FB853 /* ConvertibleValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConvertibleValueTests.swift; sourceTree = ""; }; + C2C037031C2B1A14003FB853 /* CustomTransformationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomTransformationTests.swift; sourceTree = ""; }; + C2C037041C2B1A14003FB853 /* InitializerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InitializerTests.swift; sourceTree = ""; }; + C2C037051C2B1A14003FB853 /* MappableValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MappableValueTests.swift; sourceTree = ""; }; + C2C037061C2B1A14003FB853 /* NormalValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalValueTests.swift; sourceTree = ""; }; + C2C037071C2B1A14003FB853 /* OptionalValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OptionalValueTests.swift; sourceTree = ""; }; + C2C037081C2B1A14003FB853 /* RawRepresentibleValueTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawRepresentibleValueTests.swift; sourceTree = ""; }; + C2C037091C2B1A14003FB853 /* TransformTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransformTests.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - C201747F1BD5509D00E4FE18 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; C201748A1BD5509D00E4FE18 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -82,8 +74,9 @@ C20174791BD5509D00E4FE18 = { isa = PBXGroup; children = ( - C20174851BD5509D00E4FE18 /* Mapper */, - C20174911BD5509D00E4FE18 /* MapperTests */, + C2C036F21C2B1A0B003FB853 /* Sources */, + C2C037011C2B1A14003FB853 /* Tests */, + C2C036D01C2B180D003FB853 /* Resources */, C20174841BD5509D00E4FE18 /* Products */, ); sourceTree = ""; @@ -97,102 +90,62 @@ name = Products; sourceTree = ""; }; - C20174851BD5509D00E4FE18 /* Mapper */ = { - isa = PBXGroup; - children = ( - C233A2561BD990140078125F /* Convertible.swift */, - C233A2581BD990350078125F /* Convertibles */, - C233A2081BD98A870078125F /* Errors.swift */, - C201749F1BD550F900E4FE18 /* Mappable.swift */, - C201749D1BD550C200E4FE18 /* Mapper.swift */, - C266A0DA1BD81AC3002A641F /* Resources */, - C2569A111BF3E86500A7CF10 /* Transformations */, - ); - path = Mapper; - sourceTree = ""; - }; - C20174911BD5509D00E4FE18 /* MapperTests */ = { - isa = PBXGroup; - children = ( - C266A0D31BD81917002A641F /* ConvertibleValueTests.swift */, - C266A0D71BD81A62002A641F /* CustomTransformationTests.swift */, - C21A55D01BE7F1D6006B12E8 /* InitializerTests.swift */, - C266A0D11BD8190F002A641F /* MappableValueTests.swift */, - C266A0CD1BD81901002A641F /* NormalValueTests.swift */, - C266A0CF1BD81908002A641F /* OptionalValueTests.swift */, - C266A0D51BD81928002A641F /* RawRepresentibleValueTests.swift */, - C2569A161BF3E8AB00A7CF10 /* TransformTests.swift */, - C266A0D91BD81AA0002A641F /* Resources */, - ); - path = MapperTests; - sourceTree = ""; - }; - C2199C3C1C29EFE700292F9C /* xcconfigs */ = { - isa = PBXGroup; - children = ( - C2199C3E1C29EFE700292F9C /* UniversalFramework_Base.xcconfig */, - C2199C3F1C29EFE700292F9C /* UniversalFramework_Framework.xcconfig */, - C2199C401C29EFE700292F9C /* UniversalFramework_Test.xcconfig */, - ); - name = xcconfigs; - path = Mapper/Resources/xcconfigs; - sourceTree = SOURCE_ROOT; - }; - C233A2581BD990350078125F /* Convertibles */ = { + C2C036D01C2B180D003FB853 /* Resources */ = { isa = PBXGroup; children = ( - C233A2591BD9903F0078125F /* NSURL+Convertible.swift */, + C2C036D11C2B180D003FB853 /* Info.plist */, + C2C036D21C2B180D003FB853 /* xcconfigs */, ); - path = Convertibles; + path = Resources; sourceTree = ""; }; - C2569A111BF3E86500A7CF10 /* Transformations */ = { + C2C036D21C2B180D003FB853 /* xcconfigs */ = { isa = PBXGroup; children = ( - C2569A121BF3E87100A7CF10 /* Transform.swift */, - C2569A141BF3E88400A7CF10 /* Transform+Dictionary.swift */, + C2C036D41C2B180D003FB853 /* UniversalFramework_Base.xcconfig */, + C2C036D51C2B180D003FB853 /* UniversalFramework_Framework.xcconfig */, + C2C036D61C2B180D003FB853 /* UniversalFramework_Test.xcconfig */, ); - name = Transformations; + path = xcconfigs; sourceTree = ""; }; - C266A0D91BD81AA0002A641F /* Resources */ = { + C2C036F21C2B1A0B003FB853 /* Sources */ = { isa = PBXGroup; children = ( - C20174941BD5509D00E4FE18 /* Info.plist */, - C2199C3C1C29EFE700292F9C /* xcconfigs */, + C2C036F31C2B1A0B003FB853 /* Convertible.swift */, + C2C036F41C2B1A0B003FB853 /* Errors.swift */, + C2C036F51C2B1A0B003FB853 /* Mappable.swift */, + C2C036F61C2B1A0B003FB853 /* Mapper.swift */, + C2C036F71C2B1A0B003FB853 /* NSURL+Convertible.swift */, + C2C036F81C2B1A0B003FB853 /* Transform+Dictionary.swift */, + C2C036F91C2B1A0B003FB853 /* Transform.swift */, ); - path = Resources; + path = Sources; sourceTree = ""; }; - C266A0DA1BD81AC3002A641F /* Resources */ = { + C2C037011C2B1A14003FB853 /* Tests */ = { isa = PBXGroup; children = ( - C20174881BD5509D00E4FE18 /* Info.plist */, + C2C037021C2B1A14003FB853 /* ConvertibleValueTests.swift */, + C2C037031C2B1A14003FB853 /* CustomTransformationTests.swift */, + C2C037041C2B1A14003FB853 /* InitializerTests.swift */, + C2C037051C2B1A14003FB853 /* MappableValueTests.swift */, + C2C037061C2B1A14003FB853 /* NormalValueTests.swift */, + C2C037071C2B1A14003FB853 /* OptionalValueTests.swift */, + C2C037081C2B1A14003FB853 /* RawRepresentibleValueTests.swift */, + C2C037091C2B1A14003FB853 /* TransformTests.swift */, ); - path = Resources; + path = Tests; sourceTree = ""; }; /* End PBXGroup section */ -/* Begin PBXHeadersBuildPhase section */ - C20174801BD5509D00E4FE18 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - /* Begin PBXNativeTarget section */ C20174821BD5509D00E4FE18 /* Mapper */ = { isa = PBXNativeTarget; buildConfigurationList = C20174971BD5509D00E4FE18 /* Build configuration list for PBXNativeTarget "Mapper" */; buildPhases = ( C201747E1BD5509D00E4FE18 /* Sources */, - C201747F1BD5509D00E4FE18 /* Frameworks */, - C20174801BD5509D00E4FE18 /* Headers */, - C20174811BD5509D00E4FE18 /* Resources */, ); buildRules = ( ); @@ -209,7 +162,6 @@ buildPhases = ( C20174891BD5509D00E4FE18 /* Sources */, C201748A1BD5509D00E4FE18 /* Frameworks */, - C201748B1BD5509D00E4FE18 /* Resources */, ); buildRules = ( ); @@ -240,7 +192,7 @@ }; }; buildConfigurationList = C201747D1BD5509D00E4FE18 /* Build configuration list for PBXProject "Mapper" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 6.3"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -257,35 +209,18 @@ }; /* End PBXProject section */ -/* Begin PBXResourcesBuildPhase section */ - C20174811BD5509D00E4FE18 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C201748B1BD5509D00E4FE18 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ C201747E1BD5509D00E4FE18 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C233A25A1BD9903F0078125F /* NSURL+Convertible.swift in Sources */, - C201749E1BD550C200E4FE18 /* Mapper.swift in Sources */, - C2569A151BF3E88400A7CF10 /* Transform+Dictionary.swift in Sources */, - C233A2571BD990140078125F /* Convertible.swift in Sources */, - C233A2091BD98A870078125F /* Errors.swift in Sources */, - C2569A131BF3E87100A7CF10 /* Transform.swift in Sources */, - C20174A01BD550F900E4FE18 /* Mappable.swift in Sources */, + C2C036FF1C2B1A0B003FB853 /* Transform+Dictionary.swift in Sources */, + C2C036FE1C2B1A0B003FB853 /* NSURL+Convertible.swift in Sources */, + C2C036FD1C2B1A0B003FB853 /* Mapper.swift in Sources */, + C2C037001C2B1A0B003FB853 /* Transform.swift in Sources */, + C2C036FB1C2B1A0B003FB853 /* Errors.swift in Sources */, + C2C036FC1C2B1A0B003FB853 /* Mappable.swift in Sources */, + C2C036FA1C2B1A0B003FB853 /* Convertible.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -293,14 +228,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - C266A0D01BD81908002A641F /* OptionalValueTests.swift in Sources */, - C266A0D61BD81928002A641F /* RawRepresentibleValueTests.swift in Sources */, - C266A0CE1BD81901002A641F /* NormalValueTests.swift in Sources */, - C266A0D21BD8190F002A641F /* MappableValueTests.swift in Sources */, - C21A55D11BE7F1D6006B12E8 /* InitializerTests.swift in Sources */, - C266A0D41BD81917002A641F /* ConvertibleValueTests.swift in Sources */, - C2569A171BF3E8AB00A7CF10 /* TransformTests.swift in Sources */, - C266A0D81BD81A62002A641F /* CustomTransformationTests.swift in Sources */, + C2C0370C1C2B1A14003FB853 /* InitializerTests.swift in Sources */, + C2C0370D1C2B1A14003FB853 /* MappableValueTests.swift in Sources */, + C2C037101C2B1A14003FB853 /* RawRepresentibleValueTests.swift in Sources */, + C2C0370A1C2B1A14003FB853 /* ConvertibleValueTests.swift in Sources */, + C2C0370E1C2B1A14003FB853 /* NormalValueTests.swift in Sources */, + C2C0370B1C2B1A14003FB853 /* CustomTransformationTests.swift in Sources */, + C2C037111C2B1A14003FB853 /* TransformTests.swift in Sources */, + C2C0370F1C2B1A14003FB853 /* OptionalValueTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -401,14 +336,14 @@ }; C20174981BD5509D00E4FE18 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C2199C3F1C29EFE700292F9C /* UniversalFramework_Framework.xcconfig */; + baseConfigurationReference = C2C036D51C2B180D003FB853 /* UniversalFramework_Framework.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Mapper/Resources/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -421,14 +356,14 @@ }; C20174991BD5509D00E4FE18 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C2199C3F1C29EFE700292F9C /* UniversalFramework_Framework.xcconfig */; + baseConfigurationReference = C2C036D51C2B180D003FB853 /* UniversalFramework_Framework.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Mapper/Resources/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/Resources/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -440,9 +375,8 @@ }; C201749B1BD5509D00E4FE18 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C2199C401C29EFE700292F9C /* UniversalFramework_Test.xcconfig */; + baseConfigurationReference = C2C036D61C2B180D003FB853 /* UniversalFramework_Test.xcconfig */; buildSettings = { - INFOPLIST_FILE = MapperTests/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.Lyft.MapperTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -451,9 +385,8 @@ }; C201749C1BD5509D00E4FE18 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C2199C401C29EFE700292F9C /* UniversalFramework_Test.xcconfig */; + baseConfigurationReference = C2C036D61C2B180D003FB853 /* UniversalFramework_Test.xcconfig */; buildSettings = { - INFOPLIST_FILE = MapperTests/Resources/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.Lyft.MapperTests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/MapperTests/Resources/Info.plist b/MapperTests/Resources/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/MapperTests/Resources/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ModelMapper.podspec b/ModelMapper.podspec index bfc7300..27375e8 100644 --- a/ModelMapper.podspec +++ b/ModelMapper.podspec @@ -12,6 +12,6 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/lyft/mapper.git", :tag => s.version.to_s } s.requires_arc = true - s.source_files = "Mapper/**/*.swift" + s.source_files = "Sources/**/*.swift" s.module_name = "Mapper" end diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..2237d09 --- /dev/null +++ b/Package.swift @@ -0,0 +1,3 @@ +import PackageDescription + +let package = Package(name: "Mapper") diff --git a/Mapper/Resources/Info.plist b/Resources/Info.plist similarity index 100% rename from Mapper/Resources/Info.plist rename to Resources/Info.plist diff --git a/Mapper/Resources/xcconfigs/LICENSE b/Resources/xcconfigs/LICENSE similarity index 100% rename from Mapper/Resources/xcconfigs/LICENSE rename to Resources/xcconfigs/LICENSE diff --git a/Mapper/Resources/xcconfigs/UniversalFramework_Base.xcconfig b/Resources/xcconfigs/UniversalFramework_Base.xcconfig similarity index 100% rename from Mapper/Resources/xcconfigs/UniversalFramework_Base.xcconfig rename to Resources/xcconfigs/UniversalFramework_Base.xcconfig diff --git a/Mapper/Resources/xcconfigs/UniversalFramework_Framework.xcconfig b/Resources/xcconfigs/UniversalFramework_Framework.xcconfig similarity index 100% rename from Mapper/Resources/xcconfigs/UniversalFramework_Framework.xcconfig rename to Resources/xcconfigs/UniversalFramework_Framework.xcconfig diff --git a/Mapper/Resources/xcconfigs/UniversalFramework_Test.xcconfig b/Resources/xcconfigs/UniversalFramework_Test.xcconfig similarity index 100% rename from Mapper/Resources/xcconfigs/UniversalFramework_Test.xcconfig rename to Resources/xcconfigs/UniversalFramework_Test.xcconfig diff --git a/Mapper/Convertible.swift b/Sources/Convertible.swift similarity index 100% rename from Mapper/Convertible.swift rename to Sources/Convertible.swift diff --git a/Mapper/Errors.swift b/Sources/Errors.swift similarity index 100% rename from Mapper/Errors.swift rename to Sources/Errors.swift diff --git a/Mapper/Mappable.swift b/Sources/Mappable.swift similarity index 100% rename from Mapper/Mappable.swift rename to Sources/Mappable.swift diff --git a/Mapper/Mapper.swift b/Sources/Mapper.swift similarity index 100% rename from Mapper/Mapper.swift rename to Sources/Mapper.swift diff --git a/Mapper/Convertibles/NSURL+Convertible.swift b/Sources/NSURL+Convertible.swift similarity index 82% rename from Mapper/Convertibles/NSURL+Convertible.swift rename to Sources/NSURL+Convertible.swift index 263dec8..26c99c7 100644 --- a/Mapper/Convertibles/NSURL+Convertible.swift +++ b/Sources/NSURL+Convertible.swift @@ -9,7 +9,7 @@ import Foundation extension NSURL: Convertible { @warn_unused_result public static func fromMap(value: AnyObject?) throws -> NSURL { - if let string = value as? String, let URL = self.init(string: string) { + if let string = value as? String, let URL = NSURL(string: string) { return URL } diff --git a/Mapper/Transform+Dictionary.swift b/Sources/Transform+Dictionary.swift similarity index 100% rename from Mapper/Transform+Dictionary.swift rename to Sources/Transform+Dictionary.swift diff --git a/Mapper/Transform.swift b/Sources/Transform.swift similarity index 100% rename from Mapper/Transform.swift rename to Sources/Transform.swift diff --git a/MapperTests/ConvertibleValueTests.swift b/Tests/ConvertibleValueTests.swift similarity index 100% rename from MapperTests/ConvertibleValueTests.swift rename to Tests/ConvertibleValueTests.swift diff --git a/MapperTests/CustomTransformationTests.swift b/Tests/CustomTransformationTests.swift similarity index 100% rename from MapperTests/CustomTransformationTests.swift rename to Tests/CustomTransformationTests.swift diff --git a/MapperTests/InitializerTests.swift b/Tests/InitializerTests.swift similarity index 100% rename from MapperTests/InitializerTests.swift rename to Tests/InitializerTests.swift diff --git a/MapperTests/MappableValueTests.swift b/Tests/MappableValueTests.swift similarity index 100% rename from MapperTests/MappableValueTests.swift rename to Tests/MappableValueTests.swift diff --git a/MapperTests/NormalValueTests.swift b/Tests/NormalValueTests.swift similarity index 100% rename from MapperTests/NormalValueTests.swift rename to Tests/NormalValueTests.swift diff --git a/MapperTests/OptionalValueTests.swift b/Tests/OptionalValueTests.swift similarity index 100% rename from MapperTests/OptionalValueTests.swift rename to Tests/OptionalValueTests.swift diff --git a/MapperTests/RawRepresentibleValueTests.swift b/Tests/RawRepresentibleValueTests.swift similarity index 100% rename from MapperTests/RawRepresentibleValueTests.swift rename to Tests/RawRepresentibleValueTests.swift diff --git a/MapperTests/TransformTests.swift b/Tests/TransformTests.swift similarity index 100% rename from MapperTests/TransformTests.swift rename to Tests/TransformTests.swift