Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
language: c
sudo: false

cache:
directories:
- $HOME/.cabsnap
- $HOME/.cabal/packages

before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar

matrix:
include:
- env: CABALVER=1.22 GHCVER=7.10.1
compiler: ": #GHC 7.10.1"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.2
compiler: ": #GHC 7.10.2"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
- env: CABALVER=1.22 GHCVER=7.10.3
compiler: ": #GHC 7.10.3"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.1
compiler: ": #GHC 8.0.1"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
- env: CABALVER=1.24 GHCVER=8.0.2
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}

before_install:
- unset CC
- 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 '?')]"
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
then
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
fi
- travis_retry cabal update -v
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt

# check whether current requested install-plan matches cached package-db snapshot
- if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
then
echo "cabal build-cache HIT";
rm -rfv .ghc;
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
else
echo "cabal build-cache MISS";
rm -rf $HOME/.cabsnap;
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
cabal install --only-dependencies --enable-tests --enable-benchmarks;
fi

# snapshot package-db on cache miss
- if [ ! -d $HOME/.cabsnap ];
then
echo "snapshotting package-db to build-cache";
mkdir $HOME/.cabsnap;
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
fi

# 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
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- cabal build # this builds all libraries and executables (including tests/benchmarks)
- cabal test
- cabal check
- cabal sdist # tests that a source-distribution can be generated

# Check that the resulting source distribution can be built & installed.
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
# `cabal install --force-reinstalls dist/*-*.tar.gz`
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")

# EOF
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# servant-ruby

[![Build Status](https://travis-ci.org/joneshf/servant-ruby.svg?branch=master)](https://travis-ci.org/joneshf/servant-ruby)

Create a Ruby client from a Servant API using `Net::HTTP`.
3 changes: 2 additions & 1 deletion servant-ruby.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ category: Servant, Web
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
tested-with: GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.0.2

library
hs-source-dirs: src
Expand All @@ -30,8 +31,8 @@ test-suite doc-test
main-is: Main.hs
hs-source-dirs: test
build-depends: base
, Cabal >= 1.24 && < 1.25
, doctest >= 0.11 && < 0.12
default-language: Haskell2010

source-repository head
type: git
Expand Down
3 changes: 1 addition & 2 deletions src/Servant/Ruby.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ Stability: Experimental

module Servant.Ruby (NameSpace(..), ruby) where

import Control.Lens (filtered, folded, to, view, (^.), (^..))
import Control.Lens (filtered, folded, to, view, (^.), (^..), (&))

import Data.Function ((&))
import Data.Monoid ((<>))
import Data.Proxy (Proxy(Proxy))
import Data.Text (Text)
Expand Down
13 changes: 13 additions & 0 deletions stack-7.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
flags: {}
extra-package-dbs: []
packages:
- '.'
extra-deps:
- casing-0.1.1.0
- http-api-data-0.3.5
- kan-extensions-5.0.1
- lens-4.15.1
- natural-transformation-0.4
- servant-0.10
- servant-foreign-0.10
resolver: lts-6.30