on master help sign in
Initial commit
93298c4mrkkrp
.gitignorenew file+16
@@ -0,0 +1,16 @@
1+*#
2+*.chi
3+*.chs.h
4+*.hi
5+*.o
6+*~
7+.cabal-sandbox/
8+.hsenv
9+.stack-work/
10+.virtualenv
11+TAGS
12+benchmarks.tix
13+cabal-dev
14+cabal.config
15+cabal.sandbox.config
16+dist/
.travis.ymlnew file+46
@@ -0,0 +1,46 @@
1+language: c
2+
3+sudo: false
4+
5+matrix:
6+ include:
7+ - env: CABALVER=1.18 GHCVER=7.8.4
8+ addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,libflac-dev], sources: [hvr-ghc]}}
9+ - env: CABALVER=1.22 GHCVER=7.10.3
10+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,libflac-dev],sources: [hvr-ghc]}}
11+ - env: CABALVER=1.24 GHCVER=8.0.1
12+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,libflac-dev],sources: [hvr-ghc]}}
13+ - env: CABALVER=head GHCVER=head
14+ addons: {apt: {packages: [cabal-install-head,ghc-head,libflac-dev], sources: [hvr-ghc]}}
15+
16+ allow_failures:
17+ - env: CABALVER=head GHCVER=head
18+
19+before_install:
20+ - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
21+
22+install:
23+ - cabal --version
24+ - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
25+ - travis_retry cabal update
26+ - cabal install --only-dependencies --enable-tests
27+
28+script:
29+ - case "$CABALVER" in
30+ "1.18") cabal configure --enable-tests --enable-library-coverage -v2 -f dev ;;
31+ *) cabal configure --enable-tests --enable-coverage -v2 -f dev ;;
32+ esac
33+ - cabal build
34+ - cabal test --show-details=always
35+ - cabal sdist
36+ - cabal haddock | grep "100%" | wc -l | grep "1"
37+
38+after_script:
39+ - cabal install hpc-coveralls
40+ - export PATH=~/.cabal/bin:$PATH
41+ - hpc-coveralls --coverage-mode=StrictlyFullLines
42+ --exclude-dir=tests
43+ tests
44+
45+notifications:
46+ email: false
CHANGELOG.mdnew file+3
@@ -0,0 +1,3 @@
1+## Req 0.1.0
2+
3+* Initial release.
LICENSE.mdnew file+28
@@ -0,0 +1,28 @@
1+Copyright © 2016 Mark Karpov
2+
3+All rights reserved.
4+
5+Redistribution and use in source and binary forms, with or without
6+modification, are permitted provided that the following conditions are met:
7+
8+* Redistributions of source code must retain the above copyright notice,
9+ this list of conditions and the following disclaimer.
10+
11+* Redistributions in binary form must reproduce the above copyright
12+ notice, this list of conditions and the following disclaimer in the
13+ documentation and/or other materials provided with the distribution.
14+
15+* Neither the name Mark Karpov nor the names of contributors may be used to
16+ endorse or promote products derived from this software without specific
17+ prior written permission.
18+
19+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY EXPRESS
20+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22+NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
23+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
25+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Network/HTTP/Req.hsnew file+14
@@ -0,0 +1,14 @@
1+-- |
2+-- Module : Network.HTTP.Req
3+-- Copyright : © 2016 Mark Karpov
4+-- License : BSD 3 clause
5+--
6+-- Maintainer : Mark Karpov <markkarpov@openmailbox.org>
7+-- Stability : experimental
8+-- Portability : portable
9+--
10+-- Library for safe construction of HTTP requests.
11+
12+module Network.HTTP.Req
13+ ( )
14+where
README.mdnew file+16
@@ -0,0 +1,16 @@
1+# Req
2+
3+[![License BSD3](https://img.shields.io/badge/license-BSD3-brightgreen.svg)](http://opensource.org/licenses/BSD-3-Clause)
4+[![Hackage](https://img.shields.io/hackage/v/req.svg?style=flat)](https://hackage.haskell.org/package/req)
5+[![Stackage Nightly](http://stackage.org/package/req/badge/nightly)](http://stackage.org/nightly/package/req)
6+[![Stackage LTS](http://stackage.org/package/req/badge/lts)](http://stackage.org/lts/package/req)
7+[![Build Status](https://travis-ci.org/mrkkrp/req.svg?branch=master)](https://travis-ci.org/mrkkrp/req)
8+[![Coverage Status](https://coveralls.io/repos/mrkkrp/req/badge.svg?branch=master&service=github)](https://coveralls.io/github/mrkkrp/req?branch=master)
9+
10+Library for safe construction of HTTP requests.
11+
12+## License
13+
14+Copyright © 2016 Mark Karpov
15+
16+Distributed under BSD 3 clause license.
Setup.hsnew file+6
@@ -0,0 +1,6 @@
1+module Main (main) where
2+
3+import Distribution.Simple
4+
5+main :: IO ()
6+main = defaultMain
req.cabalnew file+79
@@ -0,0 +1,79 @@
1+--
2+-- Cabal configuration for ‘req’ package.
3+--
4+-- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
5+--
6+-- Redistribution and use in source and binary forms, with or without
7+-- modification, are permitted provided that the following conditions are
8+-- met:
9+--
10+-- * Redistributions of source code must retain the above copyright notice,
11+-- this list of conditions and the following disclaimer.
12+--
13+-- * Redistributions in binary form must reproduce the above copyright
14+-- notice, this list of conditions and the following disclaimer in the
15+-- documentation and/or other materials provided with the distribution.
16+--
17+-- * Neither the name Mark Karpov nor the names of contributors may be used
18+-- to endorse or promote products derived from this software without
19+-- specific prior written permission.
20+--
21+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY
22+-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26+-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27+-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28+-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29+-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30+-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+-- POSSIBILITY OF SUCH DAMAGE.
32+
33+name: req
34+version: 0.1.0
35+cabal-version: >= 1.10
36+license: BSD3
37+license-file: LICENSE.md
38+author: Mark Karpov <markkarpov@openmailbox.org>
39+maintainer: Mark Karpov <markkarpov@openmailbox.org>
40+homepage: https://github.com/mrkkrp/req
41+bug-reports: https://github.com/mrkkrp/req/issues
42+category: Network, Web
43+synopsis: Library for safe construction of HTTP requests
44+build-type: Simple
45+description: Library for safe construction of HTTP requests.
46+extra-doc-files: CHANGELOG.md
47+ , README.md
48+
49+source-repository head
50+ type: git
51+ location: https://github.com/mrkkrp/req.git
52+
53+flag dev
54+ description: Turn on development settings.
55+ manual: True
56+ default: False
57+
58+library
59+ build-depends: base >= 4.7 && < 5.0
60+ exposed-modules: Network.HTTP.Req
61+ if flag(dev)
62+ ghc-options: -Wall -Werror
63+ else
64+ ghc-options: -O2 -Wall
65+ default-language: Haskell2010
66+
67+test-suite tests
68+ main-is: Spec.hs
69+ other-modules: Network.HTTP.ReqSpec
70+ hs-source-dirs: tests
71+ type: exitcode-stdio-1.0
72+ build-depends: base >= 4.7 && < 5.0
73+ , hspec >= 2.0 && < 3.0
74+ , req >= 0.1.0
75+ if flag(dev)
76+ ghc-options: -Wall -Werror
77+ else
78+ ghc-options: -O2 -Wall
79+ default-language: Haskell2010
stack.yamlnew file+3
@@ -0,0 +1,3 @@
1+resolver: lts-6.16
2+packages:
3+- '.'
tests/Network/HTTP/ReqSpec.hsnew file+40
@@ -0,0 +1,40 @@
1+--
2+-- Tests for ‘req’ package.
3+--
4+-- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
5+--
6+-- Redistribution and use in source and binary forms, with or without
7+-- modification, are permitted provided that the following conditions are
8+-- met:
9+--
10+-- * Redistributions of source code must retain the above copyright notice,
11+-- this list of conditions and the following disclaimer.
12+--
13+-- * Redistributions in binary form must reproduce the above copyright
14+-- notice, this list of conditions and the following disclaimer in the
15+-- documentation and/or other materials provided with the distribution.
16+--
17+-- * Neither the name Mark Karpov nor the names of contributors may be used
18+-- to endorse or promote products derived from this software without
19+-- specific prior written permission.
20+--
21+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY
22+-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
25+-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26+-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27+-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28+-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
29+-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30+-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31+-- POSSIBILITY OF SUCH DAMAGE.
32+
33+module Network.HTTP.ReqSpec
34+ ( spec )
35+where
36+
37+import Test.Hspec
38+
39+spec :: Spec
40+spec = return ()
tests/Spec.hsnew file+1
@@ -0,0 +1 @@
1+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}