Skip to content

Commit 10aad91

Browse files
authored
Merge pull request #1 from dfed/dfed--project-structure
Create project structure
2 parents b325fb1 + b5b023f commit 10aad91

File tree

15 files changed

+582
-88
lines changed

15 files changed

+582
-88
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Goals**
11+
What do you want this feature to accomplish? What are the effects of your change?
12+
13+
**Non-Goals**
14+
What aren’t you trying to accomplish? What are the boundaries of the proposed work?
15+
16+
**Investigations**
17+
What other solutions (if any) did you investigate? Why didn’t you choose them?
18+
19+
**Design**
20+
What are you proposing? What are the details of your chosen design? Include an API overview, technical details, and (potentially) some example headers, along with anything else you think will be useful. This is where you sell the design to yourself and project maintainers.

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
# TODO: Uncomment pod-lint once we bump Cococapods.
11+
# We need a release with https://github.com/CocoaPods/CocoaPods/pull/11660
12+
# pod-lint:
13+
# name: Pod Lint
14+
# runs-on: macOS-12
15+
# steps:
16+
# - uses: actions/setup-ruby@v1
17+
# with:
18+
# ruby-version: '2.7.6'
19+
# - name: Checkout Repo
20+
# uses: actions/checkout@v3
21+
# - name: Bundle Install
22+
# run: bundle install
23+
# - name: Select Xcode Version
24+
# run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
25+
# - name: Lint Podspec
26+
# run: bundle exec pod lib lint --verbose --fail-fast --swift-version=5.7
27+
spm-14:
28+
name: Build Xcode 14
29+
runs-on: macOS-12
30+
strategy:
31+
matrix:
32+
platforms: [
33+
'iOS_16,watchOS_9',
34+
'macOS_13,tvOS_16',
35+
]
36+
fail-fast: false
37+
steps:
38+
- uses: actions/setup-ruby@v1
39+
with:
40+
ruby-version: '2.7.6'
41+
- name: Checkout Repo
42+
uses: actions/checkout@v3
43+
- name: Bundle Install
44+
run: bundle install
45+
- name: Select Xcode Version
46+
run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
47+
- name: Build and Test Framework
48+
run: Scripts/build.swift ${{ matrix.platforms }}
49+
- name: Prepare Coverage Reports
50+
run: ./Scripts/prepare-coverage-reports.sh
51+
- name: Upload Coverage Reports
52+
if: success()
53+
uses: codecov/codecov-action@v3
54+
spm-14-swift:
55+
name: Swift Build Xcode 14
56+
runs-on: macOS-12
57+
steps:
58+
- uses: actions/setup-ruby@v1
59+
with:
60+
ruby-version: '2.7.6'
61+
- name: Checkout Repo
62+
uses: actions/checkout@v3
63+
- name: Bundle Install
64+
run: bundle install
65+
- name: Select Xcode Version
66+
run: sudo xcode-select --switch /Applications/Xcode_14.1.0.app/Contents/Developer
67+
- name: Build and Test Framework
68+
run: xcrun swift test -c release -Xswiftc -enable-testing

.gitignore

Lines changed: 3 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,5 @@
1-
# Xcode
2-
#
3-
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4-
5-
## User settings
1+
.DS_Store
62
xcuserdata/
7-
8-
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9-
*.xcscmblueprint
10-
*.xccheckout
11-
12-
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13-
build/
14-
DerivedData/
15-
*.moved-aside
16-
*.pbxuser
17-
!default.pbxuser
18-
*.mode1v3
19-
!default.mode1v3
20-
*.mode2v3
21-
!default.mode2v3
22-
*.perspectivev3
23-
!default.perspectivev3
24-
25-
## Obj-C/Swift specific
26-
*.hmap
27-
28-
## App packaging
29-
*.ipa
30-
*.dSYM.zip
31-
*.dSYM
32-
33-
## Playgrounds
34-
timeline.xctimeline
35-
playground.xcworkspace
36-
37-
# Swift Package Manager
38-
#
39-
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40-
# Packages/
41-
# Package.pins
42-
# Package.resolved
43-
# *.xcodeproj
44-
#
45-
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46-
# hence it is not needed unless you have added a package configuration file to your project
47-
# .swiftpm
48-
3+
.swiftpm
494
.build/
50-
51-
# CocoaPods
52-
#
53-
# We recommend against adding the Pods directory to your .gitignore. However
54-
# you should judge for yourself, the pros and cons are mentioned at:
55-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56-
#
57-
# Pods/
58-
#
59-
# Add this line if you want to avoid checking in source code from the Xcode workspace
60-
# *.xcworkspace
61-
62-
# Carthage
63-
#
64-
# Add this line if you want to avoid checking in source code from Carthage dependencies.
65-
# Carthage/Checkouts
66-
67-
Carthage/Build/
68-
69-
# Accio dependency management
70-
Dependencies/
71-
.accio/
72-
73-
# fastlane
74-
#
75-
# It is recommended to not store the screenshots in the git repo.
76-
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
77-
# For more information about the recommended setup visit:
78-
# https://docs.fastlane.tools/best-practices/source-control/#source-control
79-
80-
fastlane/report.xml
81-
fastlane/Preview.html
82-
fastlane/screenshots/**/*.png
83-
fastlane/test_output
84-
85-
# Code Injection
86-
#
87-
# After new code Injection tools there's a generated folder /iOSInjectionProject
88-
# https://github.com/johnno1962/injectionforxcode
89-
90-
iOSInjectionProject/
5+
generated/

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.6

AsyncQueue.podspec

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'AsyncQueue'
3+
s.version = '0.0.1'
4+
s.license = 'MIT'
5+
s.summary = 'A queue that enables ordered sending of events from synchronous to asynchronous code.'
6+
s.homepage = 'https://github.com/dfed/swift-async-queue'
7+
s.authors = 'Dan Federman'
8+
s.source = { :git => 'https://github.com/dfed/swift-async-queue.git', :tag => s.version }
9+
s.swift_version = '5.7'
10+
s.source_files = 'Sources/**/*.{swift}'
11+
s.ios.deployment_target = '13.0'
12+
s.tvos.deployment_target = '13.0'
13+
s.watchos.deployment_target = '6.0'
14+
s.macos.deployment_target = '10.15'
15+
end

Contributing.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### One issue or bug per Pull Request
2+
3+
Keep your Pull Requests small. Small PRs are easier to reason about which makes them significantly more likely to get merged.
4+
5+
### Issues before features
6+
7+
If you want to add a feature, please file an [Issue](../../issues) first. An Issue gives us the opportunity to discuss the requirements and implications of a feature with you before you start writing code.
8+
9+
### Backwards compatibility
10+
11+
Respect the minimum deployment target. If you are adding code that uses new APIs, make sure to prevent older clients from crashing or misbehaving. Our CI runs against our minimum deployment targets, so you will not get a green build unless your code is backwards compatible.
12+
13+
### Forwards compatibility
14+
15+
Please do not write new code using deprecated APIs.

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ruby '2.7.6'
2+
3+
source 'https://rubygems.org'
4+
5+
gem 'cocoapods', '~> 1.11.0'

Gemfile.lock

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.5)
5+
rexml
6+
activesupport (6.1.6.1)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
zeitwerk (~> 2.3)
12+
addressable (2.8.1)
13+
public_suffix (>= 2.0.2, < 6.0)
14+
algoliasearch (1.27.5)
15+
httpclient (~> 2.8, >= 2.8.3)
16+
json (>= 1.5.1)
17+
atomos (0.1.3)
18+
claide (1.1.0)
19+
cocoapods (1.11.3)
20+
addressable (~> 2.8)
21+
claide (>= 1.0.2, < 2.0)
22+
cocoapods-core (= 1.11.3)
23+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24+
cocoapods-downloader (>= 1.4.0, < 2.0)
25+
cocoapods-plugins (>= 1.0.0, < 2.0)
26+
cocoapods-search (>= 1.0.0, < 2.0)
27+
cocoapods-trunk (>= 1.4.0, < 2.0)
28+
cocoapods-try (>= 1.1.0, < 2.0)
29+
colored2 (~> 3.1)
30+
escape (~> 0.0.4)
31+
fourflusher (>= 2.3.0, < 3.0)
32+
gh_inspector (~> 1.0)
33+
molinillo (~> 0.8.0)
34+
nap (~> 1.0)
35+
ruby-macho (>= 1.0, < 3.0)
36+
xcodeproj (>= 1.21.0, < 2.0)
37+
cocoapods-core (1.11.3)
38+
activesupport (>= 5.0, < 7)
39+
addressable (~> 2.8)
40+
algoliasearch (~> 1.0)
41+
concurrent-ruby (~> 1.1)
42+
fuzzy_match (~> 2.0.4)
43+
nap (~> 1.0)
44+
netrc (~> 0.11)
45+
public_suffix (~> 4.0)
46+
typhoeus (~> 1.0)
47+
cocoapods-deintegrate (1.0.5)
48+
cocoapods-downloader (1.6.3)
49+
cocoapods-plugins (1.0.0)
50+
nap
51+
cocoapods-search (1.0.1)
52+
cocoapods-trunk (1.6.0)
53+
nap (>= 0.8, < 2.0)
54+
netrc (~> 0.11)
55+
cocoapods-try (1.2.0)
56+
colored2 (3.1.2)
57+
concurrent-ruby (1.1.10)
58+
escape (0.0.4)
59+
ethon (0.15.0)
60+
ffi (>= 1.15.0)
61+
ffi (1.15.5)
62+
fourflusher (2.3.1)
63+
fuzzy_match (2.0.4)
64+
gh_inspector (1.1.3)
65+
httpclient (2.8.3)
66+
i18n (1.12.0)
67+
concurrent-ruby (~> 1.0)
68+
json (2.6.2)
69+
minitest (5.16.3)
70+
molinillo (0.8.0)
71+
nanaimo (0.3.0)
72+
nap (1.1.0)
73+
netrc (0.11.0)
74+
public_suffix (4.0.7)
75+
rexml (3.2.5)
76+
ruby-macho (2.5.1)
77+
typhoeus (1.4.0)
78+
ethon (>= 0.9.0)
79+
tzinfo (2.0.5)
80+
concurrent-ruby (~> 1.0)
81+
xcodeproj (1.22.0)
82+
CFPropertyList (>= 2.3.3, < 4.0)
83+
atomos (~> 0.1.3)
84+
claide (>= 1.0.2, < 2.0)
85+
colored2 (~> 3.1)
86+
nanaimo (~> 0.3.0)
87+
rexml (~> 3.2.4)
88+
zeitwerk (2.6.0)
89+
90+
PLATFORMS
91+
ruby
92+
93+
DEPENDENCIES
94+
cocoapods (~> 1.11.0)
95+
96+
RUBY VERSION
97+
ruby 2.7.6p219
98+
99+
BUNDLED WITH
100+
2.3.15

Package.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// swift-tools-version: 5.7
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-async-queue",
8+
platforms: [
9+
.macOS(.v10_15),
10+
.iOS(.v13),
11+
.tvOS(.v13),
12+
.watchOS(.v6),
13+
],
14+
products: [
15+
.library(
16+
name: "AsyncQueue",
17+
targets: ["AsyncQueue"]),
18+
],
19+
targets: [
20+
.target(
21+
name: "AsyncQueue",
22+
dependencies: []),
23+
.testTarget(
24+
name: "AsyncQueueTests",
25+
dependencies: ["AsyncQueue"]),
26+
]
27+
)

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,42 @@
11
# swift-async-queue
22
A queue that enables ordered sending of events from synchronous to asynchronous code
3+
4+
## Requirements
5+
6+
* Xcode 14.1 or later.
7+
* iOS 13 or later.
8+
* tvOS 13 or later.
9+
* watchOS 6 or later.
10+
* macOS 10.15 or later.
11+
* Swift 5.7 or later.
12+
13+
## Installation
14+
15+
### Swift Package Manager
16+
17+
To install swift-async-queue in your iOS project with [Swift Package Manager](https://github.com/apple/swift-package-manager), the following lines can be added to your `Package.swift` file:
18+
19+
```swift
20+
dependencies: [
21+
.package(url: "https://github.com/dfed/swift-async-queue", from: "0.0.1"),
22+
]
23+
```
24+
25+
### CocoaPods
26+
27+
To install swift-async-queue in your iOS project with [CocoaPods](http://cocoapods.org), add the following to your `Podfile`:
28+
29+
```
30+
platform :ios, '13.0'
31+
pod 'AsyncQueue', '~> 0.1'
32+
```
33+
34+
## Contributing
35+
36+
I’m glad you’re interested in swift-async-queue, and I’d love to see where you take it. Please read the [contributing guidelines](Contributing.md) prior to submitting a Pull Request.
37+
38+
Thanks, and happy queueing!
39+
40+
## Developing
41+
42+
Double-click on `Package.swift` in the root of the repository to open the project in Xcode.

0 commit comments

Comments
 (0)