Update libraries for parent-dir rename

release
Slava Pestov 2007-11-05 00:46:03 -05:00
parent 6d2f1bc4bd
commit d8d1da96d7
6 changed files with 27 additions and 27 deletions

2
extra/contributors/contributors.factor Normal file → Executable file
View File

@ -5,7 +5,7 @@ sequences combinators.lib assocs system sorting math.parser ;
IN: contributors
: changelog ( -- authors )
image parent-dir cd
image parent-directory cd
"git-log --pretty=format:%an" <process-stream> lines ;
: patch-counts ( authors -- assoc )

2
extra/http/server/templating/templating.factor Normal file → Executable file
View File

@ -88,7 +88,7 @@ DEFER: <% delimiter
] assert-depth drop ;
: run-relative-template-file ( filename -- )
file get source-file-path parent-dir
file get source-file-path parent-directory
swap path+ run-template-file ;
: template-convert ( infile outfile -- )

10
extra/io/unix/files/files-tests.factor Normal file → Executable file
View File

@ -1,8 +1,8 @@
USING: tools.test io.files ;
IN: temporary
[ "/usr/libexec/" ] [ "/usr/libexec/awk/" parent-dir ] unit-test
[ "/etc/" ] [ "/etc/passwd" parent-dir ] unit-test
[ "/" ] [ "/etc/" parent-dir ] unit-test
[ "/" ] [ "/etc" parent-dir ] unit-test
[ "/" ] [ "/" parent-dir ] unit-test
[ "/usr/libexec/" ] [ "/usr/libexec/awk/" parent-directory ] unit-test
[ "/etc/" ] [ "/etc/passwd" parent-directory ] unit-test
[ "/" ] [ "/etc/" parent-directory ] unit-test
[ "/" ] [ "/etc" parent-directory ] unit-test
[ "/" ] [ "/" parent-directory ] unit-test

View File

@ -1,14 +1,14 @@
USING: io.files kernel tools.test ;
IN: temporary
[ "c:\\foo\\" ] [ "c:\\foo\\bar" parent-dir ] unit-test
[ "c:\\" ] [ "c:\\foo\\" parent-dir ] unit-test
[ "c:\\" ] [ "c:\\foo" parent-dir ] unit-test
[ "c:\\foo\\" ] [ "c:\\foo\\bar" parent-directory ] unit-test
[ "c:\\" ] [ "c:\\foo\\" parent-directory ] unit-test
[ "c:\\" ] [ "c:\\foo" parent-directory ] unit-test
! { "c:" "c:\\" "c:/" } [ directory ] each -- all do the same thing
[ "c:\\" ] [ "c:\\" parent-dir ] unit-test
[ "Z:\\" ] [ "Z:\\" parent-dir ] unit-test
[ "c:" ] [ "c:" parent-dir ] unit-test
[ "Z:" ] [ "Z:" parent-dir ] unit-test
[ "c:\\" ] [ "c:\\" parent-directory ] unit-test
[ "Z:\\" ] [ "Z:\\" parent-directory ] unit-test
[ "c:" ] [ "c:" parent-directory ] unit-test
[ "Z:" ] [ "Z:" parent-directory ] unit-test
[ t ] [ "c:\\" root-directory? ] unit-test
[ t ] [ "Z:\\" root-directory? ] unit-test
[ f ] [ "c:\\foo" root-directory? ] unit-test

19
extra/ui/tools/deploy/deploy.factor Normal file → Executable file
View File

@ -5,14 +5,14 @@ ui.gadgets.controls models sequences ui.gadgets.buttons
ui.gadgets.packs ui.gadgets.labels tools.deploy.config
namespaces ui.gadgets.editors ui.gadgets.borders ui.gestures
ui.commands assocs ui.gadgets.tracks ui ui.tools.listener
tools.deploy.app vocabs ui.tools.workspace ui.operations ;
tools.deploy vocabs ui.tools.workspace system ;
IN: ui.tools.deploy
TUPLE: deploy-gadget vocab settings ;
: bundle-name ( -- )
"bundle-name" get <field>
"Bundle name:" label-on-left gadget, ;
deploy-name get <field>
"Executable name:" label-on-left gadget, ;
: deploy-ui ( -- )
deploy-ui? get
@ -42,13 +42,12 @@ TUPLE: deploy-gadget vocab settings ;
{ 10 10 } over set-pack-gap
1 swap set-pack-fill ;
: <deploy-settings> ( -- control )
: <deploy-settings> ( vocab -- control )
default-config [ <model> ] assoc-map [
f <model> "bundle-name" set
[
bundle-name
deploy-ui
exit-when-windows-closed
macosx? [ exit-when-windows-closed ] when
io-settings
reflection-settings
advanced-settings
@ -63,7 +62,7 @@ TUPLE: deploy-gadget vocab settings ;
find-deploy-gadget deploy-gadget-vocab ;
: find-deploy-config
find-deploy-vocab deploy.app-config ;
find-deploy-vocab deploy-config ;
: find-deploy-settings
find-deploy-gadget deploy-gadget-settings ;
@ -78,7 +77,7 @@ TUPLE: deploy-gadget vocab settings ;
: com-deploy ( gadget -- )
dup com-save
find-deploy-vocab [ deploy.app ] curry call-listener ;
find-deploy-vocab [ deploy ] curry call-listener ;
: com-help ( -- )
"ui-deploy" help-window ;
@ -99,7 +98,7 @@ deploy-gadget "toolbar" f {
: <deploy-gadget> ( vocab -- gadget )
f deploy-gadget construct-boa [
<deploy-settings>
dup <deploy-settings>
g-> set-deploy-gadget-settings gadget,
buttons,
] { 0 1 } build-pack
@ -109,5 +108,3 @@ deploy-gadget "toolbar" f {
: deploy-tool ( vocab -- )
vocab-name dup <deploy-gadget> 10 <border>
"Deploying \"" rot "\"" 3append open-window ;
[ vocab-spec? ] \ deploy-tool H{ } define-operation

7
extra/ui/tools/operations/operations.factor Normal file → Executable file
View File

@ -6,8 +6,9 @@ ui.tools.search ui.tools.traceback ui.tools.workspace generic
help.topics inference inspector io.files io.styles kernel
namespaces parser prettyprint quotations tools.annotations
editors tools.profiler tools.test tools.time tools.walker
ui.commands ui.gadgets.editors ui.gestures ui.operations vocabs
vocabs.loader words sequences tools.browser classes ;
ui.commands ui.gadgets.editors ui.gestures ui.operations
ui.tools.deploy vocabs vocabs.loader words sequences
tools.browser classes ;
IN: ui.tools.operations
V{ } clone operations set-global
@ -155,6 +156,8 @@ M: word com-stack-effect word-def com-stack-effect ;
{ +listener+ t }
} define-operation
[ vocab-spec? ] \ deploy-tool H{ } define-operation
! Quotations
[ quotation? ] \ com-stack-effect H{
{ +keyboard+ T{ key-down f { C+ } "i" } }