From 90fdade566c6b3d15f1ecdaad2479fb877f9d9f6 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Thu, 25 Jun 2020 21:49:03 +0200 Subject: [PATCH 1/8] Better caching Based on @trinity-1686a's patch: https://github.com/Plume-org/Plume/issues/786#issuecomment-647170325 --- src/template_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/template_utils.rs b/src/template_utils.rs index 26bf58b4..25c703a3 100644 --- a/src/template_utils.rs +++ b/src/template_utils.rs @@ -63,7 +63,7 @@ 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) + .any(|s| s[1..s.len() - 1] == etag || s[3..s.len() - 1] == etag) { Response::build() .status(Status::NotModified) From 719fec0828ae52579dc11a708821701b3a09fbc1 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Thu, 25 Jun 2020 22:26:44 +0200 Subject: [PATCH 2/8] Add a comment --- src/template_utils.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/template_utils.rs b/src/template_utils.rs index 25c703a3..0b126849 100644 --- a/src/template_utils.rs +++ b/src/template_utils.rs @@ -63,6 +63,9 @@ impl<'r> Responder<'r> for Ructe { let etag = format!("{:x}", hasher.finish()); if r.headers() .get("If-None-Match") + // 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() From 23a56340350cd53c9ca99f9801e13ea71a896000 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 6 Dec 2020 22:26:30 +0900 Subject: [PATCH 3/8] Update distro of Docker image for testing --- .circleci/images/plume-buildenv/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From f5b18dffafe20ae84141a86d16fbb31cc612ce93 Mon Sep 17 00:00:00 2001 From: KitaitiMakoto Date: Sun, 6 Dec 2020 15:52:27 +0000 Subject: [PATCH 4/8] cargo release helper (again) (#835) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove tag-prefix deletion as discussed here: https://github.com/igalic/Plume/pull/1 Update all versions numbers Update Crowdin config to v3 + Pull translations with cargo release Follow a more standard CHANGELOG format add release.toml configuration file for cargo-release and also add overrides in all other crates, since we only have one CHANGELOG.md: https://github.com/sunng87/cargo-release/issues/205 we might wanna have that looked at or fixed ignore .vscode/ add / backfill Changelog.md Co-authored-by: Mina Galić Co-authored-by: Ana Gelez Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/835 --- .gitignore | 1 + CHANGELOG.md | 158 ++++++++++++++++++++++++++++++++++++++ Cargo.toml | 2 +- crowdin.yml | 4 +- plume-api/Cargo.toml | 2 +- plume-api/release.toml | 1 + plume-cli/Cargo.toml | 2 +- plume-cli/release.toml | 1 + plume-common/Cargo.toml | 2 +- plume-common/release.toml | 1 + plume-front/Cargo.toml | 2 +- plume-front/release.toml | 1 + plume-macro/Cargo.toml | 2 +- plume-macro/release.toml | 1 + plume-models/Cargo.toml | 2 +- plume-models/release.toml | 1 + release.toml | 17 ++++ 17 files changed, 191 insertions(+), 9 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 plume-api/release.toml create mode 100644 plume-cli/release.toml create mode 100644 plume-common/release.toml create mode 100644 plume-front/release.toml create mode 100644 plume-macro/release.toml create mode 100644 plume-models/release.toml create mode 100644 release.toml 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/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}, +] From f8d098f353aeff2c1e6e083d1f54a0b27798c852 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 7 Dec 2020 01:58:41 +0900 Subject: [PATCH 5/8] Update Docker image for testing --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ff5c5b8..7f673a60 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.2.0 - image: <<#parameters.postgres>>circleci/postgres:9.6-alpine<><<^parameters.postgres>>alpine:latest<> environment: POSTGRES_USER: postgres From 50462204e82056cde2ac54e271bd64f611c188ca Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 1 Dec 2020 08:38:58 +0900 Subject: [PATCH 6/8] Run cargo fmt --- plume-common/src/utils.rs | 3 +-- src/routes/instance.rs | 2 +- src/routes/posts.rs | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/plume-common/src/utils.rs b/plume-common/src/utils.rs index e673adfc..89d5b3a2 100644 --- a/plume-common/src/utils.rs +++ b/plume-common/src/utils.rs @@ -294,8 +294,7 @@ pub fn md_to_html<'a>( } let hashtag = text_acc; let link = Tag::Link( - format!("{}tag/{}", base_url, &hashtag) - .into(), + format!("{}tag/{}", base_url, &hashtag).into(), hashtag.to_owned().into(), ); diff --git a/src/routes/instance.rs b/src/routes/instance.rs index 3d469ee2..d94b4f2d 100644 --- a/src/routes/instance.rs +++ b/src/routes/instance.rs @@ -215,7 +215,7 @@ pub fn add_email_blocklist( if let Err(Error::Db(_)) = result { Ok(Flash::error( Redirect::to(uri!(admin_email_blocklist: page = None)), - i18n!(rockets.intl.catalog, "Email already blocked") + i18n!(rockets.intl.catalog, "Email already blocked"), )) } else { Ok(Flash::success( diff --git a/src/routes/posts.rs b/src/routes/posts.rs index 3e5d6004..399a87f1 100644 --- a/src/routes/posts.rs +++ b/src/routes/posts.rs @@ -318,9 +318,7 @@ pub fn update( .filter(|t| !t.is_empty()) .collect::>() .into_iter() - .filter_map(|t| { - Tag::build_activity(t.to_string()).ok() - }) + .filter_map(|t| Tag::build_activity(t.to_string()).ok()) .collect::>(); post.update_tags(&conn, tags) .expect("post::update: tags error"); From 5321f3cf1809895f0819b37fb55b175e34de7e30 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 7 Dec 2020 07:47:11 +0900 Subject: [PATCH 7/8] Add clang dependency in Dockerfile.dev --- Dockerfile.dev | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 . From ac7ffae1211bc63f82468e7d2b1dafe1f3417bc0 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 7 Dec 2020 07:50:33 +0900 Subject: [PATCH 8/8] Update plumeorg/plume-buildenv used on CI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f673a60..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.2.0 + - image: plumeorg/plume-buildenv:v0.3.0 - image: <<#parameters.postgres>>circleci/postgres:9.6-alpine<><<^parameters.postgres>>alpine:latest<> environment: POSTGRES_USER: postgres