Permalink
Browse files

Bumped for hackage fay 0.9.1.0. Removed old tests.

  • Loading branch information...
1 parent 0bfdee8 commit 7b6245cdfbc6e904a377f6f1d87f9f6367af9435 @bergmark bergmark committed Sep 2, 2012
Showing with 3 additions and 106 deletions.
  1. +0 −1 .gitignore
  2. +1 −1 example/example.cabal
  3. +2 −28 snaplet-fay.cabal
  4. +0 −59 src/Test.hs
  5. +0 −1 test-files/Imported.hs
  6. +0 −3 test-files/Importing.hs
  7. +0 −13 test-files/alert.hs
View
1 .gitignore
@@ -8,4 +8,3 @@ example/log
example/site_key.txt
example/snaplets/fay/js
example/users.json
-test-dest
View
2 example/example.cabal
@@ -31,7 +31,7 @@ Executable example
, snap-core == 0.9.*
, snap-server == 0.9.*
, snap-loader-static == 0.9.*
- , snaplet-fay == 0.1.0.0
+ , snaplet-fay == 0.2.0.0
, fay
, fay-jquery
, text == 0.11.*
View
30 snaplet-fay.cabal
@@ -5,7 +5,7 @@ name: snaplet-fay
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
-version: 0.1.0.0
+version: 0.2.0.0
synopsis: Fay integration for Snap with automatic (re)compilation during development
description: Fay integration for Snap with automatic (re)compilation during development.
For more information, please see <https://github.com/faylang/snaplet-fay>.
@@ -28,10 +28,6 @@ source-repository head
type: git
location: https://github.com/faylang/snaplet-fay.git
-Flag test
- Description: Whether to build the test executable
- Default: False
-
library
ghc-options: -Wall
hs-source-dirs: src
@@ -49,29 +45,7 @@ library
configurator == 0.2.*,
data-default >= 0.4,
directory == 1.1.*,
- fay >= 0.7,
- filepath == 1.3.*,
- mtl == 2.1.*,
- snap == 0.9.*,
- snap-core == 0.9.*,
- transformers == 0.3.*
-
-Executable test
- if !flag(test)
- buildable: False
-
- ghc-options: -Wall
- hs-source-dirs: src
- main-is: Test.hs
-
- build-depends:
- aeson == 0.6.*,
- base == 4.5.*,
- bytestring == 0.9.*,
- configurator == 0.2.*,
- data-default >= 0.4,
- directory == 1.1.*,
- fay >= 0.7,
+ fay >= 0.9.1,
filepath == 1.3.*,
mtl == 2.1.*,
snap == 0.9.*,
View
59 src/Test.hs
@@ -1,59 +0,0 @@
-module Main where
-
--- | The tests pass if the program produces no output
-
-import Control.Applicative
-import Control.Monad
-import System.Directory
-import System.FilePath
-
-import Snap.Snaplet.Fay
-import Snap.Snaplet.Fay.Internal
-
-
-config :: Fay
-config = Fay {
- srcDir = "test-files"
- , destDir = "test-dest"
- , includeDirs = ["test-files"]
- , verbose = False
- , compileMethod = CompileAll
- }
-
-
-assertM :: String -> IO Bool -> IO ()
-assertM s f = f >>= \b -> unless b (putStrLn s)
-
-
-assert :: String -> Bool -> IO ()
-assert _ True = return ()
-assert s False = putStrLn s
-
-
-touch :: FilePath -> IO ()
-touch fp = writeFile fp "main = return ()"
-
-
-rmf :: FilePath -> IO ()
-rmf fp = doesFileExist fp >>= (`when` removeFile fp)
-
-
-main :: IO ()
-main = do
- mapM_ removeFile =<< (extFiles "js" . destDir) config
- compileAll config
- len <- length <$> extFiles "js" (destDir config)
- assert "0" (len > 0)
-
- rmf (srcDir config </> "NewFile.hs")
- rmf (destDir config </> "NewFile.js")
-
- assertM "1" $ not <$> doesFileExist (destDir config </> "NewFile.js")
- touch $ srcDir config </> "NewFile.hs"
-
- compileAll config
- assertM "2" $ doesFileExist (destDir config </> "NewFile.js")
- removeFile $ srcDir config </> "NewFile.hs"
-
- compileAll config
- assertM "3" $ not <$> doesFileExist (destDir config </> "NewFile.js")
View
1 test-files/Imported.hs
@@ -1 +0,0 @@
-module Imported where
View
3 test-files/Importing.hs
@@ -1,3 +0,0 @@
-module Importing where
-
-import Imported
View
13 test-files/alert.hs
@@ -1,13 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
-module Alert where
-
-import Language.Fay.FFI
-import Language.Fay.Prelude
-
-main :: Fay ()
-main = alert "Hello, World!"
-
--- | Alert using window.alert.
-alert :: String -> Fay ()
-alert = ffi "window.alert(%1)"

0 comments on commit 7b6245c

Please sign in to comment.