getting ready for test deploy

master
Steve Ayerhart 2021-06-30 10:41:00 -04:00
parent eb6b7e9c10
commit 5071293750
No known key found for this signature in database
GPG Key ID: 5C815FDF3A00B8BA
7 changed files with 36 additions and 7 deletions

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel http.server http.server.responses http.server.dispatchers furnace.actions html.forms accessors namespaces io.servers io.sockets.secure.debug sequences validators ;
USING: bonerbonerboner.services ;
USING: bonerbonerboner.services bonerbonerboner.services.slack bonerbonerboner.services.mississippis bonerbonerboner.services.platzisms bonerbonerboner.services.link-logger ;
USING: prettyprint ;
IN: bonerbonerboner
@ -10,7 +10,7 @@ IN: bonerbonerboner
TUPLE: bbb < dispatcher ;
: bbb-themes ( -- themes )
{ "bbb" "rocket" "hockey" } ;
{ "bbb" "bones" "float" "hockey" "rocket" "trump" "wakeywakey" } ;
: v-valid-theme ( str -- theme )
dup bbb-themes member? [ "not a valid theme" throw ] unless ;
@ -47,3 +47,16 @@ SYMBOL: current-bbb-server
: restart-bbb-server ( -- )
current-bbb-server get stop-server
run-bbb-server ;
: add-default-slack-listeners ( -- )
{
[ check-mississippi-request ]
[ check-platz ]
[ check-links ]
} slack-callbacks set-global ;
: start-bonerbonerboner ( -- )
add-default-slack-listeners
run-bbb-server ;
MAIN: start-bonerbonerboner

View File

@ -0,0 +1,16 @@
USING: tools.deploy.config ;
H{
{ deploy-console? t }
{ deploy-io 3 }
{ deploy-reflection 1 }
{ deploy-ui? f }
{ deploy-word-defs? f }
{ deploy-threads? t }
{ "stop-after-last-window?" t }
{ deploy-math? t }
{ deploy-word-props? f }
{ deploy-c-types? f }
{ deploy-help? f }
{ deploy-name "bonerbonerboner-api" }
{ deploy-unicode? f }
}

View File

@ -0,0 +1 @@
templates/themes.xml

View File

@ -2,7 +2,8 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel math math.ranges math.order math.parser math.functions arrays sequences sequences.extras threads calendar io timers accessors random formatting combinators combinators.random http.server.responses regexp unicode peg peg.parsers assocs db.types db.tuples ;
USING: bonerbonerboner.services bonerbonerboner.services.slack ;
USING: bonerbonerboner.services ;
FROM: bonerbonerboner.services.slack => slack-lookup-user say-slack ;
IN: bonerbonerboner.services.mississippis

View File

@ -58,6 +58,3 @@ platzism "platzisms"
"text" of
[ is-platz? [ share-platzism ] when ]
[ dup is-platzism? [ log/confirm-platzism ] [ drop ] if ] bi ;
! [ check-platz ] add-slack-handler

View File

@ -2,7 +2,6 @@
! See http://factorcode.org/license.txt for BSD license.
USING: kernel fry db db.sqlite environment math.parser io.pathnames ;
USING: bonerbonerboner.services.slack ;
IN: bonerbonerboner.services

View File

@ -8,6 +8,8 @@ IN: bonerbonerboner.services.slack
SYMBOLS: slack-callbacks current-slack-webhook-url current-slack-authorization-token ;
{ } slack-callbacks set-global
TUPLE: slack < dispatcher ;
: <bad-callback-response> ( -- response )