Compare commits

...

18 Commits

Author SHA1 Message Date
Orhun Parmaksız 3fccfd61c8
Merge branch 'master' into feature/full-async 2024-04-04 01:03:25 +03:00
dependabot[bot] 15e3619479
chore(deps): bump tokio from 1.36.0 to 1.37.0 (#268)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2024-04-04 00:09:29 +03:00
Orhun Parmaksız 2037530078
refactor(ci): provide codecov token via env
https://github.com/codecov/codecov-action/issues/1292
2024-04-04 00:03:57 +03:00
Orhun Parmaksız 44c07a3eb6
chore(release): prepare for v0.15.0 2024-03-27 23:03:10 +03:00
Orhun Parmaksız 64d783bd0d
chore(deps): bump all dependencies 2024-03-27 22:49:10 +03:00
Orhun Parmaksız 1fd561f869
docs(readme): add packaging status badge 2024-03-27 17:39:35 +03:00
dependabot[bot] c6d6da6296
chore(deps): bump codecov/codecov-action from 3 to 4 (#237)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:35:54 +03:00
Orhun Parmaksız 54e2ddc91a
chore(deps): bump serde from 1.0.196 to 1.0.197 2024-03-27 17:35:12 +03:00
dependabot[bot] 8e505c0da8
chore(deps): bump regex from 1.10.3 to 1.10.4 (#267)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:34:04 +03:00
Orhun Parmaksız 0f0ba72305
chore(deps): bump shuttle dependencies 2024-03-27 17:33:23 +03:00
dependabot[bot] 77e97573ef
chore(deps): bump tokio from 1.35.1 to 1.36.0 (#242)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:27:22 +03:00
dependabot[bot] 40f5d909ca
chore(deps): bump config from 0.13.4 to 0.14.0 (#240)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:27:07 +03:00
dependabot[bot] 567480a21e
chore(deps): bump actix-files from 0.6.2 to 0.6.5 (#225)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:25:43 +03:00
dependabot[bot] e8c342af46
chore(deps): bump ring from 0.17.7 to 0.17.8 (#248)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:25:13 +03:00
dependabot[bot] 1442771a57
chore(deps): bump awc from 3.3.0 to 3.4.0 (#243)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 17:24:56 +03:00
Orhun Parmaksız dadd88c240
chore(license): update the copyright years 2024-03-24 23:45:04 +03:00
Orhun Parmaksız e3b00453d9
chore(github): update funding options 2024-03-24 23:44:34 +03:00
Helmut K. C. Tessarek b2acb71d0d
refactor(ci): replace unmaintained action (#266) 2024-03-23 11:47:23 +01:00
8 changed files with 481 additions and 698 deletions

2
.github/FUNDING.yml vendored
View File

@ -1,3 +1,3 @@
github: orhun
patreon: orhunp
custom: ["https://www.buymeacoffee.com/orhun"]
buy_me_a_coffee: orhun

View File

@ -7,17 +7,11 @@ on:
jobs:
audit:
name: Audit
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Run cargo-audit
uses: actions-rs/audit-check@v1
uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -37,14 +37,15 @@ jobs:
env:
OUT_DIR: target
- name: Upload reports to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
name: code-coverage-report
file: lcov.info
flags: unit-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
fixtures:
strategy:

View File

@ -5,6 +5,59 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.15.0] - 2024-03-27
### Added
- Allow to override filename when using `random_url` by @tessus in [#233](https://github.com/orhun/rustypaste/pull/233)
Now you can use the `filename` header to override the name of the uploaded file.
For example:
```sh
curl -F "file=@x.txt" -H "filename:override.txt" http://localhost:8000
```
Even if `random_url` is set, the filename will be override.txt
[`rustypaste-cli`](https://github.com/orhun/rustypaste-cli) also has a new argument for overriding the file name:
```sh
rpaste -n filename-on-server.txt awesome.txt
```
- Use more specific HTTP status codes by @tessus in [#262](https://github.com/orhun/rustypaste/pull/262)
`rustypaste` now returns more appropriate status codes in the following 2 cases (instead of a generic 500 code):
- If the mime type is on the blacklist: `UnsupportedMediaType` (415)
- If the file already exists: `Conflict` (409)
### Changed
- Do path joins more safely by @RealOrangeOne in [#247](https://github.com/orhun/rustypaste/pull/247)
- Gracefully exit when there is no config file found by @orhun
- Switch to cargo-llvm-cov for code coverage by @orhun in [#260](https://github.com/orhun/rustypaste/pull/260)
- Replace unmaintained action by @tessus in [#266](https://github.com/orhun/rustypaste/pull/266)
- Set up mergify by @orhun
- Apply clippy suggestions by @orhun
- Update funding options by @orhun
- Update the copyright years by @orhun
- Bump dependencies
### Fixed
- Improve logging for deleted file by @tessus in [#235](https://github.com/orhun/rustypaste/pull/235)
- Fix deployment by @tessus in [#236](https://github.com/orhun/rustypaste/pull/236)
- Return the correct file on multiple files with same name by @tessus in [#234](https://github.com/orhun/rustypaste/pull/234)
- Update the hash of the example file by @tessus in [#254](https://github.com/orhun/rustypaste/pull/254)
- Error on upload with the same filename by @tessus in [#258](https://github.com/orhun/rustypaste/pull/258)
### New Contributors
- @RealOrangeOne made their first contribution in [#247](https://github.com/orhun/rustypaste/pull/247)
## [0.14.4] - 2023-12-20
### Removed

1078
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[package]
name = "rustypaste"
version = "0.14.4"
version = "0.15.0"
edition = "2021"
description = "A minimal file upload/pastebin service"
authors = ["Orhun Parmaksız <orhunparmaksiz@gmail.com>"]
@ -19,14 +19,14 @@ rustls = ["actix-web/rustls-0_21", "awc/rustls-0_21"]
shuttle = ["dep:shuttle-actix-web", "dep:shuttle-runtime"]
[dependencies]
actix-web = { version = "4.4.1" }
actix-web = { version = "4.5.1" }
actix-web-grants = { version = "4.0.3" }
actix-multipart = "0.6.1"
actix-files = "0.6.2"
shuttle-actix-web = { version = "0.35.1", optional = true }
shuttle-runtime = { version = "0.35.1", optional = true }
awc = { version = "3.3.0" }
serde = "1.0.196"
actix-files = "0.6.5"
shuttle-actix-web = { version = "0.42.0", optional = true }
shuttle-runtime = { version = "0.42.0", optional = true }
awc = { version = "3.4.0" }
serde = "1.0.197"
futures-util = "0.3.30"
petname = { version = "1.1.3", default-features = false, features = [
"std_rng",
@ -36,22 +36,22 @@ rand = "0.8.5"
dotenvy = "0.15.7"
url = "2.5.0"
mime = "0.3.17"
regex = "1.10.3"
regex = "1.10.4"
serde_regex = "1.1.0"
lazy-regex = "3.1.0"
humantime = "2.1.0"
humantime-serde = "1.1.1"
glob = "0.3.1"
ring = "0.17.7"
ring = "0.17.8"
hotwatch = "0.5.0"
tokio = { version = "1.35.1", features = ["fs"] }
tokio = { version = "1.37.0", features = ["fs"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
uts2ts = "0.4.1"
path-clean = "1.0.1"
[dependencies.config]
version = "0.13.4"
version = "0.14.0"
default-features = false
features = ["toml", "yaml"]

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2021-2023 Orhun Parmaksız
Copyright (c) 2021-2024 Orhun Parmaksız
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -99,6 +99,13 @@ Here you can read the blog post about how it is deployed on Shuttle: [https://bl
## Installation
<details>
<summary>Packaging status</summary>
[![Packaging status](https://repology.org/badge/vertical-allrepos/rustypaste.svg)](https://repology.org/project/rustypaste/versions)
</details>
### From crates.io
```sh