Merge remote-tracking branch 'origin/master' into modern-harvey3

modern-harvey3
Doug Coleman 2019-12-07 16:57:33 -08:00
commit 3f9448bc18
3 changed files with 25 additions and 7 deletions

View File

@ -5,9 +5,10 @@ kernel ldcache system ;
IN: llvm.ffi IN: llvm.ffi
<< "llvm" { << "llvm" {
{ [ os linux? ] [ "LLVM-3.9" find-so [ cdecl add-library ] [ drop ] if* ] } { [ os linux? ] [ "LLVM-3.9" find-so ] }
{ [ os macosx? ] [ "/usr/local/opt/llvm/lib/libLLVM.dylib" ] }
[ drop ] [ drop ]
} cond } cond [ cdecl add-library ] when*
>> >>
LIBRARY: llvm LIBRARY: llvm

View File

@ -2,15 +2,19 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors calendar db db.tuples db.types furnace.actions USING: accessors calendar db db.tuples db.types furnace.actions
furnace.auth furnace.boilerplate furnace.recaptcha furnace.auth furnace.boilerplate furnace.recaptcha
furnace.redirection furnace.syndication html.forms furnace.redirection furnace.syndication furnace.utilities
http.server.dispatchers http.server.responses kernel math.parser html.forms http.server.dispatchers http.server.responses kernel
sequences sorting urls validators xmode.catalog ; math.parser namespaces present sequences smtp sorting splitting
urls validators xmode.catalog ;
IN: webapps.pastebin IN: webapps.pastebin
TUPLE: pastebin < dispatcher ; TUPLE: pastebin < dispatcher ;
SYMBOL: can-delete-pastes? SYMBOL: can-delete-pastes?
SYMBOL: pastebin-email-from
SYMBOL: pastebin-email-to
can-delete-pastes? define-capability can-delete-pastes? define-capability
! ! ! ! ! !
@ -150,6 +154,18 @@ M: annotation entity-url
now >>date now >>date
{ "summary" "author" "mode" "contents" } to-object ; { "summary" "author" "mode" "contents" } to-object ;
: email-on-paste ( url -- )
pastebin-email-to get-global [
drop
] [
<email>
swap >>to
swap adjust-url present >>body
pastebin-email-from get-global >>from
"New paste!" >>subject
send-email
] if-empty ;
: <new-paste-action> ( -- action ) : <new-paste-action> ( -- action )
<page-action> <page-action>
[ [
@ -168,7 +184,7 @@ M: annotation entity-url
f <paste-state> f <paste-state>
[ deposit-entity-slots ] [ deposit-entity-slots ]
[ insert-tuple ] [ insert-tuple ]
[ id>> paste-url <redirect> ] [ id>> paste-url [ email-on-paste ] [ <redirect> ] bi ]
tri tri
] >>submit ; ] >>submit ;

View File

@ -95,7 +95,8 @@ SYMBOLS: key-password key-file dh-file ;
: <gitweb> ( path -- responder ) : <gitweb> ( path -- responder )
<dispatcher> <dispatcher>
swap <static> enable-cgi >>default swap <static> enable-cgi >>default
url"/gitweb.cgi" <redirect-responder> "" add-responder ; url"/gitweb.cgi" <redirect-responder> "" add-responder
url"/github-sync.cgi" <redirect-responder> "github-sync" add-responder ;
: init-production ( -- ) : init-production ( -- )
common-configuration common-configuration