snaplet-stripe 0.2.0 → 0.3.0
raw patch · 3 files changed
+27/−18 lines, 3 filesdep +lens-family-coredep ~configuratordep ~heistdep ~text
Dependencies added: lens-family-core
Dependency ranges changed: configurator, heist, text, transformers
Files
- Changelog.md +4/−0
- snaplet-stripe.cabal +16/−13
- src/Snap/Snaplet/Stripe.hs +7/−5
+ Changelog.md view
@@ -0,0 +1,4 @@+# `HEAD`++* Depend on `heist` >= 0.14.+* Increased upper-bound on `text` to < 1.3.
snaplet-stripe.cabal view
@@ -1,11 +1,11 @@ name: snaplet-stripe-version: 0.2.0+version: 0.3.0 synopsis: Stripe snaplet for the Snap Framework description: This snaplet contains support for using the Stripe payment platform with a Snap Framework application. license: BSD3 author: Luke Hoersten-maintainer: luke@hoersten.org+maintainer: Luke Hoersten <luke@hoersten.org> build-type: Simple cabal-version: >= 1.6 homepage: https://github.com/LukeHoersten/snaplet-stripe@@ -14,6 +14,8 @@ data-files: resources/stripe/devel.cfg +extra-source-files: Changelog.md+ source-repository head type: git location: https://github.com/LukeHoersten/snaplet-stripe@@ -25,17 +27,18 @@ Snap.Snaplet.Stripe build-depends:- base >= 4.4 && < 5,- bytestring >= 0.9.1 && < 0.11,- snap >= 0.13 && < 0.14,- heist >= 0.13 && < 0.14,- text >= 0.11 && < 0.12,- text-format >= 0.3 && < 0.4,- configurator >= 0.2 && < 0.3,- transformers >= 0.3 && < 0.4,- mtl >= 2 && < 3,- xmlhtml >= 0.2 && < 0.3,- stripe >= 0.8 && < 0.9+ base >= 4.4 && < 5,+ bytestring >= 0.9.1 && < 0.11,+ snap >= 0.13 && < 0.14,+ heist >= 0.14 && < 0.15,+ text >= 0.11 && < 1.3,+ text-format >= 0.3 && < 0.4,+ configurator >= 0.2 && < 0.4,+ transformers >= 0.3 && < 0.5,+ mtl >= 2 && < 3,+ xmlhtml >= 0.2 && < 0.3,+ stripe >= 0.8 && < 0.9,+ lens-family-core >= 1.1.0 && < 1.2 ghc-options: -Wall -fwarn-tabs -funbox-strict-fields
src/Snap/Snaplet/Stripe.hs view
@@ -32,9 +32,11 @@ import Data.Text (Text) import Data.Text.Format (Format, Only (..), format) import qualified Data.Text.Lazy as TL-import Heist (HeistConfig (..))+import Heist (scCompiledSplices,+ scInterpretedSplices) import Heist.Compiled (nodeSplice, pureSplice) import Heist.SpliceAPI (( ## ))+import Lens.Family ((&), (.~)) import Snap.Snaplet (Handler, Initializer, Snaplet, SnapletInit, SnapletLens, getSnapletUserConfig, makeSnaplet,@@ -188,10 +190,10 @@ -- Public Key Splice addStripeSplices :: HasHeist b => Snaplet (Heist b) -> SnapletLens b StripeState -> Initializer b v ()-addStripeSplices h stripe = addConfig h $ mempty- { hcCompiledSplices = ("stripePublicKeyJs" ## stripePublicKeyJsCSplice stripe)- , hcInterpretedSplices = ("stripePublicKeyJs" ## stripePublicKeyJsISplice stripe)- }+addStripeSplices h stripe = addConfig h (mempty+ & scCompiledSplices .~ ("stripePublicKeyJs" ## stripePublicKeyJsCSplice stripe)+ & scInterpretedSplices .~ ("stripePublicKeyJs" ## stripePublicKeyJsISplice stripe))+ stripePublicKeyJsISplice :: SnapletLens b StripeState -> SnapletISplice b