Skip to content
This repository was archived by the owner on Aug 29, 2022. It is now read-only.

Commit a89dd49

Browse files
authored
Merge pull request #193 from bignerdranch/zwaldowski/swift-3_2
Swift 3.2 improvements
2 parents 7965be4 + c5e1200 commit a89dd49

File tree

17 files changed

+89
-75
lines changed

17 files changed

+89
-75
lines changed

.fastlane/report.xml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.1
1+
DEVELOPMENT-SNAPSHOT-2017-09-13-a

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: objective-c
22
os: osx
3-
osx_image: xcode8.3
3+
osx_image: xcode9
44
rvm:
55
- 2.3.1
66
install:

BNRDeferred.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
33
s.name = "BNRDeferred"
4-
s.version = "3.1.2"
4+
s.version = "3.2.0"
55
s.summary = "Work with values that haven't been determined yet."
66

77
s.description = <<-DESC

Configurations/Base.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ TVOS_DEPLOYMENT_TARGET = 9.0
1818
ALWAYS_SEARCH_USER_PATHS = NO
1919

2020
// Versioning
21-
CURRENT_PROJECT_VERSION = 3.1.2
21+
CURRENT_PROJECT_VERSION = 3.2.0
2222
VERSION_INFO_PREFIX =
2323
VERSIONING_SYSTEM = apple-generic
2424

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
source "https://rubygems.org"
22

3-
gem "fastlane"
3+
gem 'fastlane'
4+
gem 'semantic'

Gemfile.lock

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
CFPropertyList (2.3.5)
5-
addressable (2.5.1)
6-
public_suffix (~> 2.0, >= 2.0.2)
5+
addressable (2.5.2)
6+
public_suffix (>= 2.0.2, < 4.0)
77
babosa (1.0.2)
88
claide (1.0.2)
99
colored (1.2)
1010
colored2 (3.1.2)
1111
commander-fastlane (4.4.5)
1212
highline (~> 1.7.2)
13-
declarative (0.0.9)
13+
declarative (0.0.10)
1414
declarative-option (0.1.0)
1515
domain_name (0.5.20170404)
1616
unf (>= 0.0.5, < 1.0.0)
1717
dotenv (2.2.1)
18-
excon (0.57.1)
19-
faraday (0.12.2)
18+
excon (0.59.0)
19+
faraday (0.13.1)
2020
multipart-post (>= 1.2, < 3)
2121
faraday-cookie_jar (0.0.6)
2222
faraday (>= 0.7.4)
2323
http-cookie (~> 1.0.0)
24-
faraday_middleware (0.11.0.1)
24+
faraday_middleware (0.12.2)
2525
faraday (>= 0.7.4, < 1.0)
2626
fastimage (2.1.0)
27-
fastlane (2.47.0)
27+
fastlane (2.56.0)
2828
CFPropertyList (>= 2.3, < 3.0.0)
2929
addressable (>= 2.3, < 3.0.0)
3030
babosa (>= 1.0.2, < 2.0.0)
@@ -38,26 +38,27 @@ GEM
3838
faraday_middleware (~> 0.9)
3939
fastimage (>= 2.1.0, < 3.0.0)
4040
gh_inspector (>= 1.0.1, < 2.0.0)
41-
google-api-client (>= 0.12.0, < 0.13.0)
41+
google-api-client (>= 0.13.1, < 0.14.0)
4242
highline (>= 1.7.2, < 2.0.0)
4343
json (< 3.0.0)
4444
mini_magick (~> 4.5.1)
4545
multi_json
4646
multi_xml (~> 0.5)
4747
multipart-post (~> 2.0.0)
4848
plist (>= 3.1.0, < 4.0.0)
49+
public_suffix (~> 2.0.0)
4950
rubyzip (>= 1.1.0, < 2.0.0)
5051
security (= 0.1.3)
5152
slack-notifier (>= 1.3, < 2.0.0)
5253
terminal-notifier (>= 1.6.2, < 2.0.0)
5354
terminal-table (>= 1.4.5, < 2.0.0)
5455
tty-screen (~> 0.5.0)
5556
word_wrap (~> 1.0.0)
56-
xcodeproj (>= 1.4.4, < 2.0.0)
57+
xcodeproj (>= 1.5.0, < 2.0.0)
5758
xcpretty (>= 0.2.4, < 1.0.0)
5859
xcpretty-travis-formatter (>= 0.0.3)
5960
gh_inspector (1.0.3)
60-
google-api-client (0.12.0)
61+
google-api-client (0.13.6)
6162
addressable (~> 2.5, >= 2.5.1)
6263
googleauth (~> 0.5)
6364
httpclient (>= 2.8.1, < 3.0)
@@ -87,7 +88,7 @@ GEM
8788
mime-types-data (~> 3.2015)
8889
mime-types-data (3.2016.0521)
8990
mini_magick (4.5.1)
90-
multi_json (1.12.1)
91+
multi_json (1.12.2)
9192
multi_xml (0.6.0)
9293
multipart-post (2.0.0)
9394
nanaimo (0.2.3)
@@ -98,10 +99,11 @@ GEM
9899
declarative (< 0.1.0)
99100
declarative-option (< 0.2.0)
100101
uber (< 0.2.0)
101-
retriable (3.0.2)
102+
retriable (3.1.1)
102103
rouge (2.0.7)
103104
rubyzip (1.2.1)
104105
security (0.1.3)
106+
semantic (1.6.0)
105107
signet (0.7.3)
106108
addressable (~> 2.3)
107109
faraday (~> 0.9)
@@ -133,6 +135,7 @@ PLATFORMS
133135

134136
DEPENDENCIES
135137
fastlane
138+
semantic
136139

137140
BUNDLED WITH
138141
1.14.6

Sources/Atomics/include/Atomics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static inline void *_Nullable bnr_atomic_ptr_load(volatile bnr_atomic_ptr_t *_No
120120

121121
OS_ALWAYS_INLINE
122122
static inline bool bnr_atomic_ptr_compare_and_swap(volatile bnr_atomic_ptr_t *_Nonnull target, void *_Nullable expected, void *_Nullable desired, bnr_atomic_memory_order_t order) {
123-
return __c11_atomic_compare_exchange_strong(&target->value, &expected, desired, __ATOMIC_ACQ_REL, __ATOMIC_RELAXED);
123+
return __c11_atomic_compare_exchange_strong(&target->value, &expected, desired, order, __ATOMIC_RELAXED);
124124
}
125125

126126
OS_SWIFT_NAME(UnsafeAtomicBool)

Sources/Deferred/Deferred.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public final class Deferred<Value>: FutureProtocol, PromiseProtocol {
6464
}
6565

6666
public func upon(_ executor: Executor, execute body: @escaping(Value) -> Void) {
67-
if let queue = executor.underlyingQueue {
67+
if let queue = executor as? DispatchQueue {
6868
return upon(queue, execute: body)
69-
} else if let queue = executor as? DispatchQueue {
69+
} else if let queue = executor.underlyingQueue {
7070
return upon(queue, execute: body)
7171
}
7272

Sources/Deferred/Promise.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,17 @@ extension PromiseProtocol {
5757
}
5858
}
5959
}
60+
61+
#if swift(>=3.2)
62+
extension PromiseProtocol where Value == Void {
63+
/// Determines the promised event.
64+
///
65+
/// Filling a deferred event should usually be attempted only once.
66+
///
67+
/// - returns: Whether the promise was fulfilled.
68+
@discardableResult @available(swift 4)
69+
func fill() -> Bool {
70+
return fill(with: ())
71+
}
72+
}
73+
#endif

0 commit comments

Comments
 (0)