Skip to content

Commit

Permalink
Merge pull request #11 from OhKanghoon/feature/lets-swift-5
Browse files Browse the repository at this point in the history
Let's Swift 5
  • Loading branch information
OhKanghoon authored May 19, 2019
2 parents c5effbc + f55d8ad commit 65c0e66
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 73 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ cache: cocoapods
podfile: Example/Podfile

before_install:
- gem install cocoapods
- pod install --repo-update --project-directory=Example
- gem install cocoapods
- pod install --repo-update --project-directory=Example

before_script:
- set -o pipefail

script:
- xcodebuild clean build test
-workspace Example/RxDataSources-Texture.xcworkspace
-scheme RxDataSources-Texture-Example
-sdk iphonesimulator
-destination 'platform=iOS Simulator,name=iPhone 8,OS=12.2'
-configuration Debug
-enableCodeCoverage YES
CODE_SIGNING_REQUIRED=NO | xcpretty
- xcodebuild clean build test
-workspace Example/RxDataSources-Texture.xcworkspace
-scheme RxDataSources-Texture-Example
-sdk iphonesimulator
-destination 'platform=iOS Simulator,name=iPhone 8,OS=12.2'
-configuration Debug
-enableCodeCoverage YES
CODE_SIGNING_REQUIRED=NO | xcpretty
82 changes: 48 additions & 34 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Alamofire (4.8.1)
- Differentiator (3.1.0)
- Alamofire (4.8.2)
- Differentiator (4.0.1)
- PINCache (3.0.1-beta.6):
- PINCache/Arc-exception-safe (= 3.0.1-beta.6)
- PINCache/Core (= 3.0.1-beta.6)
Expand All @@ -16,31 +16,45 @@ PODS:
- PINRemoteImage/PINCache (3.0.0-beta.13):
- PINCache (= 3.0.1-beta.6)
- PINRemoteImage/Core
- RxAlamofire (4.3.0):
- RxAlamofire/Core (= 4.3.0)
- RxAlamofire/Core (4.3.0):
- Alamofire (~> 4.5)
- RxSwift (~> 4)
- RxAtomic (4.4.1)
- RxCocoa (4.4.1):
- RxSwift (~> 4.0)
- RxDataSources-Texture (1.1.2):
- Differentiator (~> 3.0)
- RxCocoa (~> 4.0)
- RxSwift (~> 4.0)
- Texture (~> 2.7)
- RxOptional (3.6.2):
- RxCocoa (~> 4.0)
- RxSwift (~> 4.0)
- RxSwift (4.4.1):
- RxAtomic (~> 4.4)
- Texture (2.7):
- Texture/PINRemoteImage (= 2.7)
- Texture/Core (2.7)
- Texture/PINRemoteImage (2.7):
- RxAlamofire (5.0.0):
- RxAlamofire/Core (= 5.0.0)
- RxAlamofire/Core (5.0.0):
- Alamofire (~> 4.8)
- RxSwift (~> 5.0)
- RxCocoa (5.0.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxDataSources-Texture (1.2.0):
- Differentiator (~> 4.0)
- RxCocoa (~> 5.0)
- RxSwift (~> 5.0)
- Texture (>= 2.7)
- RxOptional (4.0.0):
- RxCocoa (~> 5)
- RxSwift (~> 5)
- RxRelay (5.0.0):
- RxSwift (~> 5)
- RxSwift (5.0.0)
- Texture (2.8.1):
- Texture/AssetsLibrary (= 2.8.1)
- Texture/Core (= 2.8.1)
- Texture/MapKit (= 2.8.1)
- Texture/Photos (= 2.8.1)
- Texture/PINRemoteImage (= 2.8.1)
- Texture/Video (= 2.8.1)
- Texture/AssetsLibrary (2.8.1):
- Texture/Core
- Texture/Core (2.8.1)
- Texture/MapKit (2.8.1):
- Texture/Core
- Texture/Photos (2.8.1):
- Texture/Core
- Texture/PINRemoteImage (2.8.1):
- PINRemoteImage/iOS (= 3.0.0-beta.13)
- PINRemoteImage/PINCache
- Texture/Core
- Texture/Video (2.8.1):
- Texture/Core

DEPENDENCIES:
- Alamofire
Expand All @@ -56,9 +70,9 @@ SPEC REPOS:
- PINOperation
- PINRemoteImage
- RxAlamofire
- RxAtomic
- RxCocoa
- RxOptional
- RxRelay
- RxSwift
- Texture

Expand All @@ -67,18 +81,18 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Alamofire: 16ce2c353fb72865124ddae8a57c5942388f4f11
Differentiator: be49ca3408f0ecfc761e4c7763d20c62be01b9ad
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
Differentiator: 886080237d9f87f322641dedbc5be257061b0602
PINCache: d195fdba255283f7e9900a55e3cced377f431f9b
PINOperation: a6219e6fc9db9c269eb7a7b871ac193bcf400aac
PINRemoteImage: d6d51c5d2adda55f1ce30c96e850b6c4ebd2856a
RxAlamofire: 09624d0f2d48ed8b686e4eb4cf68e28cbd2df556
RxAtomic: f8d6adc1ccb87a767811269e4875887bc74dbf19
RxCocoa: 2f35a76bf8887872e28a1914112395b11b8e0e64
RxDataSources-Texture: 612f1ad54047d9719a7b4c4fa77dbc4b36752710
RxOptional: 80426a0ddbd092573e4c482d8cc13302078c4d5e
RxSwift: 92fcf68dfef21f3e2ab1965363d9e7b3d787597e
Texture: 9d7e38965cf22ccd7cd9c249dd78b3f14e70ab6c
RxAlamofire: e7875a012aff55345672d0f70a2a9cd6aeb0f211
RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8
RxDataSources-Texture: f849e46f05f3f45353e1a117bfc52712851420e0
RxOptional: 9904e2219d59260c3c171273d475b2126de187e8
RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f
Texture: 8ecf6984065a1e54f06bf97b349ecca28582acd7

PODFILE CHECKSUM: 55960a52eca44401f7df8ec6524ef7d4a4d70186

Expand Down
17 changes: 9 additions & 8 deletions Example/RxDataSources-Texture.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -369,10 +370,10 @@
"${BUILT_PRODUCTS_DIR}/PINOperation/PINOperation.framework",
"${BUILT_PRODUCTS_DIR}/PINRemoteImage/PINRemoteImage.framework",
"${BUILT_PRODUCTS_DIR}/RxAlamofire/RxAlamofire.framework",
"${BUILT_PRODUCTS_DIR}/RxAtomic/RxAtomic.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxDataSources-Texture/RxDataSources_Texture.framework",
"${BUILT_PRODUCTS_DIR}/RxOptional/RxOptional.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/Texture/AsyncDisplayKit.framework",
);
Expand All @@ -386,10 +387,10 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINOperation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PINRemoteImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAlamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAtomic.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxDataSources_Texture.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxOptional.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AsyncDisplayKit.framework",
);
Expand Down Expand Up @@ -497,7 +498,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -543,7 +544,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -559,7 +560,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -574,7 +575,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -595,7 +596,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RxDataSources-Texture_Example.app/RxDataSources-Texture_Example";
};
name = Debug;
Expand All @@ -613,7 +614,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RxDataSources-Texture_Example.app/RxDataSources-Texture_Example";
};
name = Release;
Expand Down
6 changes: 2 additions & 4 deletions Example/RxDataSources-Texture/GithubService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ final class GithubService: GithubServiceProtocol {
.validate(statusCode: 200..<300)
.responseData()
.debug()
.map { $0.1 }
.flatMap { data -> Observable<[Repo]> in
.map { (_, data) -> [Repo] in
let decoder = JSONDecoder()
let object = try decoder.decode([Repo].self, from: data)
return Observable.just(object)
return try decoder.decode([Repo].self, from: data)
}.asSingle()
}
}
4 changes: 2 additions & 2 deletions Example/RxDataSources-Texture/RepoCellNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ final class RepoCellNode: ASCellNode {
titleNode])
switch type {
case .collection:
contentStackSpec.style.width = ASDimension.init(unit: .points,
value: constrainedSize.max.width / 2 - 1)
contentStackSpec.style.width = .init(unit: .points,
value: constrainedSize.max.width / 2 - 1)
default: break
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class RepoCollectionViewController: ASViewController<ASDisplayNode> {
.disposed(by: disposeBag)

collectionNode.rx.willBeginBatchFetch
.asObservable()
.do(onNext: { [weak self] context in
self?.batchContext = context
}).map { _ in return }
Expand All @@ -98,7 +97,8 @@ class RepoCollectionViewController: ASViewController<ASDisplayNode> {
// MARK: - LayoutSpec

func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec {
return ASInsetLayoutSpec(insets: node.safeAreaInsets, child: collectionNode)
return ASInsetLayoutSpec(insets: node.safeAreaInsets,
child: collectionNode)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/RxDataSources-Texture/RepoViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import AsyncDisplayKit
import RxSwift
import RxCocoa
import RxRelay

final class RepoViewModel {

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ To run the example project, clone the repo, and run `pod install` from the Examp

## Requirements

- Swift 4.2
- [RxSwift](https://github.com/ReactiveX/RxSwift) (~> 4.0)
- [RxCocoa](https://github.com/ReactiveX/RxSwift/tree/master/RxCocoa) (~> 4.0)
- Differentiator (~> 3.0)
- [Texture](https://github.com/TextureGroup/Texture) (~> 2.7)
- Swift 5
- [RxSwift](https://github.com/ReactiveX/RxSwift) (~> 5.0)
- [RxCocoa](https://github.com/ReactiveX/RxSwift/tree/master/RxCocoa) (~> 5.0)
- Differentiator (~> 4.0)
- [Texture](https://github.com/TextureGroup/Texture) (>= 2.7)

## Installation

RxDataSources-Texture is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'RxDataSources-Texture', '~> 1.1.2'
pod 'RxDataSources-Texture', '~> 1.2.0'
```

## Author
Expand Down
11 changes: 6 additions & 5 deletions RxDataSources-Texture.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'RxDataSources-Texture'
s.version = '1.1.2'
s.version = '1.2.0'
s.summary = 'RxDataSources With Texture'
s.description = <<-DESC
This is a collection of reactive data sources for ASTableNode and ASCollectionNode
Expand All @@ -20,11 +20,12 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '9.0'
s.requires_arc = true
s.swift_version = '5.0'

s.source_files = 'RxDataSources-Texture/Classes/**/*'

s.dependency 'RxSwift', '~> 4.0'
s.dependency 'RxCocoa', '~> 4.0'
s.dependency 'Differentiator', '~> 3.0'
s.dependency 'Texture', '~> 2.7'
s.dependency 'RxSwift', '~> 5.0'
s.dependency 'RxCocoa', '~> 5.0'
s.dependency 'Differentiator', '~> 4.0'
s.dependency 'Texture', '>= 2.7'
end

0 comments on commit 65c0e66

Please sign in to comment.