debugger combinators.smart sequences ;
IN: site-watcher.db
-TUPLE: account account-id email ;
+TUPLE: account account-id account-name email ;
-: <account> ( email -- account )
+: <account> ( account-name -- account )
account new
- swap >>email ;
+ swap >>account-name ;
account "ACCOUNT" {
{ "account-id" "ACCOUNT_ID" +db-assigned-id+ }
+ { "account-name" "ACCOUNT_NAME" VARCHAR }
{ "email" "EMAIL" VARCHAR }
} define-persistent
dup t >>up? insert-tuple
] unless ;
-: insert-account ( email -- ) <account> insert-tuple ;
+: insert-account ( account-name -- ) <account> insert-tuple ;
: find-sites ( -- seq ) f <site> select-tuples ;
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: db.tuples locals site-watcher site-watcher.db
-site-watcher.private kernel ;
+site-watcher.private kernel db io.directories io.files.temp
+continuations ;
IN: site-watcher.tests
: site-watcher-path ( -- path ) "site-watcher.db" temp-file ; inline
USING: accessors alarms arrays calendar combinators
combinators.smart continuations debugger http.client
init io.streams.string kernel locals math math.parser
-namespaces sequences site-watcher.db smtp ;
+namespaces sequences site-watcher.db site-watcher.db.private smtp ;
IN: site-watcher
SYMBOL: site-watcher-from