aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-07-25 22:27:41 +0200
committerGravatar Tom Willemse2014-07-25 22:27:41 +0200
commit2e6dcfd74ba08721048a6de000dc38becee213b6 (patch)
tree0c3dcff19a08ea9d498dbcfc24a9f6100ebb49e9
parente0158bc47b3eb73d2c772f567b8029d851f29118 (diff)
downloadhypo-2e6dcfd74ba08721048a6de000dc38becee213b6.tar.gz
hypo-2e6dcfd74ba08721048a6de000dc38becee213b6.zip
Update hy to 0.10.0
-rwxr-xr-xhypo.hy20
-rw-r--r--requirements.txt2
-rwxr-xr-xupgrade-git.hy17
3 files changed, 20 insertions, 19 deletions
diff --git a/hypo.hy b/hypo.hy
index 2f438bf..2610d8b 100755
--- a/hypo.hy
+++ b/hypo.hy
@@ -90,17 +90,17 @@ If no lexer is found fallback onto the text lexer."
(let ((content (get (.commit-file repo ref filename) "data"))
(lexer (get-lexer filename content))
(formatter (HtmlFormatter))
- (args {"file" filename "hash" hash}))
+ (kwargs {"file" filename "hash" hash}))
(.update
- args (if (in (get (os.path.splitext filename) 1)
+ kwargs (if (in (get (os.path.splitext filename) 1)
[".png" ".jpg" ".jpeg" ".gif"])
- {"content" (kwapply (render.image)
- {"name" filename
- "hash" hash})
+ {"content" (apply render.image []
+ {"name" filename
+ "hash" hash})
"style" ""}
{"content" (highlight content lexer formatter)
"style" (formatter.get-style-defs ".highlight")}))
- (kwapply (render.main) args))
+ (apply render.main [] kwargs))
""))
(defun get-html [self name]
@@ -129,10 +129,10 @@ If no lexer is found fallback onto the text lexer."
(.write f (web.data)))
(let ((repo (Gittle.init dirname)))
(.stage repo [(str name)])
- (kwapply (repo.commit)
- {"name" "Hypo"
- "email" "hypo@ryuslash.org"
- "message" "Initial commit"}))
+ (apply repo.commit []
+ {"name" "Hypo"
+ "email" "hypo@ryuslash.org"
+ "message" "Initial commit"}))
(setv web.ctx.status (str "201 Created"))
(+ web.ctx.home "/" *prefix* (get h 0) "\n")))
diff --git a/requirements.txt b/requirements.txt
index b9fd43a..49362b2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-hy==0.9.12
+hy==0.10.0
gittle==0.2.2
pycommand==0.1.0
web.py==0.37
diff --git a/upgrade-git.hy b/upgrade-git.hy
index 036f7c0..b0c5272 100755
--- a/upgrade-git.hy
+++ b/upgrade-git.hy
@@ -25,12 +25,13 @@
(sys.exit 1)))
(def db
- (kwapply (web.database)
- {"dbn" "postgres" "user" *dbuser* "pw" *dbpw* "db" *dbname*}))
+ (apply web.database []
+ {"dbn" "postgres" "user" *dbuser* "pw" *dbpw* "db" *dbname*}))
(defun get-file [name]
- (let ((res (kwapply (.select db "hfile" {"shash" name})
- {"where" "shash = $shash"})))
+ (let ((res (apply .select
+ [db "hfile" {"shash" name}]
+ {"where" "shash = $shash"})))
(if res (car res))))
(foreach [f (os.listdir "files/")]
@@ -42,7 +43,7 @@
(+ "files/" f "/" file.filename))
(let ((repo (Gittle.init (+ "files/" f))))
(.stage repo [(str file.filename)])
- (kwapply (repo.commit)
- {"name" "System"
- "email" "tom@ryuslash.org"
- "message" "Initial commit for upgrade to git"}))))
+ (apply repo.commit []
+ {"name" "System"
+ "email" "tom@ryuslash.org"
+ "message" "Initial commit for upgrade to git"}))))