Skip to content

Commit 104847c

Browse files
committed
add badges to README, update podspec
1 parent 09b9dc5 commit 104847c

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

GroupWork.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = "GroupWork"
3-
s.version = "0.0.1"
4-
s.summary = "Swift module that helps with running multiple, simultaneous, asynchronous tasks in a clean way."
5-
s.description = "Swift module that helps with running multiple, simultaneous, asynchronous tasks in a clean way. Better description inc."
3+
s.version = "0.0.3"
4+
s.summary = "Swift module that helps with running multiple, concurrent, asynchronous tasks in a clean way."
5+
s.description = "Swift module that helps with running multiple, concurrent, asynchronous tasks in a clean way. Better description inc."
66
s.homepage = "https://github.com/quanvo87/GroupWork"
77
s.license = { :type => "MIT", :file => "LICENSE" }
88
s.author = { "Quan Vo" => "qvo1987@gmail.com",
99
"Wilson Ding" => "hello@wilsonding.com" }
1010
s.platform = :ios, "8.0"
11-
s.source = { :git => "https://github.com/quanvo87/GroupWork.git", :tag => "0.0.1" }
11+
s.source = { :git => "https://github.com/quanvo87/GroupWork.git", :tag => "0.0.3" }
1212
s.source_files = "GroupWork", "GroupWork/**/*.{h,m,swift}"
1313
s.exclude_files = "Classes/Exclude"
1414
end

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Swift module that helps with running multiple, concurrent, asynchronous tasks in a clean way.
44

5+
[![Swift](https://img.shields.io/badge/Swift-4.0-orange.svg)](https://swift.org)
6+
[![CocoaPods Version Status](https://img.shields.io/cocoapods/v/GroupWork.svg)](https://cocoapods.org/pods/GroupWork)
7+
[![CocoaPods](https://img.shields.io/cocoapods/dt/GroupWork.svg)](https://cocoapods.org/pods/GroupWork)
8+
[![CocoaPods](https://img.shields.io/cocoapods/dm/GroupWork.svg)](https://cocoapods.org/pods/GroupWork)
9+
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage)
10+
[![Build Status](https://travis-ci.org/quanvo87/GroupWork.svg?branch=master)](https://travis-ci.org/quanvo87/GroupWork)
11+
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
12+
513
## Contents
614

715
1. [Requirements](#requirements)
@@ -18,7 +26,7 @@ Swift module that helps with running multiple, concurrent, asynchronous tasks in
1826

1927
## Requirements
2028

21-
Swift 4
29+
[Swift 4](https://swift.org/)
2230

2331
## Installation
2432

@@ -27,7 +35,7 @@ Swift 4
2735
For [CocoaPods](http://cocoapods.org/), add to `Podfile`:
2836

2937
```ruby
30-
pod 'GroupWork', '~> 0.0.3'
38+
pod 'GroupWork', '~> 0.0'
3139
```
3240

3341
#### Carthage
@@ -66,9 +74,9 @@ import GroupWork
6674
func complexFunc(completion: @escaping (Bool) -> Void) {
6775
let work = GroupWork()
6876

69-
work.simpleFuncA()
70-
work.simpleFuncB()
71-
work.simpleFuncC()
77+
work.asyncFuncA()
78+
work.asyncFuncB()
79+
work.asyncFuncC()
7280

7381
work.allDone() {
7482
completion(work.result)
@@ -78,10 +86,10 @@ func complexFunc(completion: @escaping (Bool) -> Void) {
7886
...
7987
```
8088

81-
`complexFunc` is a function that returns the result of three simple, asynchronous functions `simpleFuncA()`, `simpleFuncB()`, and `simpleFuncC()`, which run concurrently. The completion handler is called only when all the simple functions have completed. Usage of this library has enabled the above clean interface. This can be scaled to much higher than three simple functions.
89+
`complexFunc` is a function that returns the result of three asynchronous functions `asyncFuncA()`, `asyncFuncB()`, and `asyncFuncC()`, running concurrently. The completion handler is called only when all these functions have completed. Usage of this library has enabled the above clean interface. This can be scaled to much higher than three asynchronous functions.
8290

83-
Caveats:
84-
- the simple functions MUST be able to run simultaneously without affecting each other
91+
notes:
92+
- the asynchronous functions should be able to run concurrently without affecting each other
8593
- `work.result` is only a simple `Bool`
8694
- this is not an answer to [callback hell](http://callbackhell.com/)
8795

@@ -93,21 +101,21 @@ There is some set up required in order to create `complexFunc()` from above:
93101
import GroupWork
94102

95103
extension GroupWork {
96-
func simplefuncA() {
104+
func asyncFuncA() {
97105
start()
98106
networkCallA() { (result)
99107
self.finish(withResult: result)
100108
}
101109
}
102110

103-
func simplefuncB() {
111+
func asyncFuncB() {
104112
start()
105113
networkCallB() { (result)
106114
self.finish(withResult: result)
107115
}
108116
}
109117

110-
func simplefuncC() {
118+
func asyncFuncC() {
111119
start()
112120
networkCallC() { (result)
113121
self.finish(withResult: result)
@@ -118,14 +126,14 @@ extension GroupWork {
118126

119127
Now you can create a `GroupWork`, and call `work.simpleFuncA()` on it like in the example.
120128

121-
Caveats:
122-
- notice that in each function, `start()` is called before each asynchronous task
123-
- `finish(withResult:)` is called in the completion handler of each asynchronous task
124-
- `start()` and `finish()` calls MUST be balanced
129+
notes:
130+
- `start()` must be called before an asynchronous task
131+
- `finish()` must be called in the completion handler of an asynchronous
132+
- `start()` and `finish()` calls must be balanced
125133

126134
## Working Example
127135

128-
The [tests]() have a working example.
136+
The [tests](GroupWorkTests/GroupWorkTests.swift) have a working example.
129137

130138
## License
131139
[MIT](http://opensource.org/licenses/MIT) [LICENSE](LICENSE)

0 commit comments

Comments
 (0)