packages feed

keystore 0.6.2.0 → 0.6.3.0

raw patch · 7 files changed

+43/−46 lines, 7 filesdep ~optparse-applicativePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: optparse-applicative

API changes (from Hackage documentation)

Files

changelog view
@@ -90,9 +90,12 @@ 	* adapt 'deploy' example to use 'ks' and 'pm' optparse-applicative parsers  0.6.1.1 Chris Dornan <chrisd@irisconnect.co.uk> 2014-09-28-    * fix deploy example for GHC 7.6.3 (use System.Setenv)+	* fix deploy example for GHC 7.6.3 (use System.Setenv)  0.6.2.0 Chris Dornan <chrisd@irisconnect.co.uk> 2014-10-19-    * add listKeys and keyName_ to Sections-    * add getKeyDataWithMode and rotate_ to Sections-    * rotate reports the keys it is rotating+	* add listKeys and keyName_ to Sections+	* add getKeyDataWithMode and rotate_ to Sections+	* rotate reports the keys it is rotating++0.6.3.0 Chris Dornan <chrisd@irisconnect.co.uk> 2014-10-19+	* switch to optprase-applicative 0.11
examples/deploy/Deploy/Cmd.hs view
@@ -168,38 +168,35 @@  p_host_arg :: Parser HostID p_host_arg =-    argument decode+    argument (eitherReader $ maybe (fail "host not recognised") return . decode)         $  metavar "HOST"         <> help    "a host ID"  p_host :: Parser HostID p_host =-    nullOption+    option (eitherReader $ maybe (fail "host not recognised") return . decode)         $  long "host"         <> metavar "HOST"-        <> reader (maybe (fail "host not recognised") return . decode)         <> help    "a host ID"  p_section :: Parser SectionID p_section =-    nullOption+    option (eitherReader $ maybe (fail "section not recognised") return . decode)         $  long "section"         <> metavar "SECTION"-        <> reader (maybe (fail "section not recognised") return . decode)         <> help "a section ID"  p_a_section :: Parser SectionID p_a_section =-    argument decode+    argument (eitherReader $ maybe (fail "section not recognised") return . decode)         $  metavar "SECTION"         <> help    "a section ID"  p_key :: Parser KeyID p_key =-    nullOption+    option (eitherReader $ maybe (fail "key not recognised") return . decode)         $  long     "key"         <> metavar  "KEY"-        <> reader (maybe (fail "key not recognised") return . decode)         <> help     "a key ID"  p_out :: Parser FilePath
examples/deploy/deploy.hs view
@@ -7,7 +7,10 @@  import           Deploy.Deploy import           Deploy.Cmd+ import           Deploy.HostSectionKey+import           Control.Applicative+import           Control.Exception import           Data.KeyStore import           Data.API.Types import           Data.KeyStore                  as KS@@ -18,10 +21,8 @@ import           Data.List import           System.IO import           System.Environment-import qualified System.SetEnv                  as SE import           System.Process-import           Control.Applicative-import           Control.Exception+import qualified System.SetEnv                  as SE   ks_fp, ks_mac_fp :: FilePath
keystore.cabal view
@@ -1,5 +1,5 @@ Name:                   keystore-Version:                0.6.2.0+Version:                0.6.3.0 Synopsis:               Managing stores of secret things Homepage:               http://github.com/cdornan/keystore Author:                 Chris Dornan@@ -19,7 +19,7 @@   .   /All Haskell/   .-  This package is written purely in Hakell and all of the cryptographic packages+  This package is written purely in Haskell and all of the cryptographic packages   it relies upon are written in Haskell.   .   /JSON Format/@@ -186,7 +186,7 @@         lens                   >= 3.9.2             ,         mtl                    >= 2                 ,         old-locale             >= 1.0.0.5           ,-        optparse-applicative   >= 0.9.0    && <0.10 ,+        optparse-applicative   >= 0.11.0   && <0.12 ,         pbkdf                  >= 1.1.1.0           ,         regex-compat-tdfa      >= 0.95.1            ,         safe                   >= 0.3.3             ,
src/Data/KeyStore/CLI/Command.hs view
@@ -375,13 +375,13 @@  p_trigger_id  :: Parser TriggerID p_trigger_id =-    argument (Just . TriggerID . T.pack)+    argument (eitherReader $ Right . TriggerID . T.pack)         $  metavar "TRIGGER"         <> help    "name of the triggered settings"  p_pattern :: Parser Pattern p_pattern =-    argument (Just . mk)+    argument (eitherReader $ Right . mk)         $  metavar "REGEX"         <> help    "POSIX regular expression for selecting matching keys"   where@@ -389,37 +389,34 @@  p_name :: Parser Name p_name =-    argument (either (const Nothing) Just . name)+    argument (eitherReader $ either (Left . showReason) Right . name)         $  metavar "NAME"         <> help    "name of the key"  p_comment :: Parser Comment p_comment =-    argument (Just . Comment . T.pack)+    argument (eitherReader $ Right . Comment . T.pack)         $  metavar "COMMENT"         <> help    "comment text"  p_identity :: Parser Identity p_identity = fmap (maybe "" id) $ optional $-    argument (Just . Identity . T.pack)+    argument (eitherReader $ Right . Identity . T.pack)         $  metavar "KEY-IDENTITY"         <> help    "identity of the key"  p_env_var :: Parser EnvVar p_env_var =-    argument (Just . fromString)+    argument (eitherReader $ Right . fromString)         $  metavar "ENV-VAR"         <> help    "environment variable to hold the key's value"  p_safeguard :: Parser Safeguard p_safeguard =-    nullOption+    option (eitherReader $ either (Left . showReason) Right . parseSafeguard)         $  long "safeguard"-        <> reader (either (const $ fail msg) return . parseSafeguard)         <> metavar "SAFEGUARD"         <> help "keys used to encrypt the secret key"-  where-    msg = "bad safeguard syntax"  p_key_text :: Parser FilePath p_key_text =@@ -430,7 +427,7 @@  p_file :: String -> String -> Parser FilePath p_file mtv hlp =-    argument Just+    argument str         $  metavar mtv         <> help    hlp @@ -442,7 +439,7 @@  p_opt :: Parser OptEnum p_opt =-    argument (parseOpt . T.pack)+    argument (eitherReader $ maybe (Left "bad SETTING-OPT") Right . parseOpt . T.pack)         $  metavar "SETTING-OPT"         <> help    "name of a keystore setting option" @@ -455,10 +452,10 @@     Success a -> return a     Failure failure -> do       progn <- getProgName-      let (msg, exit) = execFailure failure progn+      let (msg, exit, _) = execFailure failure progn       case exit of-        ExitSuccess -> putStrLn msg-        _           -> hPutStrLn stderr msg+        ExitSuccess -> putStrLn $ show msg+        _           -> hPutStrLn stderr $ show msg       exitWith exit     CompletionInvoked compl -> do       progn <- getProgName
src/Data/KeyStore/PasswordManager.hs view
@@ -1172,11 +1172,10 @@  p_pw_id_opt :: PW p => Parser p p_pw_id_opt =-    nullOption+    option (eitherReader $ maybe (fail "password-id not recognised") return . parsePwName . PasswordName . T.pack)         $  long    "id"         <> short   'p'         <> metavar "PASSWORD-ID"-        <> reader  (maybe (fail "password-id not recognised") return . parsePwName . PasswordName . T.pack)         <> help    "a password ID"  -- arguments@@ -1185,7 +1184,7 @@ p_comment = unwords <$> many p_word  p_hash :: Parser ()-p_hash = argument (\s->if s=="#" then Just () else Nothing) $ metavar "#"+p_hash = argument (eitherReader $ \s->if s=="#" then return () else fail "# expected") $ metavar "#"  h_info :: Parser a -> InfoMod a -> ParserInfo a h_info pr = O.info (helper <*> pr)@@ -1195,19 +1194,19 @@  p_password_text :: PW p => Bool -> PMConfig p -> Parser PasswordText p_password_text hp pmc =-    argument (Just . cond_hash hp pmc)+    argument (eitherReader $ Right . cond_hash hp pmc)         $  metavar "PASSWORD-TEXT"         <> help    "the text of the password"  p_pw_id :: PW p => Parser p p_pw_id =-    argument (parsePwName . PasswordName . T.pack)+    argument (eitherReader $ maybe (fail "bad password syntax") return . parsePwName . PasswordName . T.pack)         $  metavar "PASSWORD-ID"         <> help    "a password ID"  p_pl_pw :: PW p => PMConfig p -> Parser PasswordName p_pl_pw pmc =-    argument (parse_plus_pw pmc)+    argument (eitherReader $ maybe (fail "bad +password syntax") return . parse_plus_pw pmc)         $  metavar "+PASSWORD"         <> help    "a dynamic (plus) password name" @@ -1223,18 +1222,18 @@  p_session_name :: Parser SessionName p_session_name =-    argument (Just . SessionName . T.pack)+    argument (eitherReader $ Right . SessionName . T.pack)         $  metavar "SESSION"         <> help    "a session name"  p_store_fp :: Parser FilePath p_store_fp =-    argument Just+    argument (eitherReader Right)         $  metavar "STORE"         <> help    "file containing the password store to import"  p_word :: Parser String-p_word = argument Just $ metavar "WORD"+p_word = argument (eitherReader Right) $ metavar "WORD"  -- run_parse @@ -1244,10 +1243,10 @@     Success a -> return a     Failure failure -> do       progn <- E.getProgName-      let (msg, exit) = execFailure failure progn+      let (msg, exit, _) = execFailure failure progn       case exit of-        ExitSuccess -> putStrLn msg-        _           -> hPutStrLn stderr msg+        ExitSuccess -> putStrLn $ show msg+        _           -> hPutStrLn stderr $ show msg       exitWith exit     CompletionInvoked compl -> do       progn <- E.getProgName
src/Data/KeyStore/Version.hs view
@@ -6,4 +6,4 @@     (a,b,c,d) = versionTuple  versionTuple :: (Int,Int,Int,Int)-versionTuple = (0,6,2,0)+versionTuple = (0,6,3,0)