Skip to content

Commit

Permalink
Update project information, raise QuickCheck bound
Browse files Browse the repository at this point in the history
This change updates the maintainer email, the copyright range, and the
gitignore file. The Travis test settings have also been updated to
include newer versions of GHC. A generator for the tests which did not
correctly enforce the desired property that the two components it
generated did not match one another has also been fixed.

The upper bound of QuickCheck has been extended to include the latest
version, which bumps the version number of this package.
  • Loading branch information
zmthy committed Jul 13, 2016
1 parent e1355fe commit 6db47ba
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.virtualenv
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
cabal.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
60 changes: 56 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
language: haskell
# See also https://github.com/hvr/multi-ghc-travis for more information

ghc:
- 7.8
- 7.6
# explicitly request legacy non-sudo based build environment
sudo: required

# The following lines enable several GHC versions and/or HP versions
# to be tested; often it's enough to test only against the last
# release of a major GHC version. Setting HPVER implictly sets
# GHCVER. Omit lines with versions you don't need/want testing for.
env:
- CABALVER=1.18 GHCVER=7.6.3
- CABALVER=1.18 GHCVER=7.8.3
- CABALVER=1.22 GHCVER=7.10.3
- CABALVER=1.24 GHCVER=8.0.1
- CABALVER=head GHCVER=head

# Note: the distinction between `before_install` and `install` is not
# important.
before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH

install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update
- cabal install --only-dependencies --enable-tests --enable-benchmarks

# Here starts the actual work to be performed for the package under
# test; any command which exits with a non-zero exit code causes the
# build to fail.
script:
- if [ -f configure.ac ]; then autoreconf -i; fi
# -v2 provides useful information for debugging
- cabal configure --enable-tests --enable-benchmarks -v2

# this builds all libraries and executables
# (including tests/benchmarks)
- cabal build

- cabal test
- cabal check

# tests that a source-distribution can be generated
- cabal sdist

# check that the generated source-distribution can be built & installed
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
cd dist/;
if [ -f "$SRC_TGZ" ]; then
cabal install --force-reinstalls "$SRC_TGZ";
else
echo "expected '$SRC_TGZ' not found";
exit 1;
fi
8 changes: 4 additions & 4 deletions http-media.cabal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: http-media
version: 0.6.3
version: 0.6.4
license: MIT
license-file: LICENSE
author: Timothy Jones
maintainer: Timothy Jones <git@zmthy.io>
maintainer: Timothy Jones <tim@zmthy.net>
homepage: https://github.com/zmthy/http-media
bug-reports: https://github.com/zmthy/http-media/issues
copyright: (c) 2012-2015 Timothy Jones
copyright: (c) 2012-2016 Timothy Jones
category: Web
build-type: Simple
cabal-version: >= 1.10
Expand Down Expand Up @@ -113,7 +113,7 @@ test-suite test-http-media
bytestring >= 0.10 && < 0.11,
case-insensitive >= 1.0 && < 1.3,
containers >= 0.5 && < 0.6,
QuickCheck >= 2.6 && < 2.9,
QuickCheck >= 2.6 && < 2.10,
test-framework >= 0.8 && < 0.9,
test-framework-quickcheck2 >= 0.3 && < 0.4

Expand Down
3 changes: 2 additions & 1 deletion test/Network/HTTP/Media/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,6 @@ genServer = listOf1 genConcreteMediaType
genServerAndClient :: Gen ([MediaType], [MediaType])
genServerAndClient = do
server <- genServer
client <- listOf1 $ genDiffMediaTypesWith genConcreteMediaType server
client <- filter (not . flip any server . flip matches) <$>
listOf1 (genDiffMediaTypesWith genConcreteMediaType server)
return (server, client)

0 comments on commit 6db47ba

Please sign in to comment.