Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Add swift package manager support #22

Merged
merged 1 commit into from
Jan 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
*.xcuserstate
._*
.AppleDouble
.build/
.DS_Store
.LSOverride
build/
Carthage/Build
DerivedData
Icon
run-tests
xcuserdata
Expand Down
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift-2.2-SNAPSHOT-2015-12-22-a
23 changes: 16 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
29 changes: 26 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
243 changes: 88 additions & 155 deletions Mapper.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions MapperTests/Resources/Info.plist

This file was deleted.

2 changes: 1 addition & 1 deletion ModelMapper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PackageDescription

let package = Package(name: "Mapper")
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
File renamed without changes.