packages feed

cabal-meta 0.2.0 → 0.2.1

raw patch · 4 files changed

+9/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CabalMeta.hs view
@@ -144,11 +144,11 @@           where           go sources [] = sources           go _ ([]:_) = error "impossible"-          go sources ((name:flags):more) = let c = T.head name in-            if c == '.' || c == '/'               then go sources { dirs = mkDir: dirs sources } more-              else if "http"  `T.isPrefixOf` name then go sources { https = mkGit: https sources } more-              else if "https" `T.isPrefixOf` name then go sources { https = mkGit: https sources } more-              else if "git:"  `T.isPrefixOf` name then go sources { gits = mkGit: gits sources } more+          go sources ((name:flags):more) = let n = T.head name in+            if n == '.' || n == '/'               then go sources { dirs     = mkDir: dirs sources } more+              else if "http"  `T.isPrefixOf` name then go sources { https    = mkGit: https sources } more+              else if "https" `T.isPrefixOf` name then go sources { gits     = mkGit: https sources } more+              else if "git:"  `T.isPrefixOf` name then go sources { gits     = mkGit: gits sources } more               else                                     go sources { hackages = mkPkg: hackages sources } more             where               mkDir = Directory (fromText name) flags
cabal-meta.cabal view
@@ -1,5 +1,5 @@ name:            cabal-meta-version:         0.2.0+version:         0.2.1 license:         BSD3 license-file:    LICENSE author:          Greg Weber <greg@gregweber.info>
main.hs view
@@ -4,12 +4,11 @@ import System.Environment (getArgs)  import qualified Data.Text.Lazy as T-import Control.Monad (forM_, unless)+import Control.Monad (forM_, when, unless) -- import Filesystem.Path.CurrentOS (decodeString) import Data.Maybe (isNothing) import Data.Text.Lazy (Text, pack) -import Control.Monad (when) import Filesystem.Path.CurrentOS (FilePath, filename) import Prelude hiding (FilePath) 
test/main.hs view
@@ -6,7 +6,7 @@ import Test.Hspec.HUnit () import Data.Text.Lazy () import System.IO-import Filesystem.Path.CurrentOS hiding (fromText)+import Filesystem.Path.CurrentOS hiding (fromText, (</>))  main :: IO () main = hspecX $@@ -16,5 +16,5 @@       d <- pwd       return (ps, d) -    let localize = (\p-> toTextUnsafe $ wd </> fromText p)+    let localize = (\p-> toTextIgnore $ wd </> fromText p)     concatMap asList (packages psources) @?= [localize "test/child", localize "test/vendor/yesod/yesod", "sphinx", "-fone-one-beta", "fake-package"]