-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit makes several changes to both the Jenson format and the internal implementations. First, the Code of Conduct, SwiftFormat configuration, and SwiftLint configuration files have been copied from Indexing Your Heart as this package is governed under the organization. Next, most of the structs included in this package now conform to Identifiable, Equatable, and Hashable. This will prove useful for SwiftUI apps that utilize these structs. Finally, the package has been updated to support Jenson v2, which includes a new refresh event, an optional application field for third-party apps and/or APIs, and a story metadata field. Signed-off-by: Marquis Kurt <[email protected]>
- Loading branch information
1 parent
a2c9ade
commit 51d3979
Showing
14 changed files
with
440 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Code of Conduct | ||
|
||
The Indexing Your Heart project strives to maintain a healthy community that focuses on creating quality content that represents the best the community has to offer. We want to have a healthy, productive community that is willing to take risks and foster relationships with others in an effort to create an inclusive environment that embodies the premise of Indexing Your Heart. | ||
|
||
This Code of Conduct describes and governs how the community should act in both the public and private spheres, whenever the project’s reputation is at stake. | ||
|
||
- **Code of Conduct Attributions** | ||
|
||
This code of conduct is loosely based off of the Ubuntu Code of Conduct from the Ubuntu Project. You can view the code of conduct at [https://ubuntu.com/community/code-of-conduct](https://ubuntu.com/community/code-of-conduct). | ||
|
||
Likewise, some inspiration comes from The Contributor Covenant Code of Conduct, which you can access at [https://www.contributor-covenant.org/version/2/0/code_of_conduct/](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). | ||
|
||
## Key tenets and goals | ||
|
||
### Be respectful | ||
|
||
Respect for others is a must have for the project and the community. Every community member is a human, and we must respect that, regardless of background. We will not tolerate hate speech or any form of disrespect that makes anyone in our community feel threatened or uncomfortable. | ||
|
||
### Take responsibility for our actions | ||
|
||
Every member in the Indexing Your Heart community is a human; naturally, we all make mistakes. When we take responsibility for our actions, we recognize this fact and allow ourselves to correct the wrong and strive to do better. | ||
|
||
### Promote collaboration | ||
|
||
Some of our best work happens when we collaborate with each other. Fostering an environment that allows for others to contribute ideas, challenge assumptions, and seek to improve the project is critical to making Indexing Your Heart successful. | ||
|
||
## Leadership | ||
|
||
The Indexing Your Heart community will be governed by the “benevolent dictator”, who delegates community standards enforcement to the Project Council (PC). They will be responsible for overseeing the community and enforcing standards for behavior as defined in this Code of Conduct, in addition to being the best representatives of this Code of Conduct. | ||
|
||
This leadership should not be taken lightly, as it is a *privilege* above all else; their power remains effective on the project insofar as the community willingly follows them. | ||
|
||
## Enforcement guidelines | ||
|
||
The following system will be the framework used to determine the consequences of an offender’s actions that a member of the PC or the “benevolent dictator” has determined violates this Code of Conduct, depending on the severity of the action. Examples are provided for each step in the system, but note that each system is not limited to those examples. | ||
|
||
### 1. Written warning | ||
|
||
**Examples**: Inappropriate language | ||
|
||
A written warning will be issued to the offender upon the first time the Code of Conduct is violated, giving them the opportunity to correct their wrong. A public apology may be requested. | ||
|
||
### 2. Temporary ban | ||
|
||
**Examples**: Repeated offenses where written warnings were issued | ||
|
||
A temporary ban will be placed on the offender for seven consecutive days. They will not be able to communicate with the project or contribute to source code for a the period of time specified. | ||
|
||
### 3. Permanent ban | ||
|
||
**Examples**: Hate speech, threats, severe damage to the project, or continuous repeat offenses | ||
|
||
A permanent ban will be placed on the offender, and the project will sever all ties with the offender. They will not be able to participate in the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--maxwidth 120 | ||
--binarygrouping none | ||
--commas inline | ||
--decimalgrouping none | ||
--hexgrouping none | ||
--ifdef outdent | ||
--octalgrouping none | ||
--patternlet inline | ||
--semicolons never | ||
--wraparguments before-first | ||
--wrapcollections before-first | ||
--wrapparameters before-first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
disabled_rules: | ||
- force_try | ||
- duplicate_imports | ||
- function_body_length | ||
|
||
opt_in_rules: | ||
- file_header | ||
- empty_count | ||
- inclusive_language | ||
|
||
included: | ||
- Shared | ||
- Tests | ||
|
||
type_name: | ||
allowed_symbols: ["_"] | ||
|
||
type_body_length: | ||
warning: 250 | ||
error: 400 | ||
|
||
file_length: | ||
warning: 500 | ||
error: 1000 | ||
|
||
file_header: | ||
required_pattern: | | ||
\/\/ | ||
\/\/ .*?\.swift | ||
\/\/ Indexing Your Heart | ||
\/\/ | ||
\/\/ Created by .*? on \d{1,2}\/\d{1,2}\/\d{2}\. | ||
\/\/ | ||
\/\/ This file is part of Indexing Your Heart\. | ||
\/\/ | ||
\/\/ Indexing Your Heart is non-violent software: you can use, redistribute, and\/or modify it under the terms of the | ||
\/\/ CNPLv7\+ as found in the LICENSE file in the source code root directory or at | ||
\/\/ \<https:\/\/git\.pixie\.town\/thufie\/npl-builder\>\. | ||
\/\/ | ||
\/\/ Indexing Your Heart comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law\. See the CNPL for | ||
\/\/ details\. | ||
custom_rules: | ||
no_capstone_name: | ||
name: "Require Public-facing Name" | ||
regex: "(Head Over Heels)" | ||
capture_group: 0 | ||
match_kinds: | ||
- comment | ||
- identifier | ||
- string | ||
message: "Refer to the project by its public-facing name, Indexing Your Heart." | ||
severity: warning | ||
unneeded_filter: | ||
name: "Possible Unneeded Filter" | ||
regex: ".filter(\\s?)\\{(.+)\\}\\s+for (\\w+) in (\\w+) \\{\\s*(.+)\\s*\\}" | ||
message: "Filter might be unneeded; try using the for-where clause to iterate over a filter." | ||
severity: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// Aliases.swift | ||
// Created by Marquis Kurt on 9/12/22. | ||
// This file is part of Indexing Your Heart. | ||
// | ||
// Indexing Your Heart is non-violent software: you can use, redistribute, and/or modify it under the terms of the | ||
// CNPLv7+ as found in the LICENSE file in the source code root directory or at | ||
// <https://git.pixie.town/thufie/npl-builder>. | ||
// | ||
// Indexing Your Heart comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. See the CNPL for | ||
// details. | ||
|
||
import Foundation | ||
|
||
/// A typealias that indicates an object is able to be identified in a random access collection. | ||
/// This is typically used for objects that will be used in `ForEach` structs in SwiftUI or other equivalents. | ||
public typealias RandomIdentifiedAccessable = Identifiable & Equatable & Hashable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// JensonApp.swift | ||
// Created by Marquis Kurt on 9/12/22. | ||
// This file is part of Indexing Your Heart. | ||
// | ||
// Indexing Your Heart is non-violent software: you can use, redistribute, and/or modify it under the terms of the | ||
// CNPLv7+ as found in the LICENSE file in the source code root directory or at | ||
// <https://git.pixie.town/thufie/npl-builder>. | ||
// | ||
// Indexing Your Heart comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. See the CNPL for | ||
// details. | ||
|
||
import Foundation | ||
|
||
/// A struct that represents an application in a Jenson manifest file. | ||
/// - Note: This application is only present on Jenson files with manifest v2 or later. | ||
public struct JensonApp: Codable { | ||
/// The UUID generated for this application. | ||
public let id = UUID() | ||
|
||
/// The name of the application that authored the file. | ||
var name: String | ||
|
||
/// The URL to the website associated with this application. | ||
var website: String? | ||
|
||
public init(name: String, website: String? = nil) { | ||
self.name = name | ||
self.website = website | ||
} | ||
|
||
private enum CodingKeys: CodingKey { | ||
case name | ||
case website | ||
} | ||
} | ||
|
||
extension JensonApp: RandomIdentifiedAccessable {} |
Oops, something went wrong.