-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/security
- Loading branch information
Showing
11 changed files
with
79 additions
and
172 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 |
---|---|---|
@@ -1,111 +1,37 @@ | ||
name: CI | ||
name: "Continuous integration" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
ci: | ||
name: CI checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
- 1.45.0 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
components: clippy | ||
override: true | ||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Install cargo-make | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-make | ||
- name: Build | ||
if: ${{ matrix.rust != 'stable' }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: make | ||
args: ci-build | ||
- name: Build and lint | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
if: ${{ matrix.rust == 'stable' }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: make | ||
args: ci-lint | ||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
components: rustfmt | ||
override: true | ||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Install cargo-make | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-make | ||
- name: Check format | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: make | ||
args: ci-format | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
- 1.45.0 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
toolchain: "1.61.0" # TODO: Pull this from Cargo.toml? | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: clippy, rustfmt | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
components: "" | ||
override: true | ||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Install cargo-make | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-make | ||
- name: Run tests and generate coverage report | ||
uses: actions-rs/cargo@v1 | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
command: make | ||
args: ci-test | ||
- name: Upload to codecov.io | ||
tool: cargo-msrv,cargo-tarpaulin | ||
- run: ./scripts/ci/format | ||
- run: ./scripts/ci/check | ||
- run: ./scripts/ci/test | ||
- run: cargo msrv verify | ||
if: ${{ matrix.rust == 'stable' }} | ||
- uses: coverallsapp/github-action@v2 | ||
if: ${{ matrix.rust == 'stable' }} | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
fail_ci_if_error: true | ||
|
||
file: lcov.info | ||
format: lcov |
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 |
---|---|---|
|
@@ -2,4 +2,9 @@ target | |
Cargo.lock | ||
|
||
# Backups from `cargo fmt` | ||
*.rs.bk | ||
*.rs.bk | ||
|
||
# Coverage report | ||
lcov.* | ||
*.lcov | ||
*.profraw |
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
[package] | ||
name = "preferences" | ||
version = "3.0.0" | ||
version = "2.0.1-dev.0" | ||
authors = ["Andy Barron <[email protected]>"] | ||
edition = "2021" | ||
rust-version = "1.61.0" | ||
rust-version = "1.61.0" # syn | ||
|
||
description = "Read and write user-specific application data (in stable Rust)" | ||
documentation = "https://docs.rs/preferences" | ||
repository = "https://github.com/AndyBarron/preferences-rs" | ||
readme = "README.md" | ||
keywords = ["preferences", "user", "data", "persistent", "storage"] | ||
categories = ["config"] | ||
license = "MIT-0" | ||
|
||
[features] | ||
|
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 |
---|---|---|
@@ -1,21 +1,16 @@ | ||
The MIT License (MIT) | ||
MIT No Attribution | ||
|
||
Copyright (c) 2016 Andy Barron | ||
Copyright 2024 Andy Barron | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this | ||
software and associated documentation files (the "Software"), to deal in the Software | ||
without restriction, including without limitation the rights to use, copy, modify, | ||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so. | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
# preferences | ||
_Read and write user-specific application data in Rust_ | ||
|
||
[](https://crates.io/crates/preferences) | ||
[](https://travis-ci.org/AndyBarron/preferences-rs) | ||
[](https://ci.appveyor.com/project/AndyBarron/preferences-rs) | ||
[](https://crates.io/crates/preferences) | ||
 | ||
[](https://github.com/andybarron/preferences-rs/blob/main/LICENSE.txt) | ||
 | ||
|
||
[](https://docs.rs/preferences) | ||
[](https://github.com/andybarron/preferences-rs/actions/workflows/ci.yaml) | ||
[](https://coveralls.io/github/andybarron/preferences-rs) | ||
|
||
## Documentation | ||
https://docs.rs/preferences | ||
|
||
## Installation | ||
Add the following to your `Cargo.toml`: | ||
|
||
`preferences = "^1.1.0"` | ||
```sh | ||
cargo add preferences | ||
``` |
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,2 @@ | ||
#!/usr/bin/env sh | ||
cargo clippy --all-targets -- -Dwarnings |
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,2 @@ | ||
#!/usr/bin/env sh | ||
cargo fmt -- --check --verbose |
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,2 @@ | ||
#!/usr/bin/env sh | ||
cargo tarpaulin -v --all-features --ignore-tests --out Lcov |
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,2 @@ | ||
#!/usr/bin/env sh | ||
cargo release "$@" |
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