Skip to content

Commit

Permalink
Complete transition from Units terminology to Traits.
Browse files Browse the repository at this point in the history
Renaming RxSwift/Units to RxSwift/Traits and RxCocoa/CocoaUnits to
RxCocoa/Traits.
  • Loading branch information
freak4pc authored and kzaher committed Apr 4, 2017
1 parent 6e18903 commit a87a6c5
Show file tree
Hide file tree
Showing 41 changed files with 59 additions and 57 deletions.
42 changes: 21 additions & 21 deletions .jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,30 +179,10 @@ custom_categories:
- ReplaySubject
- SubjectType
- Variable
- name: RxSwift/Units
- name: RxSwift/Traits
children:
- PrimitiveSequence+Zip+arity
- PrimitiveSequence
- name: RxCocoa/CocoaUnits
children:
- ControlEvent
- ControlProperty
- UIBindingObserver
- name: RxCocoa/CocoaUnits/Driver
children:
- ControlEvent+Driver
- ControlProperty+Driver
- Driver+Subscription
- Driver
- ObservableConvertibleType+Driver
- Variable+Driver
- name: RxCocoa/CocoaUnits/SharedSequence
children:
- ObservableConvertibleType+SharedSequence
- SharedSequence+Operators+arity
- SharedSequence+Operators
- SharedSequence
- Variable+SharedSequence
- name: RxCocoa/Common
children:
- ControlTarget
Expand Down Expand Up @@ -301,3 +281,23 @@ custom_categories:
- name: RxCocoa/Platform
children:
- DispatchQueue+Extensions
- name: RxCocoa/Traits
children:
- ControlEvent
- ControlProperty
- UIBindingObserver
- name: RxCocoa/Traits/Driver
children:
- ControlEvent+Driver
- ControlProperty+Driver
- Driver+Subscription
- Driver
- ObservableConvertibleType+Driver
- Variable+Driver
- name: RxCocoa/Traits/SharedSequence
children:
- ObservableConvertibleType+SharedSequence
- SharedSequence+Operators+arity
- SharedSequence+Operators
- SharedSequence
- Variable+SharedSequence
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.

## Master

* Rename Units as Traits and update the documentation for Single, Completable & Maybe.
* Deprecates `bindTo` in favor of `bind(to:)`.
* Adds [`materialize()`](http://reactivex.io/documentation/operators/materialize-dematerialize.html) operator

Expand Down
3 changes: 2 additions & 1 deletion Documentation/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ This project tries to be consistent with [ReactiveX.io](http://reactivex.io/). T
1. [UI layer tips](#ui-layer-tips)
1. [Making HTTP requests](#making-http-requests)
1. [RxDataSources](#rxdatasources)
1. [Driver](Units.md#driver-unit)
1. [Driver](Traits.md#driver)
1. [Traits: Driver, Single, Maybe, Completable](Traits.md)
1. [Examples](Examples.md)

# Observables aka Sequences
Expand Down
12 changes: 6 additions & 6 deletions Rx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,7 @@
C8093CB41B8A72BE0088E94D /* Schedulers */,
C8093CBD1B8A72BE0088E94D /* Subjects */,
C85106851C2D54B70075150C /* Extensions */,
C81A09851E6C701700900B3B /* Units */,
C81A09851E6C701700900B3B /* Traits */,
C8093C661B8A72BE0088E94D /* Info.plist */,
C81A09801E6C6B2400900B3B /* Deprecated.swift */,
);
Expand Down Expand Up @@ -2407,7 +2407,7 @@
C89AB2781DAACE490065FBE6 /* RxCocoa.h */,
C89AB2261DAAC33F0065FBE6 /* RxCocoa.swift */,
C8A81C9E1E05E82C0008DEF4 /* Platform */,
C89AB1AA1DAAC3350065FBE6 /* CocoaUnits */,
C89AB1AA1DAAC3350065FBE6 /* Traits */,
C8093E811B8A732E0088E94D /* Common */,
C89AB1BC1DAAC3350065FBE6 /* Foundation */,
C88253EE1B8A752B00B02D69 /* iOS */,
Expand Down Expand Up @@ -2450,14 +2450,14 @@
path = RxBlocking;
sourceTree = "<group>";
};
C81A09851E6C701700900B3B /* Units */ = {
C81A09851E6C701700900B3B /* Traits */ = {
isa = PBXGroup;
children = (
C81A09861E6C702700900B3B /* PrimitiveSequence.swift */,
C89814751E75A18A0035949C /* PrimitiveSequence+Zip+arity.tt */,
C89814771E75A7D70035949C /* PrimitiveSequence+Zip+arity.swift */,
);
path = Units;
path = Traits;
sourceTree = "<group>";
};
C81B6AA71DB2C15C0047CF86 /* Platform */ = {
Expand Down Expand Up @@ -2829,7 +2829,7 @@
path = Proxies;
sourceTree = "<group>";
};
C89AB1AA1DAAC3350065FBE6 /* CocoaUnits */ = {
C89AB1AA1DAAC3350065FBE6 /* Traits */ = {
isa = PBXGroup;
children = (
C89AB1AB1DAAC3350065FBE6 /* ControlEvent.swift */,
Expand All @@ -2838,7 +2838,7 @@
C89AB1B41DAAC3350065FBE6 /* SharedSequence */,
C89AB1BB1DAAC3350065FBE6 /* UIBindingObserver.swift */,
);
path = CocoaUnits;
path = Traits;
sourceTree = "<group>";
};
C89AB1AD1DAAC3350065FBE6 /* Driver */ = {
Expand Down
2 changes: 1 addition & 1 deletion Rx.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion RxCocoa.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'

s.source_files = 'RxCocoa/RxCocoa.h', 'RxCocoa/RxCocoa.swift', 'RxCocoa/Common/**/*.{swift,h,m}', 'RxCocoa/CocoaUnits/**/*.{swift,h,m}', 'RxCocoa/Foundation/**/*.{swift,h,m}', 'RxCocoa/Runtime/**/*.{swift,h,m}', 'Platform/**/*.swift'
s.source_files = 'RxCocoa/RxCocoa.h', 'RxCocoa/RxCocoa.swift', 'RxCocoa/Common/**/*.{swift,h,m}', 'RxCocoa/Traits/**/*.{swift,h,m}', 'RxCocoa/Foundation/**/*.{swift,h,m}', 'RxCocoa/Runtime/**/*.{swift,h,m}', 'Platform/**/*.swift'
s.exclude_files = 'RxCocoa/Platform/**/*.swift'

s.ios.source_files = 'RxCocoa/iOS/**/*.swift'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public protocol ControlEventType : ObservableType {
}

/**
Unit for `Observable`/`ObservableType` that represents event on UI element.
Trait for `Observable`/`ObservableType` that represents event on UI element.
It's properties are:
Expand All @@ -33,7 +33,7 @@ public protocol ControlEventType : ObservableType {
**It is implementor's responsibility to make sure that that all other properties enumerated above are satisfied.**
**If they aren't, then using this unit communicates wrong properties and could potentially break someone's code.**
**If they aren't, then using this trait communicates wrong properties and could potentially break someone's code.**
**In case `events` observable sequence that is being passed into initializer doesn't satisfy all enumerated
properties, please don't use this unit.**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public protocol ControlPropertyType : ObservableType, ObserverType {
}

/**
Unit for `Observable`/`ObservableType` that represents property of UI element.
Trait for `Observable`/`ObservableType` that represents property of UI element.
Sequence of values only represents initial control value and user initiated value changes.
Programatic value changes won't be reported.
Expand All @@ -37,7 +37,7 @@ public protocol ControlPropertyType : ObservableType, ObserverType {
**It is implementor's responsibility to make sure that that all other properties enumerated above are satisfied.**
**If they aren't, then using this unit communicates wrong properties and could potentially break someone's code.**
**If they aren't, then using this trait communicates wrong properties and could potentially break someone's code.**
**In case `values` observable sequence that is being passed into initializer doesn't satisfy all enumerated
properties, please don't use this unit.**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import RxSwift
#endif

extension ControlEvent {
/// Converts `ControlEvent` to `Driver` unit.
/// Converts `ControlEvent` to `Driver` trait.
///
/// `ControlEvent` already can't fail, so no special case needs to be handled.
public func asDriver() -> Driver<E> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import RxSwift
#endif

extension ControlProperty {
/// Converts `ControlProperty` to `Driver` unit.
/// Converts `ControlProperty` to `Driver` trait.
///
/// `ControlProperty` already can't fail, so no special case needs to be handled.
public func asDriver() -> Driver<E> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


/**
Unit that represents observable sequence with following properties:
Trait that represents observable sequence with following properties:
- it never fails
- it delivers events on `MainScheduler.instance`
Expand All @@ -32,7 +32,7 @@
If `drive*`, `subscribe*` and `bind*` are called from background thread, it is possible that initial replay
will happen on background thread, and subsequent events will arrive on main thread.
To find out more about units and how to use them, please visit `Documentation/Units.md`.
To find out more about traits and how to use them, please visit `Documentation/Traits.md`.
*/
public typealias Driver<E> = SharedSequence<DriverSharingStrategy, E>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
#endif

/**
Unit that represents observable sequence that shares computation resources with following properties:
Trait that represents observable sequence that shares computation resources with following properties:
- it never fails
- it delivers events on `SharingStrategy.scheduler`
- sharing strategy is customizable using `SharingStrategy.share` behavior
`SharedSequence<Element>` can be considered a builder pattern for observable sequences that share computation resources.
To find out more about units and how to use them, please visit `Documentation/Units.md`.
To find out more about units and how to use them, please visit `Documentation/Traits.md`.
*/
public struct SharedSequence<S: SharingStrategyProtocol, Element> : SharedSequenceConvertibleType {
public typealias E = Element
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Sources/RxCocoa/ControlEvent+Driver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/ControlEvent.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/ControlProperty+Driver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/ControlProperty.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/Driver+Subscription.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/Driver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/ObservableConvertibleType+Driver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/SharedSequence+Operators+arity.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/SharedSequence+Operators.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/SharedSequence.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/UIBindingObserver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/Variable+Driver.swift
2 changes: 1 addition & 1 deletion Sources/RxCocoa/Variable+SharedSequence.swift
2 changes: 1 addition & 1 deletion Sources/RxSwift/PrimitiveSequence+Zip+arity.swift
2 changes: 1 addition & 1 deletion Sources/RxSwift/PrimitiveSequence.swift
2 changes: 1 addition & 1 deletion scripts/package-spm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ try packageRelativePath(["RxSwift"], targetDirName: "RxSwift")

try packageRelativePath([
"RxCocoa/RxCocoa.swift",
"RxCocoa/CocoaUnits",
"RxCocoa/Traits",
"RxCocoa/Common",
"RxCocoa/Foundation",
"RxCocoa/iOS",
Expand Down

0 comments on commit a87a6c5

Please sign in to comment.