Skip to content

Commit 116edec

Browse files
authored
Add files to comply with community standards (#2)
* Update comments * Add files to comply with community standards * Update `CHANGELOG.md` * Fix typos * Update the `Ruby` version from `2.7` to `3.1.4`
1 parent 07299fd commit 116edec

File tree

14 files changed

+226
-21
lines changed

14 files changed

+226
-21
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,39 @@ jobs:
2424
args: --strict
2525
env:
2626
DIFF_BASE: ${{ github.base_ref }}
27-
Latest:
28-
name: Test Latest (iOS)
29-
runs-on: macOS-12
27+
iOS:
28+
name: ${{ matrix.name }}
29+
runs-on: ${{ matrix.runsOn }}
3030
env:
31-
DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer"
32-
timeout-minutes: 10
31+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
32+
timeout-minutes: 20
3333
strategy:
3434
fail-fast: false
3535
matrix:
3636
include:
37-
- destination: "OS=16.1,name=iPhone 14 Pro"
38-
name: "iOS"
39-
scheme: "HapticFeedback"
37+
- destination: "OS=17.0.1,name=iPhone 14 Pro"
38+
name: "iOS 17.0.1"
39+
xcode: "Xcode_15.0"
40+
runsOn: macos-13
41+
- destination: "OS=16.4,name=iPhone 14 Pro"
42+
name: "iOS 16.4"
43+
xcode: "Xcode_14.3.1"
44+
runsOn: macos-13
4045
steps:
4146
- uses: actions/checkout@v3
4247
- name: ${{ matrix.name }}
43-
run: xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean
44-
48+
run: xcodebuild -scheme "HapticFeedback" -destination "${{ matrix.destination }}" clean || exit 1
49+
50+
discover-typos:
51+
name: Discover Typos
52+
runs-on: macOS-12
53+
env:
54+
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: Discover typos
58+
run: |
59+
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
60+
python3 -m pip install --upgrade pip
61+
python3 -m pip install codespell
62+
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"

.github/workflows/danger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: ruby setup
1616
uses: ruby/setup-ruby@v1
1717
with:
18-
ruby-version: 2.7
18+
ruby-version: 3.1.4
1919
bundler-cache: true
2020
- name: Checkout code
2121
uses: actions/checkout@v2

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
excluded:
22
- Tests
33
- Package.swift
4+
- Package@swift-5.7.swift
5+
- Package@swift-5.8.swift
46
- .build
57

68
# Rules

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
All notable changes to this project will be documented in this file.
33

44
#### 1.x Releases
5-
- `1.0.x` Releases - [1.0.0](#100)
5+
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101)
6+
7+
## [1.0.1](https://github.com/space-code/haptic-feedback/releases/tag/1.0.1)
8+
Released on 2024-01-31.
9+
10+
#### Added
11+
- Add files to comply with community standards
12+
- Added in Pull Request [#2](https://github.com/space-code/haptic-feedback/pull/2)
613

714
## [1.0.0](https://github.com/space-code/haptic-feedback/releases/tag/1.0.0)
815
Released on 2023-11-26.

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting one of the project maintainers https://github.com/orgs/space-code/people. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing Guidelines
2+
3+
This document contains information and guidelines about contributing to this project.
4+
Please read it before you start participating.
5+
6+
**Topics**
7+
8+
* [Reporting Issues](#reporting-issues)
9+
* [Submitting Pull Requests](#submitting-pull-requests)
10+
* [Developers Certificate of Origin](#developers-certificate-of-origin)
11+
* [Code of Conduct](#code-of-conduct)
12+
13+
## Reporting Issues
14+
15+
A great way to contribute to the project is to send a detailed issue when you encounter a problem. We always appreciate a well-written, thorough bug report.
16+
17+
Check that the project issues database doesn't already include that problem or suggestion before submitting an issue. If you find a match, feel free to vote for the issue by adding a reaction. Doing this helps prioritize the most common problems and requests.
18+
19+
When reporting issues, please fill out our issue template. The information the template asks for will help us review and fix your issue faster.
20+
21+
## Submitting Pull Requests
22+
23+
You can contribute by fixing bugs or adding new features. For larger code changes, we recommend first discussing your ideas on our [GitHub Discussions](https://github.com/space-code/haptic-feedback/discussions). When submitting a pull request, please add relevant tests and ensure your changes don't break any existing tests.
24+
25+
## Developer's Certificate of Origin 1.1
26+
27+
By making a contribution to this project, I certify that:
28+
29+
- (a) The contribution was created in whole or in part by me and I
30+
have the right to submit it under the open source license
31+
indicated in the file; or
32+
33+
- (b) The contribution is based upon previous work that, to the best
34+
of my knowledge, is covered under an appropriate open source
35+
license and I have the right under that license to submit that
36+
work with modifications, whether created in whole or in part
37+
by me, under the same open source license (unless I am
38+
permitted to submit under a different license), as indicated
39+
in the file; or
40+
41+
- (c) The contribution was provided directly to me by some other
42+
person who certified (a), (b) or (c) and I have not modified
43+
it.
44+
45+
- (d) I understand and agree that this project and the contribution
46+
are public and that a record of the contribution (including all
47+
personal information I submit with it, including my sign-off) is
48+
maintained indefinitely and may be redistributed consistent with
49+
this project or the open source license(s) involved.
50+
51+
## Code of Conduct
52+
53+
The Code of Conduct governs how we behave in public or in private
54+
whenever the project will be judged by our actions.
55+
We expect it to be honored by everyone who contributes to this project.
56+
57+
See [CODE_OF_CONDUCT.md](https://github.com/space-code/haptic-feedback/blob/master/CODE_OF_CONDUCT.md) for details.
58+
59+
---
60+
61+
*Some of the ideas and wording for the statements above were based on work by the [Docker](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) and [Linux](https://elinux.org/Developer_Certificate_Of_Origin) communities.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

Package@swift-5.7.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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: "HapticFeedback",
8+
platforms: [
9+
.iOS(.v11),
10+
],
11+
products: [
12+
.library(name: "HapticFeedback", targets: ["HapticFeedback"]),
13+
],
14+
dependencies: [],
15+
targets: [
16+
.target(name: "HapticFeedback", dependencies: []),
17+
]
18+
)

Package@swift-5.8.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// swift-tools-version: 5.8
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: "HapticFeedback",
8+
platforms: [
9+
.iOS(.v11),
10+
],
11+
products: [
12+
.library(name: "HapticFeedback", targets: ["HapticFeedback"]),
13+
],
14+
dependencies: [],
15+
targets: [
16+
.target(name: "HapticFeedback", dependencies: []),
17+
]
18+
)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
<p align="center">
66
<a href="https://github.com/space-code/haptic-feedback/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/space-code/haptic-feedback?style=flat"></a>
7-
<a href="https://swiftpackageindex.com/space-code/haptic-feedback"><img alt="Swift Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fhaptic-feedback%2Fbadge%3Ftype%3Dswift-versions"/></a>
8-
<a href="https://swiftpackageindex.com/space-code/haptic-feedback"><img alt="Platform Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fhaptic-feedback%2Fbadge%3Ftype%3Dplatforms"/></a>
7+
<a href="https://swiftpackageindex.com/space-code/haptic-feedback"><img alt="Swift Compatibility" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fhaptic-feedback%2Fbadge%3Ftype%3Dswift-versions"/></a>
8+
<a href="https://swiftpackageindex.com/space-code/haptic-feedback"><img alt="Platform Compatibility" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fhaptic-feedback%2Fbadge%3Ftype%3Dplatforms"/></a>
99
<a href="https://github.com/space-code/haptic-feedback"><img alt="CI" src="https://github.com/space-code/haptic-feedback/actions/workflows/ci.yml/badge.svg?branch=main"></a>
1010
<a href="https://github.com/apple/swift-package-manager" alt="haptic-feedback on Swift Package Manager" title="haptic-feedback on Swift Package Manager"><img src="https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg" /></a>
1111
</p>

SECURITY.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reporting Security Vulnerabilities
2+
3+
This software is built with security and data privacy in mind to ensure your data is safe. We are grateful for security researchers and users reporting a vulnerability to us, first. To ensure that your request is handled in a timely manner and non-disclosure of vulnerabilities can be assured, please follow the below guideline.
4+
5+
**Please do not report security vulnerabilities directly on GitHub. GitHub Issues can be publicly seen and therefore would result in a direct disclosure.**
6+
7+
* Please address questions about data privacy, security concepts, and other media requests to the nv3212@gmail.com mailbox.

Sources/HapticFeedback/Classes/HapticFeedback.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
//
22
// haptic-feedback
3-
// Copyright © 2023 Space Code. All rights reserved.
3+
// Copyright © 2024 Space Code. All rights reserved.
44
//
55

66
import UIKit
77

8-
// Enum defining different types of haptic feedback
8+
/// Enum defining different types of haptic feedback
99
public enum HapticFeedback: Equatable {
10-
// Haptic feedback for impact with a specified style
10+
/// Haptic feedback for impact with a specified style
1111
case impact(UIImpactFeedbackGenerator.FeedbackStyle)
1212

13-
// Haptic feedback for notifications with a specified type
13+
/// Haptic feedback for notifications with a specified type
1414
case notification(UINotificationFeedbackGenerator.FeedbackType)
1515

16-
// Haptic feedback for selection
16+
/// Haptic feedback for selection
1717
case selection
1818

19-
// Function to generate haptic feedback based on the enum case
19+
/// Function to generate haptic feedback based on the enum case
2020
public func generate() {
2121
switch self {
2222
case let .impact(style):

0 commit comments

Comments
 (0)