snap 0.13.2.0 → 0.13.2.1
raw patch · 4 files changed
+15/−14 lines, 4 filesdep ~aeson
Dependency ranges changed: aeson
Files
- project_template/tutorial/foo.cabal +1/−1
- snap.cabal +2/−2
- src/Snap/Snaplet/Auth/Types.hs +9/−8
- test/snap-testsuite.cabal +3/−3
project_template/tutorial/foo.cabal view
@@ -22,7 +22,7 @@ bytestring >= 0.9.1 && < 0.11, MonadCatchIO-transformers >= 0.2.1 && < 0.4, mtl >= 2 && < 3,- snap >= 0.11 && < 0.13,+ snap >= 0.11 && < 0.14, snap-core >= 0.9 && < 0.11, snap-server >= 0.9 && < 0.11
snap.cabal view
@@ -1,5 +1,5 @@ name: snap-version: 0.13.2.0+version: 0.13.2.1 synopsis: Top-level package for the Snap Web Framework description: This is the top-level package for the official Snap Framework libraries.@@ -144,7 +144,7 @@ build-depends: MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.7,+ aeson >= 0.6 && < 0.8, attoparsec >= 0.10 && < 0.12, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,
src/Snap/Snaplet/Auth/Types.hs view
@@ -18,6 +18,7 @@ import Data.Hashable (Hashable) import Data.Time import Data.Text (Text)+import Data.Text.Encoding import Data.Typeable import Snap.Snaplet @@ -268,8 +269,8 @@ , "locked_until" .= userLockedOutUntil u , "current_login_at" .= userCurrentLoginAt u , "last_login_at" .= userLastLoginAt u- , "current_ip" .= userCurrentLoginIp u- , "last_ip" .= userLastLoginIp u+ , "current_ip" .= fmap decodeUtf8 (userCurrentLoginIp u)+ , "last_ip" .= fmap decodeUtf8 (userLastLoginIp u) , "created_at" .= userCreatedAt u , "updated_at" .= userUpdatedAt u , "reset_token" .= userResetToken u@@ -294,8 +295,8 @@ <*> v .: "locked_until" <*> v .: "current_login_at" <*> v .: "last_login_at"- <*> v .: "current_ip"- <*> v .: "last_ip"+ <*> fmap (fmap encodeUtf8) (v .: "current_ip")+ <*> fmap (fmap encodeUtf8) (v .: "last_ip") <*> v .: "created_at" <*> v .: "updated_at" <*> v .: "reset_token"@@ -307,21 +308,21 @@ ------------------------------------------------------------------------------ instance ToJSON Password where- toJSON (Encrypted x) = toJSON x+ toJSON (Encrypted x) = toJSON $ decodeUtf8 x toJSON (ClearText _) = error "ClearText passwords can't be serialized into JSON" ------------------------------------------------------------------------------ instance FromJSON Password where- parseJSON = fmap Encrypted . parseJSON+ parseJSON = fmap (Encrypted . encodeUtf8) . parseJSON ------------------------------------------------------------------------------ instance ToJSON Role where- toJSON (Role x) = toJSON x+ toJSON (Role x) = toJSON $ decodeUtf8 x ------------------------------------------------------------------------------ instance FromJSON Role where- parseJSON = fmap Role . parseJSON+ parseJSON = fmap (Role . encodeUtf8) . parseJSON
test/snap-testsuite.cabal view
@@ -26,7 +26,7 @@ unix >= 2.2.0.0 && < 2.7, MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.7,+ aeson >= 0.6 && < 0.8, attoparsec >= 0.10 && < 0.12, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -98,7 +98,7 @@ build-depends: MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.7,+ aeson >= 0.6 && < 0.8, attoparsec >= 0.10 && < 0.12, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,@@ -180,7 +180,7 @@ unix >= 2.2.0.0 && < 2.7, MonadCatchIO-transformers >= 0.2 && < 0.4,- aeson >= 0.6 && < 0.7,+ aeson >= 0.6 && < 0.8, attoparsec >= 0.10 && < 0.12, bytestring >= 0.9.1 && < 0.11, cereal >= 0.3 && < 0.5,