Skip to content

Commit 395abdd

Browse files
committed
First
0 parents  commit 395abdd

30 files changed

+2222
-0
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#ECCN:Open Source
2+
* @heroku-buildpacks/languages
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check Changelog
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, labeled, unlabeled, synchronize]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
check-changelog:
12+
runs-on: ubuntu-24.04
13+
if: (!contains(github.event.pull_request.labels.*.name, 'skip changelog'))
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Check that CHANGELOG is touched
18+
run: |
19+
git fetch origin ${{ github.base_ref }} --depth 1 && \
20+
git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
# Avoid duplicate builds on PRs.
6+
branches:
7+
- main
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
lint:
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Update Rust toolchain
23+
run: rustup update
24+
- name: Rust Cache
25+
uses: Swatinem/[email protected]
26+
- name: Clippy
27+
run: cargo clippy --all-targets --locked -- --deny warnings
28+
- name: rustfmt
29+
run: cargo fmt -- --check
30+
- name: Clippy
31+
run: cargo clippy --all-targets --locked --features bullet_stream -- --deny warnings
32+
33+
unit-test:
34+
runs-on: ubuntu-24.04
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Update Rust toolchain
39+
run: rustup update
40+
- name: Rust Cache
41+
uses: Swatinem/[email protected]
42+
- name: Run unit tests
43+
run: cargo test --locked
44+
45+
readme-updated:
46+
runs-on: ubuntu-24.04
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
- name: Update Rust toolchain
51+
run: rustup update
52+
- name: Rust Cache
53+
uses: Swatinem/[email protected]
54+
- name: Install cargo readme
55+
run: cargo install cargo-rdme
56+
- name: Check if README.md is up-to-date (see README.md for updating instructions)
57+
run: cargo rdme -w cache_diff --check

.gitignore

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

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Unreleased
2+
3+
## 1.0.0
4+
5+
- Changed: Error when deriving CacheDiff when zero comparison fields are found. This can happen if the struct has no fields or if all fields are `ignore`-d (https://github.com/schneems/cache_diff/pull/4)
6+
7+
## 0.1.0
8+
9+
- Initial release

CODEOWNERS

Whitespace-only changes.

CODE_OF_CONDUCT.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Salesforce Open Source Community Code of Conduct
2+
3+
## About the Code of Conduct
4+
5+
Equality is a core value at Salesforce. We believe a diverse and inclusive
6+
community fosters innovation and creativity, and are committed to building a
7+
culture where everyone feels included.
8+
9+
Salesforce open-source projects are committed to providing a friendly, safe, and
10+
welcoming environment for all, regardless of gender identity and expression,
11+
sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
12+
race, age, religion, level of experience, education, socioeconomic status, or
13+
other similar personal characteristics.
14+
15+
The goal of this code of conduct is to specify a baseline standard of behavior so
16+
that people with different social values and communication styles can work
17+
together effectively, productively, and respectfully in our open source community.
18+
It also establishes a mechanism for reporting issues and resolving conflicts.
19+
20+
All questions and reports of abusive, harassing, or otherwise unacceptable behavior
21+
in a Salesforce open-source project may be reported by contacting the Salesforce
22+
Open Source Conduct Committee at [email protected].
23+
24+
## Our Pledge
25+
26+
In the interest of fostering an open and welcoming environment, we as
27+
contributors and maintainers pledge to making participation in our project and
28+
our community a harassment-free experience for everyone, regardless of gender
29+
identity and expression, sexual orientation, disability, physical appearance,
30+
body size, ethnicity, nationality, race, age, religion, level of experience, education,
31+
socioeconomic status, or other similar personal characteristics.
32+
33+
## Our Standards
34+
35+
Examples of behavior that contributes to creating a positive environment
36+
include:
37+
38+
* Using welcoming and inclusive language
39+
* Being respectful of differing viewpoints and experiences
40+
* Gracefully accepting constructive criticism
41+
* Focusing on what is best for the community
42+
* Showing empathy toward other community members
43+
44+
Examples of unacceptable behavior by participants include:
45+
46+
* The use of sexualized language or imagery and unwelcome sexual attention or
47+
advances
48+
* Personal attacks, insulting/derogatory comments, or trolling
49+
* Public or private harassment
50+
* Publishing, or threatening to publish, others' private information—such as
51+
a physical or electronic address—without explicit permission
52+
* Other conduct which could reasonably be considered inappropriate in a
53+
professional setting
54+
* Advocating for or encouraging any of the above behaviors
55+
56+
## Our Responsibilities
57+
58+
Project maintainers are responsible for clarifying the standards of acceptable
59+
behavior and are expected to take appropriate and fair corrective action in
60+
response to any instances of unacceptable behavior.
61+
62+
Project maintainers have the right and responsibility to remove, edit, or
63+
reject comments, commits, code, wiki edits, issues, and other contributions
64+
that are not aligned with this Code of Conduct, or to ban temporarily or
65+
permanently any contributor for other behaviors that they deem inappropriate,
66+
threatening, offensive, or harmful.
67+
68+
## Scope
69+
70+
This Code of Conduct applies both within project spaces and in public spaces
71+
when an individual is representing the project or its community. Examples of
72+
representing a project or community include using an official project email
73+
address, posting via an official social media account, or acting as an appointed
74+
representative at an online or offline event. Representation of a project may be
75+
further defined and clarified by project maintainers.
76+
77+
## Enforcement
78+
79+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
80+
reported by contacting the Salesforce Open Source Conduct Committee
81+
at [email protected]. All complaints will be reviewed and investigated
82+
and will result in a response that is deemed necessary and appropriate to the
83+
circumstances. The committee is obligated to maintain confidentiality with
84+
regard to the reporter of an incident. Further details of specific enforcement
85+
policies may be posted separately.
86+
87+
Project maintainers who do not follow or enforce the Code of Conduct in good
88+
faith may face temporary or permanent repercussions as determined by other
89+
members of the project's leadership and the Salesforce Open Source Conduct
90+
Committee.
91+
92+
## Attribution
93+
94+
This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
95+
version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
96+
It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
97+
[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].
98+
99+
This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
100+
101+
[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/)
102+
[golang-coc]: https://golang.org/conduct
103+
[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
104+
[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
105+
[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
*This is a suggested `CONTRIBUTING.md` file template for use by open sourced Salesforce projects. The main goal of this file is to make clear the intents and expectations that end-users may have regarding this project and how/if to engage with it. Adjust as needed (especially look for `heroku-buildpacks/cache_diff` which refers to the org and repo name of your project) and remove this paragraph before committing to your repo.*
2+
3+
# Contributing Guide For cache_diff
4+
5+
This page lists the operational governance model of this project, as well as the recommendations and requirements for how to best contribute to cache_diff. We strive to obey these as best as possible. As always, thanks for contributing – we hope these guidelines make it easier and shed some light on our approach and processes.
6+
7+
8+
## Run tests
9+
10+
Install [rust](https://www.rust-lang.org/tools/install), then execute:
11+
12+
```
13+
$ cargo install
14+
$ cargo test
15+
```
16+
17+
More checks can be found in [ci.yml](.github/workflows/ci.yml).
18+
19+
## Governance Model
20+
21+
### Community Based
22+
23+
The intent and goal of open sourcing this project is to increase the contributor and user base. The governance model is one where new project leads (`admins`) will be added to the project based on their contributions and efforts, a so-called "do-acracy" or "meritocracy" similar to that used by all Apache Software Foundation projects.
24+
25+
## Issues, requests & ideas
26+
27+
Use GitHub Issues page to submit issues, enhancement requests and discuss ideas.
28+
29+
### Bug Reports and Fixes
30+
31+
- If you find a bug, please search for it in the [Issues](https://github.com/heroku-buildpacks/cache_diff/issues), and if it isn't already tracked,
32+
[create a new issue](https://github.com/heroku-buildpacks/cache_diff/issues/new). Fill out the "Bug Report" section of the issue template. Even if an Issue is closed, feel free to comment and add details, it will still
33+
be reviewed.
34+
- Issues that have already been identified as a bug (note: able to reproduce) will be labelled `bug`.
35+
- If you'd like to submit a fix for a bug, [send a Pull Request](#creating_a_pull_request) and mention the Issue number.
36+
- Include tests that isolate the bug and verifies that it was fixed.
37+
38+
### New Features
39+
40+
- If you'd like to add new functionality to this project, describe the problem you want to solve in a [new Issue](https://github.com/heroku-buildpacks/cache_diff/issues/new).
41+
- Issues that have been identified as a feature request will be labelled `enhancement`.
42+
- If you'd like to implement the new feature, please wait for feedback from the project
43+
maintainers before spending too much time writing the code. In some cases, `enhancement`s may
44+
not align well with the project objectives at the time.
45+
46+
### Tests, Documentation, Miscellaneous
47+
48+
- If you'd like to improve the tests, you want to make the documentation clearer, you have an
49+
alternative implementation of something that may have advantages over the way its currently
50+
done, or you have any other change, we would be happy to hear about it!
51+
- If its a trivial change, go ahead and [send a Pull Request](#creating_a_pull_request) with the changes you have in mind.
52+
- If not, [open an Issue](https://github.com/heroku-buildpacks/cache_diff/issues/new) to discuss the idea first.
53+
54+
# Contribution Checklist
55+
56+
- [x] Clean, simple, well styled code
57+
- [x] Update the CHANGELOG.md if the effects of the PR are observable by users of this repo. Otherwise apply the `skip changelog` label to the PR once opened.
58+
- [x] Commits should be atomic and messages must be descriptive. Related issues should be mentioned by Issue number.
59+
- [x] Comments
60+
- Module-level & function-level comments.
61+
- Comments on complex blocks of code or algorithms (include references to sources).
62+
- [x] Tests
63+
- The test suite, if provided, must be complete and pass
64+
- Increase code coverage, not versa.
65+
- [x] Dependencies
66+
- Minimize number of dependencies. Optionally put them behind feature flags
67+
- Prefer Apache 2.0, BSD3, MIT, ISC and MPL licenses.
68+
- [x] Reviews
69+
- Changes must be approved via peer code review
70+
71+
# Creating a Pull Request
72+
73+
1. **Ensure the bug/feature was not already reported** by searching on GitHub under Issues. If none exists, create a new issue so that other contributors can keep track of what you are trying to add/fix and offer suggestions (or let you know if there is already an effort in progress).
74+
3. **Clone** the forked repo to your machine.
75+
4. **Create** a new branch to contain your work (e.g. `git br fix-issue-11`)
76+
4. **Commit** changes to your own branch.
77+
5. **Push** your work back up to your fork. (e.g. `git push fix-issue-11`)
78+
6. **Submit** a Pull Request against the `main` branch and refer to the issue(s) you are fixing. Try not to pollute your pull request with unintended changes. Keep it simple and small.
79+
7. **Sign** the Salesforce CLA (you will be prompted to do so when submitting the Pull Request)
80+
81+
> **NOTE**: Be sure to [sync your fork](https://help.github.com/articles/syncing-a-fork/) before making a pull request.
82+
83+
# Code of Conduct
84+
85+
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md).
86+
87+
# License
88+
89+
By contributing your code, you agree to license your contribution under the terms of our project [LICENSE](LICENSE.txt) and to sign the [Salesforce CLA](https://cla.salesforce.com/sign-cla)

0 commit comments

Comments
 (0)