8
16
Derivar 22
Gráfico de cometimentos

97 Cometimentos (8aa4ae43022889a93231cb8566c70d9239a80be5)

Autor(a) SHA1 Mensagem Data
Mina Galić 1dfad6469b
initialize Actor system in main, as well as SearcherActor há 4 anos
Mina Galić a107d35492
upgrade rocket* to the latest stable
before we embark on upgrading to async, and all the refactoring that
this will bring on us (see #797 & #799), we should keep our `main`
branch as stable and current as possible.
Let's start by upgrading rocket and its dependencies.
há 4 anos
KITAITI Makoto 92a386277b
Switchable tokenizer (#776)
* [REFACTORING]Rename whitespace_tokenizer to tag_tokenizer for
registration

Name representing its purpose is preferred.

* Add lindera-tantivy to plume-model's dependencies

* Install lindera-tantivy

* Add SearchTokenizerConfig struct

* Add search tokenizers to config option

* Use CONFIG for tokenizers

* Use enum to hold tokenizer config instead of initializing on config phase

* Use guard instead of duplicate default values

* Use as_deref() instead of guard

* Move SearchTokenizer from plume-models to plume-models::search::tokenizer

* Rename SearchTokenizer to TokenizerKind

* Define SearchTokenierConfig::determine_tokenizer()

* Use determine_tokenizer in SearchTokenizerConfig::init()

* Pass tokenizer config to Searcher methods

* Add LowerCase filter to Lindera tokenizer

* Add test for Lindera tokenizer

* Define SEARCH_LANG env to specify tokenizers set

* Run cargo fmt

* Make Lindera tokenizer optional

* Fix typos
há 4 anos
Daniel Watkins efb76a3c17
remove dependency on runtime-fmt (#773)
Per the issue, "runtime-fmt uses perma-unstable rust APIs and is
therefore susceptible to breakage".

This replaces the two calls to rt_format! with .replace() and drops the
dependency.

Fixes #769
há 4 anos
Ana Gelez 5f8d6b8e0e Rust 2018! (#726) há 4 anos
fdb-hiroshima 3663bffe5c Update compiler (#725)
* update compiler to recent nightly

* cargo fmt

* fix clippy

but ructe code is still complaining

* update circleci and rocket_csrf

* fix last clippy problems

* cargo fmt

* fix build issue

was caused be improper handling of recursive template (comment) by old ructe, which is fixed on newer version
há 4 anos
Violet Myers 458baf5f78 Syntax highlighting (#691)
* Syntax highlighting mostly... Exists.

* Add dependency to dockerfile

* Handle non-existent languages better

* Make the default a bit nicer

* Improve highlighting. Clean up function

* Add dark theme, add the comment scope to the allowed classes

* update build env

* Address review comments

* Use find_syntax_by_token which produces the desired behavior

* Change flat_map into flatten
(commit cargo.lock)
há 4 anos
Ana Gelez 597778fd2f release Alpha 4 (#709)
* Update version numbers

* Update translations again

* Translations?

* This time translations should be here
há 4 anos
fdb-hiroshima a9441a8804 Fix lettre (#706)
* Use lettre from crates.io instead of git

* fix previous migration

they were failing on some versions of sqlite and postgres
há 4 anos
fdb-hiroshima fb60236a54
update dependancies (#643)
* Bump activitystreams-derive from 0.1.0 to 0.1.1
* Bump tantivy from 0.9.1 to 0.10.1
* Bump rpassword from 3.0.2 to 4.0.1
* Bump num_cpus from 1.10.0 to 1.10.1
* Bump serde_qs from 0.4.6 to 0.5.0
* Bump stdweb-internal-runtime from 0.1.3 to 0.1.4
* [Security] Bump smallvec from 0.6.9 to 0.6.10
* Bump chrono from 0.4.6 to 0.4.7
* Bump bcrypt from 0.4.0 to 0.5.0
* Bump serde_json from 1.0.39 to 1.0.40
* Bump tokio from 0.1.21 to 0.1.22
* Bump scheduled-thread-pool from 0.2.0 to 0.2.2
* Bump stdweb from 0.4.14 to 0.4.18
* Bump hyper from 0.12.29 to 0.12.33
* Bump reqwest from 0.9.17 to 0.9.19
* Bump url from 1.7.2 to 2.1.0
há 5 anos
fdb-hiroshima 4f7c20fc26 Fix some federation issue (#573)
* send scheme as part of webfinger remote follow template

fix tsileo/microblog.pub#49

* bump webfinger to 0.4.1

* cargo fmt

* revert translations

* Use group: prefix for blog webfinger queries
há 5 anos
Wilfried OLLIVIER c031804464 Add clap to plume in order to print help and version (#631)
* Add clap in order to print help and version

Related to https://github.com/Plume-org/Plume/issues/594

* Update after_help text message
há 5 anos
Igor Galić 8c59c822b6 refactor code to use Shrinkwraprs and diesel-derive-newtype (#598)
* add shrinkwraprs and implement Id thru it

This also means we can automatically convert Id to String without using
.into()!

* cleanup with the help of clippy!

* cleanup with the help of cargo fmt!

* remove extra block

* Shrinkwrap Page, ContentLen and RemoteForm

* translations
há 5 anos
fdb-hiroshima 5579f64dd0
update dependancies (#574)
[Security] Bump ammonia from 2.0.0 to 2.1.1
Bump bcrypt from 0.2.2 to 0.4.0
Bump clap from 2.32.0 to 2.33.0
Bump colored from 1.7.0 to 1.8.0
Bump ctrlc from 3.1.1 to 3.1.2
Bump diesel from 1.4.1 to 1.4.2
Bump dotenv from 0.13.0 to 0.14.0
Bump hyper from 0.12.25 to 0.12.28
Bump openssl from 0.10.19 to 0.10.22
Bump proc-macro2 from 0.4.27 to 0.4.30
Bump reqwest from 0.9.11 to 0.9.16
Bump rpassword from 2.1.0 to 3.0.2
Bump serde_derive from 1.0.80 to 1.0.82
Bump serde_derive from 1.0.89 to 1.0.91
Bump serde from 1.0.89 to 1.0.91
Bump serde_qs from 0.4.5 to 0.4.6
Bump stdweb from 0.4.14 to 0.4.17
Bump syn from 0.11.11 to 0.15.27
Bump whatlang from 0.7.0 to 0.7.1
há 5 anos
fdb-hiroshima 49bb8cb0bc
import migrations and don't require diesel_cli for admins (#555)
* import migrations via macro

* panic on database not to the latest migration

* add subcommand to plm

* create migration that run tantivy index creation

* remove diesel_cli from places it was

* use our migration system for tests

* create table __diesel_schema_migrations if needed
há 5 anos
Baptiste Gelez ec57f1e687
Remove Canapi (#540)
* Remove Canapi

It added more complexity than it helped.

* Fail if there are many blog, but none was specified

* cargo fmt
há 5 anos
Baptiste Gelez 3ad1f6968c
Version bump: 0.3.0 (alpha 2) (#529) há 5 anos
Baptiste Gelez 68dd8602b2
New Crowdin translations (#479)
Enjoy!
há 5 anos
fdb-hiroshima 0d708e1639 Add support for remote interact (#519)
Add support for remote interaction ([this thing](https://eldritch.cafe/users/Barmaid/remote_follow) in mastodon)

- [x] create the endpoint dispatching remote interactions to local pages
- [x] add this endpoint to web-finger
- [x] propose remote interaction when following and not connected
- [x] propose remote interaction when liking/sharing and not connected
- [x] propose remote interaction when commenting and not connected
- [x] fetch posts/comments we don't know but remote interaction was requested for ?
há 5 anos
Baptiste Gelez 12efe721cc
Big refactoring of the Inbox (#443)
* Big refactoring of the Inbox

We now have a type that routes an activity through the registered handlers
until one of them matches.

Each Actor/Activity/Object combination is represented by an implementation of AsObject

These combinations are then registered on the Inbox type, which will try to deserialize
the incoming activity in the requested types.

Advantages:
- nicer syntax: the final API is clearer and more idiomatic
- more generic: only two traits (`AsActor` and `AsObject`) instead of one for each kind of activity
- it is easier to see which activities we handle and which one we don't

* Small fixes

- Avoid panics
- Don't search for AP ID infinitely
- Code style issues

* Fix tests

* Introduce a new trait: FromId

It should be implemented for any AP object.

It allows to look for an object in database using its AP ID, or to dereference it if it was not present in database

Also moves the inbox code to plume-models to test it (and write a basic test for each activity type we handle)

* Use if let instead of match

* Don't require PlumeRocket::intl for tests

* Return early and remove a forgotten dbg!

* Add more tests to try to understand where the issues come from

* Also add a test for comment federation

* Don't check creation_date is the same for blogs

* Make user and blog federation more tolerant to errors/missing fields

* Make clippy happy

* Use the correct Accept header when dereferencing

* Fix follow approval with Mastodon

* Add spaces to characters that should not be in usernames

And validate blog names too

* Smarter dereferencing: only do it once for each actor/object

* Forgot some files

* Cargo fmt

* Delete plume_test

* Delete plume_tests

* Update get_id docs + Remove useless : Sized

* Appease cargo fmt

* Remove dbg! + Use as_ref instead of clone when possible + Use and_then instead of map when possible

* Remove .po~

* send unfollow to local instance

* read cover from update activity

* Make sure "cc" and "to" are never empty

and fix a typo in a constant name

* Cargo fmt
há 5 anos
fdb-hiroshima eabe73ddc0
Add tests for plume webserver (#513)
* begin setup front-end test environment with selenium
* run migrations before tests
* use https for tests
há 5 anos
Baptiste Gelez 9076dbaadc
New editor (#458)
With this PR, when JS is activated and WASM supported, the article editor will be dynamically replaced with `contenteditable`s elements. This makes the editing interface simpler and less like a regular form. It will also allow us to easily add visual formatting with native browser APIs (and to insert images or videos directly). Here is a little demo:

![peek 05-03-2019 16-12](https://user-images.githubusercontent.com/16254623/53815536-1dc05680-3f62-11e9-94d3-b363ed84eb97.gif)

There is still a lot to do, but it is a good first step.

Fixes #255
há 5 anos
Baptiste Gelez 42dca3daae
Remove some unused #[derive] (#473)
We used to need them, probably when we were using Tera.
há 5 anos
Baptiste Gelez a2b9d7ec44
Password reset (#448)
* Password reset

* Various improvements and fixes for password reset

- Reorganize src/mail.rs to make it  cleaner
- add a build_mail function
- only make the requests invalid after 2 hours
- avoid infintely-growing list of requests by deleting them once completed, or after 24 hours
- avoid sending many requests for the same user
- validate the password reset form

* Avoid locking so many times

Fix durations

* Remove old requests even if the current one is not valid

* Remove unused feature

* Also remove the custom_derive and plugin features while we are at it

* Forgot a 0 è_é

* Avoid panicking while owning a request lock

* Use master branch of lettre so that we can build with the latest OpenSSL

* Fix the debug mailer
há 5 anos
zcdunn 7bac70a483 Update nodeinfo (#446)
Fix #433

I added the repo link to Cargo.toml so that `software.repository` could be configurable like @rhaamo suggested. I don't know if it's ok to include `software.repository` without bumping the schema version, but I didn't know if that would break any clients that parse nodeinfo with a hardcoded schema version.
há 5 anos
Baptiste Gelez 77bfe635d7
Update dependencies (#440) há 5 anos
Baptiste Gelez 7eef4643c8
Update rocket_i18n and add gettext_macros (#431)
Internationalization now uses proc-macros that generate the .pot file
automatically.
há 5 anos
fdb-hiroshima 944a9d08a7
Update dependencies (#428)
* Bump serde from 1.0.82 to 1.0.84
* Bump ructe from 0.5.4 to 0.5.6
* Bump colored from 1.6.1 to 1.7.0
* Bump itertools from 0.7.11 to 0.8.0
* Bump ammonia from 1.2.0 to 2.0.0
* Bump hyper from 0.12.19 to 0.12.20
* Bump serde_derive from 1.0.80 to 1.0.84
* Bump stdweb from 0.4.12 to 0.4.13
* Bump rsass from 0.9.4 to 0.9.6
* Bump failure from 0.1.3 to 0.1.5
* Bump reqwest from 0.9.5 to 0.9.8
* Bump serde_derive from 0.7.1 to 0.8.0
há 5 anos
Baptiste Gelez 3fce5d6a14
Use Rust for the front-end too (#374)
Rust can compile to WASM, so let's use it for front-end code as well.

To compile the front-end:

```
cargo install cargo-web
cargo web deploy -p plume-front
```
há 5 anos
Baptiste Gelez 8ff6332784
I'm not the only one who made Plume è_é (#373) há 5 anos
Baptiste Gelez 9e799f2cf2
Use SCSS (#355)
- Use variables
- Split everything in various files

The SCSS is compiled with `cargo build`/`run`

I also fixed a few visual issues.
há 5 anos
Trinity Pointard 21fe63665d Upgrade rocket_csrf
Fix #346
há 5 anos
fdb-hiroshima e1ecc7289f
Upgrade plume dependencies (#332)
* Bump base64 from 0.9.3 to 0.10.0
* Bump bcrypt from 0.2.0 to 0.2.1
* Bump canapi from 0.1.0 to 0.2.0
* Bump failure from 0.1.2 to 0.1.3
* Bump hyper from 0.11.27 to 0.12.11
* Bump hyper from 0.11.27 to 0.12.16
* Bump lazy_static from 1.1.0 to 1.2.0
* Bump multipart from 0.15.3 to 0.15.4
* Bump openssl from 0.10.12 to 0.10.15
* Bump pulldown-cmark from 0.1.2 to 0.2.0
* Bump reqwest from 0.9.2 to 0.9.5
* Bump rocket from 0.4.0-rc.1 to 0.4.0
* Bump rpassword from 2.0.0 to 2.1.0
* Bump ructe from 0.5.2 to 0.5.4
* Bump serde_derive from 1.0.79 to 1.0.80
* Bump serde from 1.0.79 to 1.0.80
* Bump serde_json from 1.0.32 to 1.0.33
* Bump tera from 0.11.17 to 0.11.20
* Bump url from 1.7.1 to 1.7.2
* Bump validator to from 0.7.2 to 0.8.0
* Bump validator_derive from 0.7.2 to 0.8.0
* Bump whatlang from 0.5.0 to 0.6.0
* Remove hyper from plume-common dependencies
* Remove rpassword from Plume dependancies
* Upgrade compiler to nightly-2018-12-06
há 5 anos
Baptiste Gelez 70af57c6e1
Use Ructe (#327)
All the template are now compiled at compile-time with the `ructe` crate.

I preferred to use it instead of askama because it allows more complex Rust expressions, where askama only supports a small subset of expressions and doesn't allow them everywhere (for instance, `{{ macro!() | filter }}` would result in a parsing error).

The diff is quite huge, but there is normally no changes in functionality.

Fixes #161 and unblocks #110 and #273
há 5 anos
fdb-hiroshima 449641d158
Add a search engine into Plume (#324)
* Add search engine to the model

Add a Tantivy based search engine to the model
Implement most required functions for it

* Implement indexing and plm subcommands

Implement indexation on insert, update and delete
Modify func args to get the indexer where required
Add subcommand to initialize, refill and unlock search db

* Move to a new threadpool engine allowing scheduling

* Autocommit search index every half an hour

* Implement front part of search

Add default fields for search
Add new routes and templates for search and result
Implement FromFormValue for Page to reuse it on search result pagination
Add optional query parameters to paginate template's macro
Update to newer rocket_csrf, don't get csrf token on GET forms

* Handle process termination to release lock

Handle process termination
Add tests to search

* Add proper support for advanced search

Add an advanced search form to /search, in template and route
Modify Tantivy schema, add new tokenizer for some properties
Create new String query parser
Create Tantivy query AST from our own

* Split search.rs, add comment and tests

Split search.rs into multiple submodules
Add comments and tests for Query
Make user@domain be treated as one could assume
há 5 anos
Trinity Pointard 00a205a882 Update debian installation doc
fix #305
Update debian installation doc
Remove need for libpq when compiling with sqlite backend
Remove some unneaded features of multipart to speed up compilation
há 6 anos
Trinity Pointard ed5bafbbc4 Update webfinger and reqwest
Update webfinger to 0.3.1
Update reqwest to 0.9
Fix #257
há 6 anos
Bat d0d1210e21 Document new command-line tools há 6 anos
Baptiste Gelez b464671cf0
Merge pull request #226 from igalic/feat/sqlite
Add SQLite as supported database
há 6 anos
Trinity Pointard d3ed2d8af5 Fix regression and update rocket_csrf
Fix account creation, introduced by fceb9ab
Update to latest rocket_csrf
há 6 anos
Bat 38d737ed0c
Introduce features to choose between SQlite or Postgres há 6 anos
Igor Galić e5691f7b23
add sqlite as diesel dependency há 6 anos
Trinity Pointard fceb9ab0cd Update cookie management a bit
Update to latest rocket_csrf
Make user_id a samesite lax cookie (see https://github.com/Plume-org/Plume/issues/233#issuecomment-422660275)
há 6 anos
Bat 72fd9eb610 API: Filter posts in the list há 6 anos
Bat f893056d6d Mount the API endpoints há 6 anos
Bat 1500267125 Add canapi and try to use for the API há 6 anos
Bat 8fa83dfe25 Version bump
0.1.x was the pre-alpha.

The first Alpha will be 0.2.x
há 6 anos
Bat 8879935925 Add the possibility to save an article as draft há 6 anos
Bat a3b7d5557b Allow newer Tera versions
Tera 0.11.15 was released, and fixes the bug that forced us to downgrade.
há 6 anos
Bat 2f53cb9122 Update rocket_csrf há 6 anos