packages feed

include-env 0.1.1.0 → 0.1.2.0

raw patch · 3 files changed

+16/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

app/Main.hs view
@@ -1,12 +1,6 @@-{-# language TemplateHaskell #-} module Main where -import IncludeEnv.TH (includeEnv)--$(includeEnv "SHELL" "shl")-shl :: String- main :: IO ()-main = putStrLn $ unwords ["your current shell :", shl] +main = putStrLn "include-env"  
include-env.cabal view
@@ -1,5 +1,5 @@ name:                include-env-version:             0.1.1.0+version:             0.1.2.0 synopsis:            Include the value of an environment variable at compile time description:         Embed secrets (e.g. API keys) inside production artifacts without checking them into the repository. homepage:            https://github.com/unfoldml/include-env
src/IncludeEnv/TH.hs view
@@ -1,10 +1,22 @@ {-# language TemplateHaskell #-} {-# options_ghc -Wno-unused-imports #-} {-|-Include the value of an environment variable at compile time+Include the value of an environment variable in the binary at compile time.  == Rationale-The first use case for this library is to embed secrets (e.g. API keys) inside production artifacts without checking them into the repository.+Users might want to embed secrets (e.g. API keys, database connection strings) inside production artifacts without checking these into the repository.++== Example++@+import IncludeEnv.TH (includeEnv)++$(`includeEnv` \"SHELL\" "shl")+shl :: String++main :: IO ()+main = putStrLn $ unwords ["your current shell :", shl]+@  -} module IncludeEnv.TH (includeEnv) where