Skip to content

Commit

Permalink
Merge pull request #19 from BrettRToomey/travis-macos
Browse files Browse the repository at this point in the history
Disable Travis macOS builds.
  • Loading branch information
BrettRToomey authored Dec 1, 2016
2 parents 8da5a1f + 47bf386 commit 4f11f44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode8
script:
- eval "$(curl -sL https://swift.vapor.sh/ci)"
after_success:
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ A minimalistic job system in Swift, for Swift
* [Error handling](#error-handling-)
* [Retry on failure](#retry-on-failure-)

## Integration
Update your `Package.swift` file.
```swift
.Package(url: "https://github.com/BrettRToomey/Jobs.git", majorVersion: 0)
```

## Getting started 🚀
Creating a new `Job` is as simple as:
```swift
Expand Down Expand Up @@ -103,4 +109,4 @@ Jobs.add(
}
}
)
```
```
6 changes: 1 addition & 5 deletions Tests/JobsTests/jobsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,12 @@ class JobsTests: XCTestCase {
}

func testJobDelayed() {
var count = 0
let job = Jobs.add(interval: 1.seconds, autoStart: false){ count += 1 }
let job = Jobs.add(interval: 1.seconds, autoStart: false){}

XCTAssertFalse(job.isRunning, "job should not have started.")

job.start()
XCTAssertTrue(job.isRunning, "job should have started.")

Thread.sleep(forTimeInterval: 3.0)
XCTAssertEqual(count, 3, "job should have ran 3 times.")
}

func testJobStopped() {
Expand Down

0 comments on commit 4f11f44

Please sign in to comment.