Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cats-oss/Unio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.6.0
Choose a base ref
...
head repository: cats-oss/Unio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Oct 25, 2019

  1. Copy the full SHA
    16f9bb7 View commit details
  2. update Package.swift

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    575653b View commit details
  3. update podspec

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    23be607 View commit details
  4. fix macOS build

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    016c29e View commit details
  5. update README

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    00ed1c9 View commit details
  6. fix Unio.xcodeproj

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    7bb414c View commit details
  7. Copy the full SHA
    2b93a5f View commit details
  8. remove RxCocoa from test

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    9536d50 View commit details
  9. fix runpath for test

    marty-suzuki committed Oct 25, 2019
    Copy the full SHA
    4edcb98 View commit details
  10. Merge pull request #15 from cats-oss/multi-platform

    Support tvOS, watchOS and macOS
    marty-suzuki authored Oct 25, 2019
    Copy the full SHA
    a92b299 View commit details

Commits on Nov 19, 2019

  1. Copy the full SHA
    aae0b64 View commit details
  2. Merge pull request #16 from akkyie/add-any

    Add UnioStreamType and AnyUnioStream
    akkyie authored Nov 19, 2019
    Copy the full SHA
    7504a0e View commit details
  3. Release 0.8.0

    akkyie committed Nov 19, 2019
    Copy the full SHA
    1f7af46 View commit details
  4. Merge pull request #17 from cats-oss/release-0.8.0

    Release 0.8.0
    akkyie authored Nov 19, 2019
    Copy the full SHA
    d4cb879 View commit details

Commits on Jan 25, 2020

  1. Add AnyLogicBasedStream

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    af1a66c View commit details
  2. Add SR12081 namespace

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    74519ce View commit details
  3. Fix example

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    63d92df View commit details
  4. Fix test case

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    e0fb72c View commit details
  5. Add SR12081Tests

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    5858fbf View commit details
  6. Update podspec

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    7958c8f View commit details
  7. Copy the full SHA
    7edff6e View commit details
  8. Update README

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    0bc4805 View commit details
  9. Update xctemplates

    marty-suzuki committed Jan 25, 2020
    Copy the full SHA
    021c2bf View commit details

Commits on Jan 29, 2020

  1. Add deprecated attribute

    marty-suzuki committed Jan 29, 2020
    Copy the full SHA
    1926f44 View commit details
  2. Copy the full SHA
    442bdea View commit details
  3. Merge pull request #18 from cats-oss/update-podspec

    Update podspec
    marty-suzuki authored Jan 29, 2020
    Copy the full SHA
    3f59358 View commit details
  4. Merge pull request #19 from cats-oss/add-workaround

    Add workaround for SR-12081
    marty-suzuki authored Jan 29, 2020
    Copy the full SHA
    b90925c View commit details

Commits on Mar 16, 2020

  1. Add Computed

    marty-suzuki committed Mar 16, 2020
    Copy the full SHA
    6acbd29 View commit details

Commits on Mar 25, 2020

  1. Copy the full SHA
    8544e0c View commit details
  2. Use inlinable

    marty-suzuki committed Mar 25, 2020
    Copy the full SHA
    cd5d73b View commit details
  3. Fix attributes

    marty-suzuki committed Mar 25, 2020
    Copy the full SHA
    1a36a0b View commit details
  4. Merge pull request #21 from cats-oss/make-deprecated

    Deprecate some methods
    marty-suzuki authored Mar 25, 2020
    Copy the full SHA
    b48e8bf View commit details
  5. Merge pull request #20 from cats-oss/feature-computed

    Add Computed
    marty-suzuki authored Mar 25, 2020
    Copy the full SHA
    09621bf View commit details

Commits on Apr 3, 2020

  1. Copy the full SHA
    429aa50 View commit details
  2. Copy the full SHA
    d3d9371 View commit details

Commits on May 8, 2020

  1. Merge pull request #22 from tomokitakahashi/fix-typo

    Fix Example Test
    marty-suzuki authored May 8, 2020
    Copy the full SHA
    6986ab3 View commit details
  2. Update README

    marty-suzuki committed May 8, 2020
    Copy the full SHA
    173487b View commit details

Commits on Jan 5, 2021

  1. Bump up version to 6

    funzin committed Jan 5, 2021
    Copy the full SHA
    5a93d8a View commit details

Commits on Feb 1, 2021

  1. Merge pull request #23 from funzin/support-rxswift6

    Support RxSwift6
    marty-suzuki authored Feb 1, 2021
    Copy the full SHA
    0a366f3 View commit details
  2. Update Package.swift

    marty-suzuki committed Feb 1, 2021
    Copy the full SHA
    633c9cb View commit details
  3. Update podspec

    marty-suzuki committed Feb 1, 2021
    Copy the full SHA
    533b15a View commit details
  4. Update README

    marty-suzuki committed Feb 1, 2021
    Copy the full SHA
    eb5e5d6 View commit details
  5. Update .travis.yml

    marty-suzuki committed Feb 1, 2021
    Copy the full SHA
    1721c34 View commit details
  6. Copy the full SHA
    beec460 View commit details
  7. Merge pull request #24 from cats-oss/rxswfit6

    Update Package.swfit and Unio.podspec
    marty-suzuki authored Feb 1, 2021
    Copy the full SHA
    2e902bb View commit details
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
language: objective-c
os: osx
osx_image: xcode11
osx_image: xcode12.2
env:
- CI_USE_SWIFTPM=true
- CI_USE_SWIFTPM=false
before_install:
- gem install xcpretty
- |
if ! $CI_USE_SWIFTPM ; then
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
export XCODE_XCCONFIG_FILE="$xcconfig"
carthage update --no-use-binaries --platform ios
fi
before_script:
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 5.0
github "ReactiveX/RxSwift" ~> 6.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "5.0.1"
github "ReactiveX/RxSwift" "6.0.0"
67 changes: 67 additions & 0 deletions Documentation/Unio0_9_0MigrationGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Unio 0.9.0 Migration Guide

Unio 0.9.0 introduces some breaking changes.

Those changes are related [SR-12081](https://bugs.swift.org/browse/SR-12081).

## Classes

- [ADD] `AnyLogicBasedStream<Input: InputType, Output: OutputType>`

## Typealias

- [REPLACE] `typealias UnioStream<Logic: LogicType> = PrimitiveStream<Logic> & LogicType` -> `typealias UnioStream<Logic: LogicType> = AnyLogicBasedStream<Logic.Input, Logic.Output> & LogicType`

## Note

- Previous `UnioStream<Logic: LogicType>` (less than 0.8.0) had `init(input: Input, state: State, extra: Extra)` as the designated initializer. Current `UnioStream<Logic: LogicType>` (greater than 0.9.0) also has `init(input: Input, state: State, extra: Extra)` but it is the convenience initializer. So, you should fix initializers like that.

Before
```swift
init(extra: Extra) {
super.init(input: Input(), state: State(), extra: extra)
}
```

After
```swift
convenience init(extra: Extra) {
self.init(input: Input(), state: State(), extra: extra)
}
```

If you defined some properties in UnioStream subclasses, you must change initializers to like that.

Before
```swift
class NumberStream: UnioStream<NumberStream> {
let number: Int

init(number: Int, extra: Extra) {
self.number = number
super.init(input: Input(), state: State(), extra: extra)
}
}
```

After
```swift
class NumberStream: UnioStream<NumberStream> {
let number: Int

init(number: Int, extra: Extra) {
self.number = number
super.init(input: Input(), state: State(), extra: extra, logic: NumberStream.self)
}

@available(*, unavailable)
init<Logic: LogicType>(input: Logic.Input,
state: Logic.State,
extra: Logic.Extra,
logic _: Logic.Type) where Input == Logic.Input, Output == Logic.Output {
fatalError("could not be called anymore")
}
}
```

- If you want to use existing UnioStream initializer (less than 0.8.0), please define `typealise UnioSteram<Logic: LogicType> = SR12081.UnioSteram<Logic>` in your Application Target.
3 changes: 3 additions & 0 deletions Example/UnioSample/GitHub.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
//

import Foundation
import Unio

enum GitHub {

@@ -20,3 +21,5 @@ enum GitHub {
let htmlUrl: URL
}
}

typealias UnioStream<Logic: LogicType> = SR12081.UnioStream<Logic>
4 changes: 2 additions & 2 deletions Example/UnioSampleTests/GitHubSearchLogicStreamTests.swift
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ final class GitHubSearchLogicStreamTests: XCTestCase {
dependency = Dependency()
}

func testOutput_recieving_repositories() {
func testOutput_receiving_repositories() {

let expected = GitHub.Repository(name: "test-name",
fullName: "test-full-name",
@@ -41,7 +41,7 @@ final class GitHubSearchLogicStreamTests: XCTestCase {
disposable.dispose()
}

func testOutput_recieving_error() {
func testOutput_receiving_error() {

let expected = NSError(domain: "test-domain", code: 1234, userInfo: nil)

4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "b3e888b4972d9bc76495dd74d30a8c7fad4b9395",
"version": "5.0.1"
"revision": "c8742ed97fc2f0c015a5ea5eddefb064cd7532d2",
"version": "6.0.0"
}
}
]
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@ import PackageDescription

let package = Package(
name: "Unio",
platforms: [.iOS(.v9)],
platforms: [.macOS(.v10_10), .iOS(.v9), .tvOS(.v10), .watchOS(.v3)],
products: [
.library(name: "Unio",
targets: ["Unio"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0")
.package(url: "https://github.com/ReactiveX/RxSwift.git", from: "6.0.0")
],
targets: [
.target(name: "Unio",
58 changes: 45 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,21 +5,26 @@
<strong>Un</strong>idirectional <strong>I</strong>nput <strong>O</strong>utput framework
</p>
<p align='center'>
<a href='https://github.com/Carthage/Carthage'>
<img src='https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat' alt='Carthage compatible' />
</a>
<a href='https://travis-ci.org/cats-oss/Unio'>
<img src='https://travis-ci.org/cats-oss/Unio.svg?branch=master' alt='Build Status' />
</a>
<a href='https://cocoapods.org/pods/Unio'>
<img src='https://img.shields.io/cocoapods/v/Unio.svg?style=flat' alt='Version' />
</a>

<a href='https://cocoapods.org/pods/Unio'>
<img src='https://img.shields.io/cocoapods/l/Unio.svg?style=flat' alt='License' />
</a>
<a href='https://cocoapods.org/pods/Unio'>
<img src='https://img.shields.io/cocoapods/p/Unio.svg?style=flat' alt='Platform' />
</a>
<br/>
<a href='https://github.com/Carthage/Carthage'>
<img src='https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat' alt='Carthage compatible' />
</a>
<a href='https://cocoapods.org/pods/Unio'>
<img src='https://img.shields.io/cocoapods/v/Unio.svg?style=flat' alt='Version' />
</a>
<a href='https://swift.org/package-manager/'>
<img src='https://img.shields.io/badge/Swift%20Package%20Manager-compatible-4BC51D.svg?style=flat' alt='Carthage compatible' />
</a>
</p>

## Introduction
@@ -135,6 +140,21 @@ let t: ThrowableProperty<Bool> = output.isEnabled
try? t.throwableValue()
```

If a property is defined as `Computed`, be able to access computed value.

```swift
struct Output: OutputType {
let isEnabled: Computed<Bool>
}

var _isEnabled = false
let output = OutputWrapper(.init(isEnabled: Computed<Bool> { _isEnabled }))

output.isEnabled // false
_isEnabled = true
output.isEnabled // true
```

![](https://user-images.githubusercontent.com/2082134/64858314-f7dae380-d661-11e9-9a79-3ca5c53fd90a.png)

### State
@@ -153,7 +173,7 @@ The rule of Extra is having other dependencies of [UnioStream](#uniostream).

```swift
struct Extra: ExtraType {
let apiStream: GitHubSearchAPIStream()
let apiStream: GitHubSearchAPIStream
}
```

@@ -222,10 +242,10 @@ class PrimitiveStream<Logic: LogicType> {
Be able to define a subclass of UnioStream like this.

```swift
fianl class GitHubSearchViewStream: UnioStream<GitHubSearchViewStream> {
final class GitHubSearchViewStream: UnioStream<GitHubSearchViewStream> {

init() {
super.init(input: Input(), state: State(), extra: Extra())
convenience init() {
self.init(input: Input(), state: State(), extra: Extra())
}
}
```
@@ -246,8 +266,8 @@ protocol GitHubSearchViewStreamType: AnyObject {

final class GitHubSearchViewStream: UnioStream<GitHubSearchViewStream>, GitHubSearchViewStreamType {

init() {
super.init(input: Input(), state: State(), extra: Extra())
convenience init() {
self.init(input: Input(), state: State(), extra: Extra())
}

typealias State = NoState
@@ -314,6 +334,7 @@ The documentation which does not use `KeyPath Dynamic Member Lookup` is [here](h

- [Unio 0.5.0 Migration Guide](./Documentation/Unio0_5_0MigrationGuide.md)
- [Unio 0.6.0 Migration Guide](./Documentation/Unio0_6_0MigrationGuide.md)
- [Unio 0.9.0 Migration Guide](./Documentation/Unio0_9_0MigrationGuide.md)

### Xcode Template

@@ -343,11 +364,22 @@ it, simply add the following line to your Podfile:
pod "Unio"
```

### Swift Package Manager

Simply add the following line to your `Package.swift`:

```
.package(url: "https://github.com/cats-oss/Unio.git", from: "version")
```

## Requirements

- Swift 5 or greater
- iOS 9.0 or greater
- [RxSwift](https://github.com/ReactiveX/RxSwift) 5.0 or greater
- tvOS 10.0 or greater
- watchOS 3.0 or greater
- macOS 10.10 or greater
- [RxSwift](https://github.com/ReactiveX/RxSwift) 6.0 or greater

## License

Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@ protocol ___VARIABLE_productName___ViewStreamType: AnyObject {

final class ___VARIABLE_productName___ViewStream: UnioStream<___VARIABLE_productName___ViewStream>, ___VARIABLE_productName___ViewStreamType {

init(extra: Extra = .init()) {
super.init(input: Input(),
state: State(),
extra: extra)
convenience init(extra: Extra = .init()) {
self.init(input: Input(),
state: State(),
extra: extra)
}
}

8 changes: 4 additions & 4 deletions Tools/UnioStream.xctemplate/___FILEBASENAME___Stream.swift
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@ protocol ___VARIABLE_productName___StreamType: AnyObject {

final class ___VARIABLE_productName___Stream: UnioStream<___VARIABLE_productName___Stream>, ___VARIABLE_productName___StreamType {

init(extra: Extra = .init()) {
super.init(input: Input(),
state: State(),
extra: extra)
convenience init(extra: Extra = .init()) {
self.init(input: Input(),
state: State(),
extra: extra)
}
}

12 changes: 9 additions & 3 deletions Unio.podspec
Original file line number Diff line number Diff line change
@@ -7,16 +7,22 @@
#

Pod::Spec.new do |s|
last_commit = `git rev-list --tags --max-count=1`.strip
last_tag = `git describe --tags #{last_commit}`.strip

s.name = "Unio"
s.version = "0.6.0"
s.version = last_tag
s.summary = "KeyPath based Unidirectionarl Input / Output framework with RxSwift."
s.homepage = "https://github.com/cats-oss/Unio"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Taiki Suzuki" => "suzuki_taiki@cyberagent.co.jp" }
s.ios.deployment_target = "9.0"
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'
s.source = { :git => "https://github.com/cats-oss/Unio.git", :tag => "#{s.version}" }
s.source_files = "Unio/**/*.{swift}"
s.dependency 'RxSwift', '~> 5.0'
s.dependency 'RxRelay', '~> 5.0'
s.dependency 'RxSwift', '~> 6.0'
s.dependency 'RxRelay', '~> 6.0'
s.swift_version = '5.0'
end
Loading