dotenv 0.5.1.0 → 0.5.1.1
raw patch · 4 files changed
+11/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- dotenv.cabal +1/−1
- spec/Configuration/Dotenv/ParseSpec.hs +5/−2
- src/Configuration/Dotenv/Parse.hs +1/−1
CHANGELOG.md view
@@ -1,4 +1,8 @@ ## MASTER+## Dotenv 0.5.1.1++* Allow `.env` empty files+ ## Dotenv 0.5.1.0 * Add support for command substitution on env vars.
dotenv.cabal view
@@ -1,5 +1,5 @@ name: dotenv-version: 0.5.1.0+version: 0.5.1.1 synopsis: Loads environment variables from dotenv files homepage: https://github.com/stackbuilders/dotenv-hs description:
spec/Configuration/Dotenv/ParseSpec.hs view
@@ -6,9 +6,9 @@ import Configuration.Dotenv.ParsedVariable (ParsedVariable(..), VarValue(..), VarFragment(..))-import Data.Void (Void) +import Data.Void (Void) import Test.Hspec (it, describe, Spec, hspec)-import Test.Hspec.Megaparsec (shouldParse, shouldFailOn)+import Test.Hspec.Megaparsec (shouldParse, shouldFailOn, shouldSucceedOn) import Text.Megaparsec (ParseError, parse) main :: IO ()@@ -147,6 +147,9 @@ `shouldParse` [ParsedVariable "FOO" (Unquoted [CommandInterpolation "command"])] parseConfig "FOO=asdf_$(command)" `shouldParse` [ParsedVariable "FOO" (Unquoted [VarLiteral "asdf_", CommandInterpolation "command"])]++ it "parses empty content (when the file is empty)" $+ parseConfig `shouldSucceedOn` "" parseConfig :: String -> Either (ParseError Char Void) [ParsedVariable] parseConfig = parse configParser ""
src/Configuration/Dotenv/Parse.hs view
@@ -33,7 +33,7 @@ -- arguments separated by @=@. Comments in all positions are handled -- appropriately. configParser :: Parser [ParsedVariable]-configParser = between scn eof (sepEndBy1 envLine (eol <* scn))+configParser = between scn eof (sepEndBy envLine (eol <* scn)) -- | Parse a single environment variable assignment. envLine :: Parser ParsedVariable