improvements for fuse

This commit is contained in:
Philip C Monk 2016-05-03 19:26:52 -04:00
parent c5d66fd16d
commit d33f8cf52a
8 changed files with 80 additions and 13 deletions

View File

@ -59,6 +59,9 @@
^- (list place:connector)
=+ (helpers:connector ost.hid wir "https://api.github.com")
=> |% :: gh-specific helpers
++ read-sentinel
|=(pax/path [ost %diff %arch `0vsen.tinel ~])
::
++ sigh-list-issues-x
|= jon/json
%+ bind ((ar:jo issue:gh-parse) jon)
@ -70,7 +73,9 @@
%+ bind ((ar:jo issue:gh-parse) jon)
|= issues/(list issue:gh)
:- `(shax (jam issues))
(malt (turn issues |=(issue:gh [(rsh 3 2 (scot %ui number)) ~])))
%- malt ^- (list {@ta $~})
:- [%gh-list-issues ~]
(turn issues |=(issue:gh [(rsh 3 2 (scot %ui number)) ~]))
--
:~ ^- place :: /
:* guard=$~
@ -89,7 +94,14 @@
^- place :: /issues/mine
:* guard={$issues $mine $~}
read-x=(read-get /issues)
read-y=(read-get /issues)
read-y=(read-static %gh-list-issues ~)
sigh-x=sigh-list-issues-x
sigh-y=sigh-list-issues-y
==
^- place :: /issues/mine/<mark>
:* guard={$issues $mine @t $~}
read-x=read-null
read-y=read-sentinel
sigh-x=sigh-list-issues-x
sigh-y=sigh-list-issues-y
==
@ -123,12 +135,18 @@
sigh-x=sigh-list-issues-x
sigh-y=sigh-list-issues-y
==
^- place :: /issues/by-repo/<user>/<repo>
^- place :: /issues/by-repo/<user>/<repo>/<number>
:* guard={$issues $by-repo @t @t @t $~}
^= read-x
|=(pax/path (get /repos/[-.+>.pax]/[-.+>+.pax]/issues/[-.+>+>.pax]))
::
read-y=(read-static ~)
^= read-y
|= pax/path
%. pax
?: ((sane %tas) -.+>+>.pax)
read-sentinel
(read-static %gh-issue ~)
::
^= sigh-x
|= jon/json
%+ bind (issue:gh-parse jon)
@ -137,6 +155,13 @@
::
sigh-y=sigh-strange
==
^- place :: /issues/by-repo/<u>/<r>/<n>/<mark>
:* guard={$issues $by-repo @t @t @t @t $~}
read-x=read-null
read-y=read-sentinel
sigh-x=sigh-strange
sigh-y=sigh-strange
==
==
::
:: When a peek on a path blocks, ford turns it into a peer on

View File

@ -322,7 +322,13 @@
?+ van ~&(%camp-stub !!)
$g
:+ %pass (camp-wire +<)
[%g [%deal [our p.bem] q.bem [%peer %scry ren (flop s.bem)]]]
=+ ^= tyl
?. ?=($x ren)
s.bem
?> ?=(^ s.bem)
t.s.bem
[%g [%deal [our p.bem] q.bem [%peer %scry ren (flop tyl)]]]
::
$c
:+ %pass (camp-wire +<)
@ -1786,6 +1792,11 @@
|= {{van/vane ren/care bem/beam} cag/cage}
^+ ..zo
?> ?=($g van)
?: |(!?=($x ren) =(-.s.bem p.cag))
=. kig (~(del in kig) +<-.$)
=. mow :_(mow [hen (cancel van ren bem)])
=+ (cat 3 van ren)
exec(keg (~(put by keg) [- bem] cag))
=. mow
:_ mow
:^ hen %pass (camp-wire van ren bem)

View File

@ -489,9 +489,9 @@
byk:(~(got by bum) dap)
::
++ mo-peek
|= {dap/dude pry/prey ren/@tas tyl/path mar/mark}
|= {dap/dude pry/prey ren/@tas tyl/path}
^- (unit (unit cage))
(ap-peek:(ap-abed:ap dap pry) ren tyl mar)
(ap-peek:(ap-abed:ap dap pry) ren tyl)
::
++ mo-clip :: apply club
|= {dap/dude pry/prey cub/club}
@ -635,8 +635,13 @@
(ap-sake p.zem)
::
++ ap-peek
|= {ren/@tas tyl/path mar/mark}
|= {ren/@tas tyl/path}
^- (unit (unit cage))
=+ ?. ?=($x ren)
[mar=%$ tyl=tyl]
=+ `path`(flop tyl)
?> ?=(^ -)
[mar=i tyl=(flop t)]
=+ cug=(ap-find %peek ren tyl)
?~ cug
((slog leaf+"peek find fail" >tyl< >mar< ~) [~ ~])
@ -1309,10 +1314,7 @@
[~ ~]
?. ?=(^ tyl)
~
=+ =+ `path`(flop tyl)
?> ?=(^ -)
[mar=i pax=(flop t)]
(mo-peek:(mo-abed:mo who *duct) syd high+`who ren pax mar)
(mo-peek:(mo-abed:mo who *duct) syd high+`who ren tyl)
::
++ stay :: save w+o cache
`axle`all

View File

@ -101,6 +101,9 @@
==
++ issue
^- $-(json (unit issue:gh))
|= jon/json
=- (bind - |*(issue/* `issue:gh`[jon issue]))
%. jon
=+ jo
%- ot :~
'url'^so

12
mar/gh/issue.hoon Normal file
View File

@ -0,0 +1,12 @@
/- gh
|_ issue/issue:gh
++ grab
|%
++ noun issue:gh
--
++ grow
|%
++ json raw.issue
++ mime [/txt/plain (taco (crip <issue>))]
--
--

12
mar/gh/list-issues.hoon Normal file
View File

@ -0,0 +1,12 @@
/- gh
|_ issues/(list issue:gh)
++ grab
|%
++ noun (list issue:gh)
--
++ grow
|%
++ json [%a (turn issues |=(issue:gh raw))]
++ mime [/txt/plain (taco (crip <issues>))]
--
--

View File

@ -7,6 +7,7 @@
++ json
|= jon/^json
^- command:lens
~| jon=jon
%- need
%. jon
=> [. jo]

View File

@ -97,7 +97,8 @@
site-admin/?
==
++ issue
$: url/@t
$: raw/json
url/@t
labels-url/@t
comments-url/@t
events-url/@t