Skip to content

Commit e7b7360

Browse files
committed
update
1 parent 95be31b commit e7b7360

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

gist.cabal

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
-- cf http://haskell.org/cabal/users-guide/
22

33
name: gist
4-
version: 0.1
5-
synopsis: A reliable command-line client for gist.github.com
4+
version: 0.1.98
5+
synopsis: A simple command-line client for gist.github.com that just works.
66
description:
7-
A reliable command-line client for gist.github.com. It pastes a single
8-
file or standard input to gist.github.com as a public gist. Does not
9-
support authentication and does not depend on the github package (yet).
7+
A simple command-line client for gist.github.com that just works.
8+
It pastes a single file or the standard input to gist.github.com, as
9+
a public gist. It does not support authentication and does not
10+
depend on the github package (yet).
11+
1012
homepage: http://github.com/simonmichael/gist
1113
license: GPL-3
1214
license-file: LICENSE
@@ -19,9 +21,9 @@ cabal-version: >=1.8
1921

2022
executable gist
2123
main-is: gist.hs
22-
build-depends: base ==4.5.*
23-
,aeson >= 0.6 && < 0.7
24-
,bytestring >= 0.9 && < 0.10
25-
,conduit >= 0.4 && < 0.5
26-
,http-conduit >= 1.4 && < 1.5
27-
,text >= 0.11 && < 0.12
24+
build-depends: base
25+
,aeson
26+
,bytestring
27+
,conduit
28+
,http-conduit
29+
,text

gist.hs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
22
{-
3-
gist.hs - a reliable command-line client for gist.github.com
4-
(c) 2012 Simon Michael <simon@joyful.com>
3+
gist.hs - a command-line client for gist.github.com that works.
4+
(c) 2012-2013 Simon Michael <simon@joyful.com>
55
-}
66

77
import Control.Applicative ((<$>), empty)
@@ -56,7 +56,9 @@ paste description filename content = do
5656
withManager $ \mgr -> do
5757
httpLbs req{method = "POST", requestBody = RequestBodyLBS $ encode paste} mgr
5858

59-
report (Response status _ _ body) = do
60-
putStrLn $ show status
61-
let mresponse = decode body
59+
report rsp = do
60+
putStrLn $ show $ responseStatus rsp
61+
let
62+
body = responseBody rsp
63+
mresponse = decode body
6264
putStrLn $ maybe ("Unknown response:\n" ++ (BL.unpack body)) pasteResponseUrl mresponse

0 commit comments

Comments
 (0)