Commit graph

13226 commits

Author SHA1 Message Date
Vincent Ambo
e761b2d295 feat(templates): Display author information in templates 2018-04-08 22:38:06 +02:00
Vincent Ambo
1c4d436eae feat(main): Configure & start OIDC actor when Converse launches 2018-04-08 22:37:52 +02:00
Vincent Ambo
a63bc782b0 feat(handler): Implement OIDC login & callback handlers 2018-04-08 22:37:36 +02:00
Vincent Ambo
115f50ae37 chore(models/schema): Update with author fields 2018-04-08 22:37:21 +02:00
Vincent Ambo
249f17b60a feat(oidc): Implement initial OIDC actor
Implements an actor that can perform OAuth2 logins (not really
OIDC-compliant yet because Rust doesn't have an easy to use JWT
library that supports JWKS, and I don't have time for that right now).

Currently this hardcodes some Office365-specific stuff.
2018-04-08 22:36:34 +02:00
Vincent Ambo
da33786939 feat(migrations): Add author columns to tables
Adds columns for author names and emails to both threads and posts.

"Users" don't (yet? who knows!) exist as independent entity in
Converse, they are simply "inferred" via OIDC providers.
2018-04-08 20:27:22 +02:00
Vincent Ambo
ef5f7af89c feat(templates): Add shitty little response form in thread view 2018-04-08 20:20:17 +02:00
Vincent Ambo
cf636077e6 feat(handlers): Add reply_thread handler for posts 2018-04-08 20:20:05 +02:00
Vincent Ambo
148dfc39c8 feat(db/models): Add handling of CreatePost message 2018-04-08 20:19:46 +02:00
Vincent Ambo
55b28f8136 feat(templates): Add a shitty thread submission form 2018-04-08 20:01:41 +02:00
Vincent Ambo
094b1e0722 feat(handlers): Add thread submission handler 2018-04-08 20:01:32 +02:00
Vincent Ambo
fc7ca2900d feat(db): Support CreateThread message 2018-04-08 19:41:28 +02:00
Vincent Ambo
f281749b8c feat(migrations): Default 'posted' columns to NOW() 2018-04-08 19:29:56 +02:00
Vincent Ambo
15d460bab3 refactor(db): Use ConverseError instead of unwrapping/expecting 2018-04-08 19:22:42 +02:00
Vincent Ambo
fdc1abe7cc feat(errors): Introduce error module with custom error type
Introduces an error type using the failure crate. This type has
foreign error links established to various errors that can occur
within Converse.
2018-04-08 19:21:56 +02:00
Vincent Ambo
c8cee945c5 refactor(main): Move handlers into separate handler module 2018-04-08 19:21:41 +02:00
Vincent Ambo
67a0642f8c feat(main): Support CONVERSE_BIND_HOST environment variable 2018-04-08 18:44:41 +02:00
Vincent Ambo
a1a6b77fdf refactor(main): Use actix-web extractor pattern 2018-04-08 18:42:01 +02:00
Vincent Ambo
316036b0a8 refactor(db): Establish Post->Thread association
This makes it possible to query posts by thread via Diesel.
2018-04-08 18:30:01 +02:00
Vincent Ambo
6e56f8e729 feat(main/templates): Add barebones single-thread view 2018-04-08 18:02:01 +02:00
Vincent Ambo
7dca9183c5 feat(db): Add initial GetThread message
Adds a GetThread message that returns a thread by ID. This does not
yet load posts.
2018-04-08 17:42:14 +02:00
Vincent Ambo
3db069c60d feat(main): Add support for Tera templates
Sets up the structure required to carry Tera templates in the
actix-web state.

The (still very barebones) index renderer has been updated to render a
Tera template.
2018-04-08 17:30:03 +02:00
Vincent Ambo
b83dd99e30 chore(cargo): Add dependency on tera
Adds tera as the templating engine.
2018-04-08 17:14:38 +02:00
Vincent Ambo
1402cfd948 feat(main): Add barebares thread listing
This ties together the first components here (actix, diesel etc.) to
provide a _very_ simple thread overview.
2018-04-08 17:05:28 +02:00
Vincent Ambo
36e520a2b2 feat(db): Implement ListThreads message
Implements support for a message for listing threads. This does not
have any pagination support yet.
2018-04-08 17:04:45 +02:00
Vincent Ambo
bea6eb8eb3 feat(db): Bootstrap DbExecutor actor
Bootstraps an Actix actor carrying DB connections. This actor will be
used to interact with converse's database.
2018-04-08 16:41:34 +02:00
Vincent Ambo
5604d933e8 feat(main): Add minimal thread listing example 2018-04-08 16:08:26 +02:00
Vincent Ambo
f3f509d463 feat(main): Bootstrap project entrypoint
This doesn't really do anything yet.
2018-04-08 15:49:27 +02:00
Vincent Ambo
72691c8d63 feat(models/schema): Map up posts & threads table 2018-04-08 15:49:19 +02:00
Vincent Ambo
042eb88fd7 feat(migrations): Add posts & threads tables 2018-04-08 15:48:56 +02:00
Vincent Ambo
106ade6e41 chore: Add bootstrapped Cargo project 2018-04-08 15:48:49 +02:00
Vincent Ambo
2fd8fa2321 chore: Initial commit 2018-04-08 15:48:38 +02:00
Samuel Dionne-Riel
9478f88681 Adds nix-shell test for special-cased ruby interpreter.
The test fakes the interpreter only to verify the arguments it would be
given.
2018-04-08 00:45:28 -04:00
Samuel Dionne-Riel
399f43c3d5 nix-shell: Fixes use with ruby shebangs.
The ported code in 80ebc553ec was incorrectly ported.

```
-            $envCommand = "exec $execArgs $interpreter -e 'load(\"$script\")' -- ${\(join ' ', (map shellEscape, @savedArgs))}";
...
+                    envCommand = (format("exec %1% %2% -e 'load(\"%3%\") -- %4%") % execArgs % interpreter % script % joined.str()).str();
```

The single-quote finishing the small ruby snippet was lost in
translation.
2018-04-07 22:38:45 -04:00
Nicolas Dudebout
d8a1c27806
fix typo in nix-env man page 2018-04-07 21:10:46 -04:00
Bogdan Seniuc
b828051659
release.nix: Use $sourceRoot instead of hardcoded source directory 2018-04-07 10:15:41 +03:00
Doug Beardsley
72902ec399 Add missing eval-okay-regex-split.exp test file 2018-04-06 12:18:59 -06:00
Eelco Dolstra
e10a7ec7eb
Merge pull request #2036 from AmineChikhaoui/disk-cache-ttl
Make the TTL for disk cache configurable
2018-04-06 12:51:26 +02:00
AmineChikhaoui
e01b01c579
update/re-order the options docs 2018-04-06 11:09:52 +01:00
AmineChikhaoui
62d75ad3e1
rename the options to mention it's a narinfo TTL as disk cache is used all over the place for other operations 2018-04-06 11:05:15 +01:00
AmineChikhaoui
33b08899d5
re-order the options using the alphabetical order and improve the example in the positive lookup case 2018-04-06 10:51:19 +01:00
AmineChikhaoui
86930ed414
add documentation for the local disk cache TTL config 2018-04-06 10:51:18 +01:00
AmineChikhaoui
2855c3d965
Make the TTL for disk cache configurable, we can now completely disable
disk cache lookup for example by doing:
  nix copy --from <binary-cahe> <store-path> --option \
  positive-disk-cache-ttl 0

Issues: #1885 #2035
2018-04-06 10:51:18 +01:00
Eelco Dolstra
27e9ce0eb2
Merge pull request #2040 from erictapen/doc-tofile-writetextfile
document that writeTextFile from Nixpkgs is an alternative to toFile
2018-04-06 11:27:55 +02:00
Andrew Dunham
0081a1eac2 Use $CPPFLAGS when detecting version of aws-sdk-cpp 2018-04-06 00:25:34 -07:00
Eelco Dolstra
1d9742b95f
<nix/buildenv.nix>: Ignore dangling symlinks
Fixes

  error: getting status of '/nix/store/j8p0vv89k1pf0cn7kmfsdcs7bshwga1i-firefox-52.7.2esr/share/icons/hicolor/48x48/apps/firefox.png': No such file or directory

https://github.com/NixOS/nix/issues/1934

Also improve error message on directory/non-directory collisions.
2018-04-05 20:04:42 +02:00
Eelco Dolstra
5c904e10eb
<nix/buildenv.nix>: Skip non-directory top-level paths
Fixes https://github.com/NixOS/nix/issues/1934 (at least the "error:
opening directory '/nix/store/...-linux-config-4.4.14': Not a
directory" issue).
2018-04-05 19:34:56 +02:00
Matthew Justin Bauer
d7a84d330c Setup nix_path correctly in nix-profile-daemon
We need nixpkgs to be set in NIX_PATH for Nix 1.12 to work correctly
2018-04-04 18:02:59 -05:00
Vincent Ambo
01aed568e5 feat: Update to NixOS 18.03
As the subject says ...

This only includes some minor changes in configuration. Most
interestingly several packages that I used to have in this repository
as custom packages are now available in `nixos-unstable`.

Unfortunately they weren't included in NixOS 18.03 though ...

Either way, this is cleaner.
2018-04-04 17:10:12 +02:00
Abseil Team
abd0824ba6 - 985074b3d2f08388125a0004a4984f1d64fb0fcf In the internal implementation, avoid conflicting definit... by Abseil Team <absl-team@google.com>
GitOrigin-RevId: 985074b3d2f08388125a0004a4984f1d64fb0fcf
Change-Id: I1a564ac086a36bb52d36aeb5f500c7099d2ee032
2018-04-04 10:42:31 -04:00