File tree 2 files changed +20
-16
lines changed
2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 1
1
-- cf http://haskell.org/cabal/users-guide/
2
2
3
3
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.
6
6
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
+
10
12
homepage : http://github.com/simonmichael/gist
11
13
license : GPL-3
12
14
license-file : LICENSE
@@ -19,9 +21,9 @@ cabal-version: >=1.8
19
21
20
22
executable gist
21
23
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
Original file line number Diff line number Diff line change 1
1
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
2
2
{-
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>
5
5
-}
6
6
7
7
import Control.Applicative ((<$>) , empty )
@@ -56,7 +56,9 @@ paste description filename content = do
56
56
withManager $ \ mgr -> do
57
57
httpLbs req{method = " POST" , requestBody = RequestBodyLBS $ encode paste} mgr
58
58
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
62
64
putStrLn $ maybe (" Unknown response:\n " ++ (BL. unpack body)) pasteResponseUrl mresponse
You can’t perform that action at this time.
0 commit comments