packages feed

libravatar 0.3.0.0 → 0.3.0.1

raw patch · 10 files changed

+219/−189 lines, 10 filesdep +cryptonitedep −SHAdep −crypto-apidep −pureMD5dep ~bytestringdep ~data-default-classdep ~dns

Dependencies added: cryptonite

Dependencies removed: SHA, crypto-api, pureMD5

Dependency ranges changed: bytestring, data-default-class, dns, network-uri, utf8-string

Files

AUTHORS view
@@ -1,1 +1,1 @@-fr33domlover <fr33domlover@rel4tion.org>+fr33domlover <fr33domlover@riseup.net>
ChangeLog view
@@ -1,15 +1,15 @@ The changes are recorded by the version control system, Darcs. To see a log quickly from the terminal, run: -  $ darcs changes --repo http://darcs.rel4tion.org/repos/libravatar+  $ darcs changes --repo http://hub.darcs.net/fr33domlover/libravatar -There is also a web interface at <http://darcs.rel4tion.org> which, among other+There is also a web interface at <http://hub.darcs.net> which, among other things, can display the history log.  To see the log in a local clone, first get a copy of the repository if you haven't yet: -  $ darcs get http://darcs.rel4tion.org/repos/libravatar+  $ darcs get http://hub.darcs.net/fr33domlover/libravatar  Then move into the newly created directory and run darcs: 
− INSTALL
@@ -1,13 +0,0 @@-Install from Hackage:--    $ cabal install libravatar--Install from unpacked release tarball or source repo:--    $ cd libravatar-    $ cabal install--Just play with it without installing:--    $ cabal build-    $ cabal repl
+ INSTALL.md view
@@ -0,0 +1,12 @@+Install from Hackage/Stackage:++    $ stack install libravatar++Install from unpacked release tarball or source repo:++    $ cd libravatar+    $ stack install++Just play with it without installing:++    $ stack repl
− NEWS
@@ -1,116 +0,0 @@-This file lists the user-visible interesting changes between releases. For a-full list of changes to the source, see the ChangeLog.----libravatar 0.3.0.0 -- 2015-12-17-================================--General, build and documentation changes:--* (None)--New APIs, features and enhancements:--* Make the `AvatarOptions` type abstract, so that new fields don't break API-* Allow gravatar fallbacl to be disabled through `optTryGravatar`--Bug fixes:--* (none)--Dependency changes:--* Add data-default-class------libravatar 0.2.0.0 -- 2015-12-08-================================--General, build and documentation changes:--* Add some background details to the docs--New APIs, features and enhancements:--* Provide dedicated datatypes and more type safety--Bug fixes:--* (none)--Dependency changes:--* (none)------libravatar 0.1.0.2 -- 2015-12-03-================================--General, build and documentation changes:--* Update the docs, hopefully clarifying some points--New APIs, features and enhancements:--* (none)--Bug fixes:--* (none)--Dependency changes:--* (none)------libravatar 0.1.0.1 -- 2015-07-13-================================--General, build and documentation changes:--* Add some usage examples--New APIs, features and enhancements:--* (none)--Bug fixes:--* (none)--Dependency changes:--* (none)------libravatar 0.1.0.0 -- 2015-07-12-================================--General, build and documentation changes:--* (This is the first release, so everything is new)--New APIs, features and enhancements:--* (This is the first release, so everything is a new feature)--Bug fixes:--* (This is just the first release)--Dependency changes:--* (This is the first release)
+ NEWS.md view
@@ -0,0 +1,143 @@+This file lists the user-visible interesting changes between releases. For a+full list of changes to the source, see the ChangeLog.++++libravatar 0.3.0.1 -- 2016-04-30+================================++General, build and documentation changes:++* Use the `cryptonite` package for hashing+* Build with `stack` and latest Stackage LTS++New APIs, features and enhancements:++* (None)++Bug fixes:++* (none)++Dependency changes:++* Remove crypto-api+         pureMD5+         SHA+* Add    cryptonite++++++libravatar 0.3.0.0 -- 2015-12-17+================================++General, build and documentation changes:++* (None)++New APIs, features and enhancements:++* Make the `AvatarOptions` type abstract, so that new fields don't break API+* Allow gravatar fallbacl to be disabled through `optTryGravatar`++Bug fixes:++* (none)++Dependency changes:++* Add data-default-class++++++libravatar 0.2.0.0 -- 2015-12-08+================================++General, build and documentation changes:++* Add some background details to the docs++New APIs, features and enhancements:++* Provide dedicated datatypes and more type safety++Bug fixes:++* (none)++Dependency changes:++* (none)++++++libravatar 0.1.0.2 -- 2015-12-03+================================++General, build and documentation changes:++* Update the docs, hopefully clarifying some points++New APIs, features and enhancements:++* (none)++Bug fixes:++* (none)++Dependency changes:++* (none)++++++libravatar 0.1.0.1 -- 2015-07-13+================================++General, build and documentation changes:++* Add some usage examples++New APIs, features and enhancements:++* (none)++Bug fixes:++* (none)++Dependency changes:++* (none)++++++libravatar 0.1.0.0 -- 2015-07-12+================================++General, build and documentation changes:++* (This is the first release, so everything is new)++New APIs, features and enhancements:++* (This is the first release, so everything is a new feature)++Bug fixes:++* (This is just the first release)++Dependency changes:++* (This is the first release)
− README
@@ -1,12 +0,0 @@-See the .cabal file for more info and link to project website the version-control.--The official download location is Hackage.--This library is free software, and is committed to software freedom. It is-released to the public domain using the CC0 Public Domain Dedication. For the-boring "legal" details see the file 'COPYING'.--See the file 'INSTALL' for hints on installation. The file 'ChangeLog' explains-how to see the history log of the changes done in the code. 'NEWS' provides a-friendly overview of the changes for each release.
+ README.md view
@@ -0,0 +1,14 @@+See the .cabal file for more info and link to project website the version+control.++The official download location is Hackage:++<http://hackage.haskell.org/package/libravatar>++This library is free software, and is committed to software freedom. It is+released to the public domain using the CC0 Public Domain Dedication. For the+boring "legal" details see the file 'COPYING'.++See the file 'INSTALL' for hints on installation. The file 'ChangeLog' explains+how to see the history log of the changes done in the code. 'NEWS' provides a+friendly overview of the changes for each release.
libravatar.cabal view
@@ -1,38 +1,45 @@-name:                libravatar-version:             0.3.0.0-synopsis:            Use Libravatar, the decentralized avatar delivery service-description:         This package is a Haskell library for-                     <http://libravatar.org Libravatar>.-homepage:            http://rel4tion.org/projects/libravatar/-bug-reports:         http://rel4tion.org/projects/libravatar/tickets/-license:             PublicDomain-license-file:        COPYING-author:              fr33domlover-maintainer:          fr33domlover@riseup.net-copyright:           ♡ Copying is an act of love. Please copy, reuse and share.-category:            Network, Web-build-type:          Simple-extra-source-files:  AUTHORS ChangeLog COPYING INSTALL NEWS README-cabal-version:       >=1.10+name: libravatar+version: 0.3.0.1+cabal-version: >=1.10+build-type: Simple+license: PublicDomain+license-file: COPYING+copyright: ♡ Copying is an act of love. Please copy, reuse and share.+maintainer: fr33domlover@riseup.net+homepage: http://rel4tion.org/projects/libravatar/+bug-reports: http://rel4tion.org/projects/libravatar/tickets/+synopsis: Use Libravatar, the decentralized avatar delivery service+description:+    This package is a Haskell library for+    <http://libravatar.org Libravatar>.+category: Network, Web+author: fr33domlover+extra-source-files:+    AUTHORS+    ChangeLog+    COPYING+    INSTALL.md+    NEWS.md+    README.md  source-repository head-  type:                darcs-  location:            http://hub.darcs.net/fr33domlover/libravatar+    type: darcs+    location: http://hub.darcs.net/fr33domlover/libravatar  library-  exposed-modules:     Network.Libravatar-  -- other-modules:-  -- other-extensions:    -  build-depends:       base               >=4.7 && <5-                     , bytestring-                     , crypto-api         >=0.13.2-                     , data-default-class-                     , dns                >=2-                     , network-uri        >=2.6-                     , pureMD5            >=2.1.2-                     , random             >=1.1-                     , SHA                >=1.6.4-                     , url                >=2.1.3-                     , utf8-string        >=1-  hs-source-dirs:      src-  default-language:    Haskell2010+    exposed-modules:+        Network.Libravatar+    build-depends:+        base >=4.7 && <5,+        bytestring >=0.10.6.0,+        cryptonite >=0.10,+        data-default-class >=0.0.1,+        dns >=2.0.2,+        network-uri >=2.6.1.0,+        random >=1.1,+        url >=2.1.3,+        utf8-string >=1.0.1.1+    default-language: Haskell2010+    hs-source-dirs: src+    ghc-options: -Wall+
src/Network/Libravatar.hs view
@@ -1,6 +1,6 @@ {- This file is part of libravatar for Haskell.  -- - Written in 2015 by fr33domlover <fr33domlover@rel4tion.org>.+ - Written in 2015, 2016 by fr33domlover <fr33domlover@riseup.net>.  -  - ♡ Copying is an act of love. Please copy, reuse and share.  -@@ -29,11 +29,10 @@ where  import Control.Monad (liftM)-import Crypto.Classes (hash')+import Crypto.Hash (hashWith)+import Crypto.Hash.Algorithms (SHA256 (SHA256), MD5 (MD5)) import Data.Char (toLower) import Data.Default.Class-import Data.Digest.Pure.MD5 (MD5Digest)-import Data.Digest.Pure.SHA (sha256) import Data.List (partition) import Data.Maybe (catMaybes, fromMaybe) import Network.DNS.Lookup@@ -44,7 +43,6 @@ import System.Random (randomRIO)  import qualified Data.ByteString.UTF8 as BU (fromString)-import qualified Data.ByteString.Lazy.UTF8 as BLU (fromString) import qualified Data.ByteString.Char8 as BC  defaultHost       = Host (HTTP False) "cdn.libravatar.org"    Nothing@@ -152,13 +150,10 @@ defOpts = def  hashMD5 :: String -> String-hashMD5 =-    let h :: String -> MD5Digest-        h = hash' . BU.fromString-    in show . h+hashMD5 = show . hashWith MD5 . BU.fromString  hashSHA256 :: String -> String-hashSHA256 = show . sha256 . BLU.fromString+hashSHA256 = show . hashWith SHA256 . BU.fromString  -- Hash email using MD5 or SHA256 depending on whether gr4va7ar should be used hashMail :: Bool -> String -> String