Skip to content

Commit

Permalink
Update CI to Swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
fassko authored and freak4pc committed Aug 26, 2019
1 parent 0bdc75a commit 1c2d4e2
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build-and-test:
macos:
xcode: "10.2.0"
xcode: "10.3.0"

steps:
- checkout
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Current master

- Nothing yet!

5.0.1
-----
- Update to Swift 5.0 to build in CI

5.0.0
-----
- Update to Swift 5.0 and Xcode 10.2 See [#59](https://github.com/RxSwiftCommunity/NSObject-Rx/pull/67) - [@fassko](https://github.com/fassko)
Expand Down
18 changes: 10 additions & 8 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Ash Furrow";
TargetAttributes = {
5E9E831A1BF79B3000C85B46 = {
Expand All @@ -193,7 +193,7 @@
};
buildConfigurationList = 5E9E83161BF79B3000C85B46 /* Build configuration list for PBXProject "Demo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -345,6 +345,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 @@ -392,14 +393,15 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
5E9E83371BF79B3000C85B46 /* Release */ = {
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 @@ -440,7 +442,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 @@ -455,7 +457,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -469,7 +471,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.Demo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -481,7 +483,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -493,7 +495,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.reactivex.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1030"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
13 changes: 10 additions & 3 deletions Demo/DemoTests/DemoTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import Nimble
import RxSwift
import NSObject_Rx

class DisposeBagTest: HasDisposeBag {}
class DisposeBagTest: HasDisposeBag {
var disposeBag: DisposeBag

init(disposeBag: DisposeBag) {
self.disposeBag = disposeBag
}
}

class Test: QuickSpec {
override func spec() {
Expand All @@ -12,7 +18,7 @@ class Test: QuickSpec {
var subject = NSObject()
let disposeBag = DisposeBag()
subject.rx.disposeBag = disposeBag
let subjectProtocol = DisposeBagTest()
let subjectProtocol = DisposeBagTest(disposeBag: disposeBag)
subjectProtocol.disposeBag = disposeBag
expect(subject.rx.disposeBag) === disposeBag
expect(subjectProtocol.disposeBag) === disposeBag
Expand All @@ -28,7 +34,8 @@ class Test: QuickSpec {
// Force the bag to deinit (and dispose itself).
do {
let subject = NSObject()
let subjectProtocol = DisposeBagTest()
let disposeBag = DisposeBag()
let subjectProtocol = DisposeBagTest(disposeBag: disposeBag)

variable.subscribe(onNext: { _ in executed = true })
.disposed(by: subject.rx.disposeBag)
Expand Down
10 changes: 5 additions & 5 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Nimble (8.0.1)
- "NSObject+Rx (5.0.0)":
- Nimble (8.0.2)
- "NSObject+Rx (5.0.1)":
- RxSwift (~> 5.0)
- Quick (2.1.0)
- RxSwift (5.0.0)
Expand All @@ -22,11 +22,11 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
"NSObject+Rx": 8ecb1e4714f3d35ac91485d2a769b7ab4b62e697
Nimble: 622629381bda1dd5678162f21f1368cec7cbba60
"NSObject+Rx": 1cc531f17bdb4e3aaac37874f1136c81091d2f6a
Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f

PODFILE CHECKSUM: 4f420ecd33a82075e360098bbed0ccaadfeb1728

COCOAPODS: 1.6.1
COCOAPODS: 1.7.5
54 changes: 27 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
CFPropertyList (3.0.1)
activesupport (4.2.11.1)
i18n (~> 0.7)
minitest (~> 5.1)
Expand All @@ -11,12 +11,12 @@ GEM
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.3)
babosa (1.0.2)
claide (1.0.2)
cocoapods (1.6.1)
claide (1.0.3)
cocoapods (1.7.5)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.1)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.5)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
Expand All @@ -25,13 +25,13 @@ GEM
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.2.0, < 3.0)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.1, < 2.0)
cocoapods-core (1.6.1)
xcodeproj (>= 1.10.0, < 2.0)
cocoapods-core (1.7.5)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
Expand All @@ -41,7 +41,7 @@ GEM
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-trunk (1.4.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
Expand All @@ -53,12 +53,12 @@ GEM
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20180417)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.2)
dotenv (2.7.5)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.64.0)
excon (0.66.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
Expand All @@ -67,7 +67,7 @@ GEM
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.122.0)
fastlane (2.129.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand All @@ -86,8 +86,8 @@ GEM
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
mini_magick (~> 4.5.1)
multi_json
jwt (~> 2.1.0)
mini_magick (>= 4.9.4, < 5.0.0)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
Expand All @@ -104,7 +104,7 @@ GEM
xcodeproj (>= 1.8.1, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fourflusher (2.2.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-api-client (0.23.9)
Expand All @@ -115,9 +115,9 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.0)
google-cloud-core (1.3.1)
google-cloud-env (~> 1.0)
google-cloud-env (1.0.5)
google-cloud-env (1.2.1)
faraday (~> 0.11)
google-cloud-storage (1.16.0)
digest-crc (~> 0.4)
Expand All @@ -143,7 +143,7 @@ GEM
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_magick (4.5.1)
mini_magick (4.9.5)
minitest (5.11.3)
molinillo (0.6.6)
multi_json (1.13.1)
Expand All @@ -163,7 +163,7 @@ GEM
retriable (3.1.2)
rouge (2.0.7)
ruby-macho (1.4.0)
rubyzip (1.2.2)
rubyzip (1.2.3)
security (0.1.3)
signet (0.11.0)
addressable (~> 2.3)
Expand All @@ -178,19 +178,19 @@ GEM
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.6.1)
tty-screen (0.6.5)
tty-spinner (0.9.0)
tty-cursor (~> 0.6.0)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.1)
tty-cursor (~> 0.7)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.5.0)
unicode-display_width (1.6.0)
word_wrap (1.0.0)
xcodeproj (1.9.0)
xcodeproj (1.12.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -209,4 +209,4 @@ DEPENDENCIES
fastlane

BUNDLED WITH
1.17.2
1.17.3
2 changes: 1 addition & 1 deletion HasDisposeBag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension HasDisposeBag {
return result
}

public var disposeBag: DisposeBag {
var disposeBag: DisposeBag {
get {
return synchronizedBag {
if let disposeObject = objc_getAssociatedObject(self, &disposeBagContext) as? DisposeBag {
Expand Down
2 changes: 1 addition & 1 deletion NSObject+Rx.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "NSObject+Rx"
s.version = "5.0.0"
s.version = "5.0.1"
s.summary = "Handy RxSwift extensions on NSObject."
s.description = <<-DESC
Right now, we just have a `rx_disposeBag` property, but we're open to PRs!
Expand Down

0 comments on commit 1c2d4e2

Please sign in to comment.