windowslive 0.2 → 0.3
raw patch · 4 files changed
+23/−43 lines, 4 filesdep ~basedep ~mtldep ~networksetup-changednew-component:exe:test
Dependency ranges changed: base, mtl, network, parsec, pretty, urlencoded
Files
- Setup.lhs +1/−29
- src/Network/WindowsLive/App.hs +1/−1
- src/Network/WindowsLive/ConsentToken.hs +2/−1
- windowslive.cabal +19/−12
Setup.lhs view
@@ -1,31 +1,3 @@ #!/usr/bin/env runhaskell > import Distribution.Simple-> import Distribution.PackageDescription-> import Distribution.Simple.Setup ( defaultBuildFlags )-> import Distribution.Simple.LocalBuildInfo ( buildDir )-> import Distribution.Simple.Utils ( rawSystemExit )-> import Distribution.Verbosity ( normal )-> import System.FilePath ( (</>) )-> import Control.Monad ( forM_, when )-> import Data.Char ( toLower )--> main = defaultMainWithHooks $ handleTestExes simpleUserHooks--> handleTestExes hooks = hooks { instHook = dropTestExes instHook-> , copyHook = dropTestExes copyHook-> , runTests = runTestExes-> }-> where-> dropTestExes hook pkg =-> let nonTest = filter (not . isTestExe) (executables pkg)-> in hook hooks $ pkg { executables = nonTest }->-> runTestExes args _unknown pkg lbi = do-> buildHook hooks pkg lbi hooks defaultBuildFlags-> forM_ (executables pkg) $ \exe ->-> let testPath = buildDir lbi </> exeName exe </> exeName exe-> in when (isTestExe exe) $ rawSystemExit normal testPath args--> isTestExe exe =-> let fields = customFieldsBI (buildInfo exe)-> in ["true"] == [ map toLower val | ("x-test-executable", val) <- fields ]+> main = defaultMain
src/Network/WindowsLive/App.hs view
@@ -11,7 +11,7 @@ import Control.Monad ( replicateM, liftM ) import Control.Monad.Error ( MonadError )-import qualified Text.Parsec as Parsec+import qualified Text.ParserCombinators.Parsec as Parsec import qualified Network.WindowsLive.Secret as Secret import qualified Codec.Binary.Base64 as Base64
src/Network/WindowsLive/ConsentToken.hs view
@@ -28,7 +28,8 @@ import qualified Data.URLEncoded as URLEnc import Network.WindowsLive.App ( App, verifier, decode ) import Network.URI ( parseURI, URI, parseRelativeReference, unEscapeString )-import Text.Parsec ( parse, many1, char, eof, satisfy, sepBy1 )+import Text.ParserCombinators.Parsec+ ( parse, many1, char, eof, satisfy, sepBy1 ) import Data.Char ( isAlpha, isDigit ) type DelegationToken = String
windowslive.cabal view
@@ -1,6 +1,6 @@ Name: windowslive Cabal-Version: >= 1.6-Version: 0.2+Version: 0.3 Synopsis: Implements Windows Live Web Authentication and Delegated Authentication @@ -18,20 +18,24 @@ Stability: alpha Build-Type: Custom +Flag test+ Description: Build test executable+ Default: False+ Library GHC-Options: -Wall Build-Depends:- base == 4.*,+ base >= 4.0 && < 4.2, Crypto == 4.2.*, dataenc == 0.13.*,- mtl == 1.*,- network == 2.2.*,- pretty == 1.*,+ mtl == 1.1.*,+ network == 2.2.1.*,+ parsec == 2.1.*,+ pretty == 1.0.*, split == 0.1.*, time == 1.1.*,- parsec >= 3.0.0 && < 3.1,- HUnit == 1.2.*,- urlencoded == 0.1.*+ urlencoded >= 0.2 && < 0.4+ HS-Source-Dirs: src Exposed-Modules: Network.WindowsLive.App,@@ -40,10 +44,13 @@ Other-Modules: Network.WindowsLive.Secret --- This executable is not installed by the (custom) Setup program. It is--- used by the test hook (cabal test)-Executable windowslive-library-test+Executable test+ if flag(test)+ Build-Depends:+ HUnit == 1.2.*+ else+ Buildable: False+ GHC-Options: -Wall Main-is: Test.hs HS-Source-Dirs: src, test- X-Test-Executable: true