diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ff5c5b8..f849e288 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ executors: type: boolean default: false docker: - - image: plumeorg/plume-buildenv:v0.0.9 + - image: plumeorg/plume-buildenv:v0.3.0 - image: <<#parameters.postgres>>circleci/postgres:9.6-alpine<><<^parameters.postgres>>alpine:latest<> environment: POSTGRES_USER: postgres diff --git a/.circleci/images/plume-buildenv/Dockerfile b/.circleci/images/plume-buildenv/Dockerfile index 08ba9d37..03259fcb 100644 --- a/.circleci/images/plume-buildenv/Dockerfile +++ b/.circleci/images/plume-buildenv/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch-20190326 +FROM debian:buster-20201117 ENV PATH="/root/.cargo/bin:${PATH}" #install native/circleci/build dependancies diff --git a/.gitignore b/.gitignore index d8d6fd27..172aeb0b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ tags.* search_index .buildconfig __pycache__ +.vscode/ diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..70526898 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,158 @@ +# Changelog + + + +## [Unreleased] - No release date + +## [0.5.0] - 2020-06-21 + +### Added + +- Email blocklisting (#718) +- Syntax highlighting (#691) +- Persian localization (#782) +- Switchable tokenizer - enables Japanese full-text search (#776) +- Make database connections configurable by environment variables (#768) + +### Changed + +- Display likes and boost on post cards (#744) +- Rust 2018 (#726) +- Bump to LLVM to 9.0.0 to fix ARM builds (#737) +- Remove dependency on runtime-fmt (#773) +- Drop the -alpha suffix in release names, it is implied that Plume is not stable yet because of the 0 major version (Plume 1.0.0 will be the first stable release). + +### Fixed + +- Fix parsing of mentions inside a Markdown code block (be430c6) +- Fix RSS issues (#720) +- Fix Atom feed (#764) +- Fix default theme (#746) +- Fix shown password on remote interact pages (#741) +- Allow unicode hashtags (#757) +- Fix French grammar for for 0 (#760) +- Don't show boosts and likes for "all" and "local" in timelines (#781) +- Fix liking and boosting posts on remote instances (#762) + +## [0.4.0] - 2019-12-23 + +### Added + +- Add support for generic timeline (#525) +- Federate user deletion (#551) +- import migrations and don't require diesel_cli for admins (#555) +- Cache local instance (#572) +- Initial RTL support #575 (#577) +- Confirm deletion of blog (#602) +- Make a distinction between moderators and admins (#619) +- Theming (#624) +- Add clap to plume in order to print help and version (#631) +- Add Snapcraft metadata and install/maintenance hooks (#666) +- Add environmental variable to control path of media (#683) +- Add autosaving to the editor (#688) +- CI: Upload artifacts to pull request deploy environment (#539) +- CI: Upload artifact of wasm binary (#571) + +### Changed + +- Update follow_remote.rs.html grammar (#548) +- Add some feedback when performing some actions (#552) +- Theme update (#553) +- Remove the new index lock tantivy uses (#556) +- Reduce reqwest timeout to 5s (#557) +- Improve notification management (#561) +- Fix occurrences of 'have been' to 'has been' (#578) + Direct follow-up to #578 (#603) +- Store password reset requests in database (#610) +- Use futures and tokio to send activities (#620) +- Don't ignore dotenv errors (#630) +- Replace the input! macro with an Input builder (#646) +- Update default license (#659) +- Paginate the outbox responses. Fixes #669 (#681) +- Use the "classic" editor by default (#697) +- Fix issue #705 (#708) +- Make comments in styleshhets a bit clearer (#545) +- Rewrite circleci config (#558) +- Use openssl instead of sha256sum for build.rs (#568) +- Update dependencies (#574) +- Refactor code to use Shrinkwraprs and diesel-derive-newtype (#598) +- Add enum containing all successful route returns (#614) +- Update dependencies which depended on nix -- fixes arm32 builds (#615) +- Update some documents (#616) +- Update dependencies (#643) +- Make the comment syntax consistent across all CSS (#487) + +### Fixed + +- Remove r (#535) +- Fix certain improper rendering of forms (#560) +- make hashtags work in profile summary (#562) +- Fix some federation issue (#573) +- Prevent comment form submit button distortion on iOS (#592) +- Update textarea overflow to scroll (#609) +- Fix arm builds (#612) +- Fix theme caching (#647) +- Fix issue #642, frontend not in English if the user language does not exist (#648) +- Don't index drafts (#656) +- Fill entirely user on creation (#657) +- Delete notification on user deletion (#658) +- Order media so that latest added are top (#660) +- Fix logo URL (#664) +- Snap: Ensure cargo-web doesn't erroneously adopt our workspace. (#667) +- Snap: Another fix for building (#668) +- Snap: Fix build for non-Tier-1 Rust platforms (#672) +- Don't split sentences for translations (#677) +- Escape href quotation marks (#678) +- Re-add empty strings in translation (#682) +- Make the search index creation during migration respect SEARCH_INDEX (#689) +- Fix the navigation menu not opening on touch (#690) +- Make search items optional (#693) +- Various snap fixes (#698) +- Fix #637 : Markdown footnotes (#700) +- Fix lettre (#706) +- CI: Fix Crowdin upload (#576) + +### Removed + +- Remove the Canapi dependency (#540) +- Remove use of Rust in migrations (#704) + +## [0.3.0] - 2019-04-19 + +### Added + +- Cover for articles (#299, #387) +- Password reset (#448) +- New editor (#293, #458, #482, #483, #486, #530) +- Search (#324, #375, #445) +- Edit blogs (#460, #494, #497) +- Hashtags in articles (#283, #295) +- API endpoints (#245, #285, #307) +- A bunch of new translations! (#479, #501, #506, #510, #512, #514) + +### Changed + +- Federation improvements (#216, #217, #357, #364, #399, #443, #446, #455, #502, #519) +- Improved build process (#281, #374, #392, #402, #489, #498, #503, #511, #513, #515, #528) + +### Fixes + +- UI usability fixes (#370, #386, #401, #417, #418, #444, #452, #480, #516, #518, #522, #532) + +## [0.2.0] - 2018-09-12 + +### Added + +- Article publishing, or save as a draft +- Like, or boost an article +- Basic Markdown editor +- Federated commenting system +- User account creation +- Limited federation on other platforms and subscribing to users +- Ability to create multiple blogs + + +[Unreleased]: https://github.com/Plume-org/Plume/compare/0.5.0...HEAD +[0.5.0]: https://github.com/Plume-org/Plume/compare/0.4.0-alpha-4...0.5.0 +[0.4.0]: https://github.com/Plume-org/Plume/compare/0.3.0-alpha-2...0.4.0-alpha-4 +[0.3.0]: https://github.com/Plume-org/Plume/compare/0.2.0-alpha-1...0.3.0-alpha-2 +[0.2.0]: https://github.com/Plume-org/Plume/releases/tag/0.2.0-alpha-1 diff --git a/Cargo.toml b/Cargo.toml index 3c16059b..b005853a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Plume contributors"] name = "plume" -version = "0.4.0" +version = "0.5.0" repository = "https://github.com/Plume-org/Plume" edition = "2018" diff --git a/Dockerfile.dev b/Dockerfile.dev index dd4c37e1..2b67c186 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -10,7 +10,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ make \ openssl \ - libssl-dev + libssl-dev\ + clang WORKDIR /scratch COPY script/wasm-deps.sh . diff --git a/crowdin.yml b/crowdin.yml index 7b9fa3a1..0eebdc23 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,5 +1,5 @@ -"project_identifier": "plume" -"api_key_env": CROWDIN_API_KEY +"project_id": 352097 +"api_token_env": "CROWDIN_API_KEY" preserve_hierarchy: true files: - source: /po/plume/plume.pot diff --git a/plume-api/Cargo.toml b/plume-api/Cargo.toml index ce51cc54..9a8b837d 100644 --- a/plume-api/Cargo.toml +++ b/plume-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-api" -version = "0.4.0" +version = "0.5.0" authors = ["Plume contributors"] edition = "2018" diff --git a/plume-api/release.toml b/plume-api/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-api/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/plume-cli/Cargo.toml b/plume-cli/Cargo.toml index 78827c11..20f8a08b 100644 --- a/plume-cli/Cargo.toml +++ b/plume-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-cli" -version = "0.4.0" +version = "0.5.0" authors = ["Plume contributors"] edition = "2018" diff --git a/plume-cli/release.toml b/plume-cli/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-cli/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/plume-common/Cargo.toml b/plume-common/Cargo.toml index 152c7930..87c11159 100644 --- a/plume-common/Cargo.toml +++ b/plume-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-common" -version = "0.4.0" +version = "0.5.0" authors = ["Plume contributors"] edition = "2018" diff --git a/plume-common/release.toml b/plume-common/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-common/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/plume-front/Cargo.toml b/plume-front/Cargo.toml index 90a89a5b..b11c756c 100644 --- a/plume-front/Cargo.toml +++ b/plume-front/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-front" -version = "0.4.0" +version = "0.5.0" authors = ["Plume contributors"] edition = "2018" diff --git a/plume-front/release.toml b/plume-front/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-front/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/plume-macro/Cargo.toml b/plume-macro/Cargo.toml index c5657377..d137f23e 100644 --- a/plume-macro/Cargo.toml +++ b/plume-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-macro" -version = "0.4.0" +version = "0.5.0" authors = ["Trinity Pointard "] edition = "2018" description = "Plume procedural macros" diff --git a/plume-macro/release.toml b/plume-macro/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-macro/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/plume-models/Cargo.toml b/plume-models/Cargo.toml index 9c368681..2e0e0436 100644 --- a/plume-models/Cargo.toml +++ b/plume-models/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "plume-models" -version = "0.4.0" +version = "0.5.0" authors = ["Plume contributors"] edition = "2018" diff --git a/plume-models/release.toml b/plume-models/release.toml new file mode 100644 index 00000000..9ede5518 --- /dev/null +++ b/plume-models/release.toml @@ -0,0 +1 @@ +pre-release-replacements = [] diff --git a/release.toml b/release.toml new file mode 100644 index 00000000..97c559dc --- /dev/null +++ b/release.toml @@ -0,0 +1,17 @@ +# we don't have a crate yet, so +disable-publish = true +# change when we all have gpg keys +sign-commit = false +dev-version-ext = 'dev' +# update all crates in plume at once: +consolidate-commits = true + +pre-release-hook = ["crowdin", "pull"] + +pre-release-replacements = [ + {file="CHANGELOG.md", search="Unreleased", replace="[{{version}}]"}, + {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, + {file="CHANGELOG.md", search="No release date", replace="{{date}}"}, + {file="CHANGELOG.md", search="", replace="\n\n## [Unreleased] - ReleaseDate", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/Plume-org/Plume/compare/{{tag_name}}...HEAD", exactly=1}, +] diff --git a/src/template_utils.rs b/src/template_utils.rs index 26bf58b4..0b126849 100644 --- a/src/template_utils.rs +++ b/src/template_utils.rs @@ -63,7 +63,10 @@ impl<'r> Responder<'r> for Ructe { let etag = format!("{:x}", hasher.finish()); if r.headers() .get("If-None-Match") - .any(|s| s[1..s.len() - 1] == etag) + // This check matches both weak and strong ETags + // NGINX (and maybe other software) sometimes sends ETags with a + // "W/" prefix, that we ignore here + .any(|s| s[1..s.len() - 1] == etag || s[3..s.len() - 1] == etag) { Response::build() .status(Status::NotModified)