packages feed

advent-of-code-api 0.1.2.2 → 0.1.2.3

raw patch · 3 files changed

+11/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -13,6 +13,10 @@      <https://github.com/mstksg/advent-of-code-api/releases/tag/v0.1.2.2> +*   *December 8, 2018*: *BUGFIX* Fix cache directory to separate by year++    <https://github.com/mstksg/advent-of-code-api/releases/tag/v0.1.2.3>+ Version 0.1.2.0 --------------- 
advent-of-code-api.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 35e68aade3ca693116d04a94d2d338576feea8f947bc670d878456e2cb8b3e85+-- hash: 981dd4bf9967973046dfd1d35527c986c3f5609336fd03d8d7faf5944537342a  name:           advent-of-code-api-version:        0.1.2.2+version:        0.1.2.3 synopsis:       Advent of Code REST API bindings description:    Haskell bindings for Advent of Code REST API.  Please use responsibly!                 See README.md or "Advent" module for an introduction and tutorial.
src/Advent.hs view
@@ -286,11 +286,12 @@ -- | Cache file for a given 'AoC' command apiCache     :: Maybe String           -- ^ session key+    -> Integer                -- ^ year     -> AoC a     -> Maybe FilePath-apiCache sess = \case-    AoCPrompt d -> Just $ printf "prompt/%02d.html"        (dayInt d)-    AoCInput  d -> Just $ printf "input/%s%02d.txt" keyDir (dayInt d)+apiCache sess yr = \case+    AoCPrompt d -> Just $ printf "prompt/%04d/%02d.html"        yr (dayInt d)+    AoCInput  d -> Just $ printf "input/%s%04d/%02d.txt" keyDir yr (dayInt d)     AoCSubmit{} -> Nothing   where     keyDir = case sess of@@ -309,7 +310,7 @@       Just c  -> pure (Nothing, c)       Nothing -> (Just _aSessionKey,) . (</> "advent-of-code-api") <$> getTemporaryDirectory -    let cacher = case apiCache keyMayb a of+    let cacher = case apiCache keyMayb _aYear a of           Nothing -> id           Just fp -> cacheing (cacheDir </> fp) $                        if _aForce