Skip to content

Commit

Permalink
Merge pull request #6 from hovaks/master
Browse files Browse the repository at this point in the history
Version 0.1.5
  • Loading branch information
hamtiko authored May 23, 2019
2 parents 4dfb3c3 + a45e7f0 commit fdc0f6d
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 91 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode9.2
osx_image: xcode10.2
language: swift
cache: cocoapods
podfile: Example/Podfile
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- pod install --project-directory=Example --repo-update
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/STDevRxExt.xcworkspace -scheme STDevRxExt-Example -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2' ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/STDevRxExt.xcworkspace -scheme STDevRxExt-Example -destination 'platform=iOS Simulator,name=iPhone 8,OS=12.2' ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint --allow-warnings
notifications:
email:
recipients:
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '9.3'
platform :ios, '11.2'

use_frameworks!

Expand Down
34 changes: 22 additions & 12 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
PODS:
- RxCocoa (4.1.2):
- RxSwift (~> 4.0)
- RxSwift (4.1.2)
- STDevRxExt (0.1.2):
- RxCocoa (~> 4.1.2)
- RxSwift (~> 4.1.2)
- RxCocoa (5.0.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxRelay (5.0.0):
- RxSwift (~> 5)
- RxSwift (5.0.0)
- STDevRxExt (0.1.5):
- RxCocoa (~> 5)
- RxSwift (~> 5)

DEPENDENCIES:
- STDevRxExt (from `../`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- RxCocoa
- RxRelay
- RxSwift

EXTERNAL SOURCES:
STDevRxExt:
:path: ../
:path: "../"

SPEC CHECKSUMS:
RxCocoa: d88ba0f1f6abf040011a9eb4b539324fc426843a
RxSwift: e49536837d9901277638493ea537394d4b55f570
STDevRxExt: d8ba812104f9cebe6aee0250536f3cd8d62d040f
RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8
RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f
STDevRxExt: 1b62df5fe5ec25219a4bb081fdd57c77094911cb

PODFILE CHECKSUM: 03f0d9ab6a3ddca86ac78ea53d2cfc1bef03c8f8
PODFILE CHECKSUM: 83769abc0b7bdc83a928dcac34cf2b1154077760

COCOAPODS: 1.3.1
COCOAPODS: 1.7.0
43 changes: 16 additions & 27 deletions Example/STDevRxExt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
ABFFA786528145F941134D7B /* [CP] Embed Pods Frameworks */,
92DAC64742707319431404BA /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -130,19 +129,20 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0900;
DevelopmentTeam = Y2RY2C6N5B;
LastSwiftMigration = 1020;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "STDevRxExt" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand All @@ -169,21 +169,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
92DAC64742707319431404BA /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-STDevRxExt_Tests/Pods-STDevRxExt_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
A3707137EA0E0FF550D3D5D1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -208,20 +193,22 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-STDevRxExt_Tests/Pods-STDevRxExt_Tests-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-STDevRxExt_Tests/Pods-STDevRxExt_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
"${BUILT_PRODUCTS_DIR}/STDevRxExt/STDevRxExt.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/STDevRxExt.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-STDevRxExt_Tests/Pods-STDevRxExt_Tests-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-STDevRxExt_Tests/Pods-STDevRxExt_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand All @@ -242,6 +229,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -285,7 +273,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -297,6 +285,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -333,7 +322,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 11.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -345,6 +334,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9EC0293BA12B9FB58FED8B1E /* Pods-STDevRxExt_Tests.debug.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = Y2RY2C6N5B;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -354,22 +344,21 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
607FACF41AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C44642BE55278B88EDF94A1D /* Pods-STDevRxExt_Tests.release.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = Y2RY2C6N5B;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
9 changes: 1 addition & 8 deletions Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,5 @@ class Tests: XCTestCase {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}

func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}


}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ To run the [Example.playground](Example/Example.playground), clone the repo, and

## Requirements

* iOS 9.3+
* Swift 4.x
* Xcode 9+
* iOS 11.2+
* Swift 5.0+
* Xcode 10.2+

## Installation

Expand Down
9 changes: 5 additions & 4 deletions STDevRxExt.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Pod::Spec.new do |s|
s.name = 'STDevRxExt'
s.version = '0.1.4'
s.version = '0.1.5'
s.summary = 'STDevRxExt contains some extension functions for RxSwift and RxCoca which makes our live easy.'
s.swift_version = '5.0'

s.description = <<-DESC
STDevRxExt contains following 3 type of extensions for RxSwift and RxCocoa:
Expand All @@ -18,10 +19,10 @@ STDevRxExt contains following 3 type of extensions for RxSwift and RxCocoa:
s.source = { :git => 'https://github.com/stdevteam/STDevRxExt.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

s.ios.deployment_target = '9.3'
s.ios.deployment_target = '11.2'

s.source_files = 'STDevRxExt/Classes/**/*'

s.dependency 'RxSwift', '~> 4'
s.dependency 'RxCocoa', '~> 4'
s.dependency 'RxSwift', '~> 5'
s.dependency 'RxCocoa', '~> 5'
end
6 changes: 3 additions & 3 deletions STDevRxExt/Classes/CastExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public enum RxCastError: Error {

public extension ObservableType {

public func cast<T>(to type: T.Type) -> Observable<T?> {
func cast<T>(to type: T.Type) -> Observable<T?> {
return map { $0 as? T }
}

public func forceCast<T>(to type: T.Type) -> Observable<T> {
func forceCast<T>(to type: T.Type) -> Observable<T> {
return flatMap { value in
Observable.create { observer in
if let casted = value as? T {
Expand All @@ -37,7 +37,7 @@ public extension ObservableType {

public extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingStrategy {

public func cast<T>(to type: T.Type) -> Driver<T?> {
func cast<T>(to type: T.Type) -> Driver<T?> {
return map { $0 as? T }
}

Expand Down
Loading

0 comments on commit fdc0f6d

Please sign in to comment.