upped lts-version, updated libs, fixed broken stuff
This commit is contained in:
parent
80920116cd
commit
370ce9ded5
@ -125,7 +125,7 @@ getApplicationDev = do
|
||||
return (wsettings, app)
|
||||
|
||||
getAppSettings :: IO AppSettings
|
||||
getAppSettings = loadAppSettings [configSettingsYml] [] useEnv
|
||||
getAppSettings = loadYamlSettings [configSettingsYml] [] useEnv
|
||||
|
||||
-- | main function for use by yesod devel
|
||||
develMain :: IO ()
|
||||
@ -135,7 +135,7 @@ develMain = develMainHelper getApplicationDev
|
||||
appMain :: IO ()
|
||||
appMain = do
|
||||
-- Get the settings from all relevant sources
|
||||
settings <- loadAppSettingsArgs
|
||||
settings <- loadYamlSettingsArgs
|
||||
-- fall back to compile-time values, set to [] to require values at runtime
|
||||
[configSettingsYmlValue]
|
||||
|
||||
|
@ -11,7 +11,7 @@ import Yesod.Default.Util (addStaticContentExternal)
|
||||
import Yesod.Core.Types (Logger)
|
||||
import qualified Yesod.Core.Unsafe as Unsafe
|
||||
--import Yesod.Auth.HashDB (authHashDB)
|
||||
import Yesod.Auth.OAuth2.EveOnline (oauth2Eve,WidgetType(..))
|
||||
import Yesod.Auth.OAuth2.EveOnline (oauth2EveScoped,WidgetType(..))
|
||||
import Data.Time.Format (parseTimeM)
|
||||
|
||||
-- | The foundation datatype for your application. This can be a good place to
|
||||
@ -179,11 +179,64 @@ instance YesodAuth App where
|
||||
-- You can add other plugins like BrowserID, email or OAuth here
|
||||
authPlugins _ = [ --authBrowserId def
|
||||
--, authHashDB (Just . UniqueUser)
|
||||
oauth2Eve "346ee0ad8f974e30be6bf422f40d891b" "kXnZd7f3pmRCvePiBPQcTL2aRcgBHSgPRxc6VNYT" BigBlack
|
||||
oauth2EveScoped "346ee0ad8f974e30be6bf422f40d891b" "kXnZd7f3pmRCvePiBPQcTL2aRcgBHSgPRxc6VNYT"
|
||||
[ "publicData"
|
||||
, "characterContactsRead"
|
||||
, "characterLocationRead"
|
||||
, "characterWalletRead"
|
||||
, "characterAssetsRead"
|
||||
, "characterIndustryJobsRead"
|
||||
, "characterMarketOrdersRead"
|
||||
, "characterResearchRead"
|
||||
, "characterAccountRead"
|
||||
, "characterContractsRead"
|
||||
, "characterClonesRead"
|
||||
, "characterLoyaltyPointsRead"
|
||||
, "corporationWalletRead"
|
||||
, "corporationAssetsRead"
|
||||
, "corporationIndustryJobsRead"
|
||||
, "corporationMarketOrdersRead"
|
||||
, "corporationStructuresRead"
|
||||
, "remoteClientUI"
|
||||
, "esi-location.read_location.v1"
|
||||
, "esi-skills.read_skills.v1"
|
||||
, "esi-wallet.read_character_wallet.v1"
|
||||
, "esi-wallet.read_corporation_wallet.v1"
|
||||
, "esi-search.search_structures.v1"
|
||||
, "esi-clones.read_clones.v1"
|
||||
, "esi-universe.read_structures.v1"
|
||||
, "esi-assets.read_assets.v1"
|
||||
, "esi-planets.manage_planets.v1"
|
||||
, "esi-ui.open_window.v1"
|
||||
, "esi-ui.write_waypoint.v1"
|
||||
, "esi-markets.structure_markets.v1"
|
||||
, "esi-corporations.read_structures.v1"
|
||||
, "esi-corporations.write_structures.v1"
|
||||
, "esi-characters.read_standings.v1"
|
||||
, "esi-industry.read_character_jobs.v1"
|
||||
, "esi-markets.read_character_orders.v1"
|
||||
, "esi-contracts.read_character_contracts.v1"
|
||||
, "esi-clones.read_implants.v1"
|
||||
, "esi-corporations.track_members.v1"
|
||||
, "esi-wallet.read_corporation_wallets.v1"
|
||||
, "esi-assets.read_corporation_assets.v1"
|
||||
, "esi-corporations.read_blueprints.v1"
|
||||
, "esi-contracts.read_corporation_contracts.v1"
|
||||
, "esi-corporations.read_standings.v1"
|
||||
, "esi-corporations.read_starbases.v1"
|
||||
, "esi-industry.read_corporation_jobs.v1"
|
||||
, "esi-corporations.read_container_logs.v1"
|
||||
, "esi-industry.read_character_mining.v1"
|
||||
, "esi-industry.read_corporation_mining.v1"
|
||||
, "esi-planets.read_customs_offices.v1"
|
||||
, "esi-corporations.read_outposts.v1"
|
||||
]
|
||||
widget
|
||||
]
|
||||
where
|
||||
widget = [whamlet|<img src="https://images.contentful.com/idjq7aai9ylm/4fSjj56uD6CYwYyus4KmES/4f6385c91e6de56274d99496e6adebab/EVE_SSO_Login_Buttons_Large_Black.png?w=270&h=45">|]
|
||||
|
||||
authHttpManager = getHttpManager
|
||||
|
||||
instance YesodAuthPersist App
|
||||
|
||||
-- This instance is required to use forms. You can modify renderMessage to
|
||||
|
@ -6,7 +6,7 @@
|
||||
module Settings where
|
||||
|
||||
import ClassyPrelude.Yesod
|
||||
import Control.Exception (throw)
|
||||
import Control.Exception as Ex (throw)
|
||||
import Data.Aeson (Result (..), fromJSON, withObject, (.!=),
|
||||
(.:?))
|
||||
import Data.FileEmbed (embedFile)
|
||||
@ -108,7 +108,7 @@ configSettingsYmlBS = $(embedFile configSettingsYml)
|
||||
|
||||
-- | @config/settings.yml@, parsed to a @Value@.
|
||||
configSettingsYmlValue :: Value
|
||||
configSettingsYmlValue = either throw id $ decodeEither' configSettingsYmlBS
|
||||
configSettingsYmlValue = either Ex.throw id $ decodeEither' configSettingsYmlBS
|
||||
|
||||
-- | A version of @AppSettings@ parsed at compile time from @config/settings.yml@.
|
||||
compileTimeAppSettings :: AppSettings
|
||||
|
58
neat.cabal
58
neat.cabal
@ -65,37 +65,37 @@ library
|
||||
TupleSections
|
||||
RecordWildCards
|
||||
|
||||
build-depends: base >= 4 && < 5
|
||||
, yesod >= 1.4.1 && < 1.6
|
||||
, yesod-core >= 1.4.6 && < 1.6
|
||||
, yesod-auth >= 1.4.4 && < 1.6
|
||||
, yesod-static >= 1.4.0.3 && < 1.6
|
||||
, yesod-form >= 1.4.0 && < 1.6
|
||||
, yesod-auth-hashdb >= 1.4.0 && < 1.6
|
||||
, yesod-auth-oauth2 >= 0.1.2
|
||||
, classy-prelude >= 0.10.2
|
||||
, classy-prelude-conduit >= 0.10.2
|
||||
, classy-prelude-yesod >= 0.10.2
|
||||
, bytestring >= 0.9 && < 0.11
|
||||
, text >= 0.11 && < 2.0
|
||||
, persistent >= 2.0 && < 2.3
|
||||
, persistent-postgresql >= 2.1.1 && < 2.3
|
||||
, persistent-template >= 2.0 && < 2.3
|
||||
build-depends: base
|
||||
, yesod
|
||||
, yesod-core
|
||||
, yesod-auth
|
||||
, yesod-static
|
||||
, yesod-form
|
||||
, yesod-auth-hashdb
|
||||
, yesod-auth-oauth2
|
||||
, classy-prelude
|
||||
, classy-prelude-conduit
|
||||
, classy-prelude-yesod
|
||||
, bytestring
|
||||
, text
|
||||
, persistent
|
||||
, persistent-postgresql
|
||||
, persistent-template
|
||||
, template-haskell
|
||||
, shakespeare >= 2.0 && < 2.1
|
||||
, hjsmin >= 0.1 && < 0.2
|
||||
, monad-control >= 0.3 && < 1.1
|
||||
, wai-extra >= 3.0 && < 3.1
|
||||
, yaml >= 0.8 && < 0.9
|
||||
, http-conduit >= 2.1 && < 2.2
|
||||
, directory >= 1.1 && < 1.3
|
||||
, warp >= 3.0 && < 3.2
|
||||
, shakespeare
|
||||
, hjsmin
|
||||
, monad-control
|
||||
, wai-extra
|
||||
, yaml
|
||||
, http-conduit
|
||||
, directory
|
||||
, warp
|
||||
, data-default
|
||||
, aeson >= 0.6
|
||||
, conduit >= 1.0 && < 2.0
|
||||
, monad-logger >= 0.3 && < 0.4
|
||||
, fast-logger >= 2.2 && < 2.5
|
||||
, wai-logger >= 2.2 && < 2.3
|
||||
, aeson
|
||||
, conduit
|
||||
, monad-logger
|
||||
, fast-logger
|
||||
, wai-logger
|
||||
, file-embed
|
||||
, safe
|
||||
, unordered-containers
|
||||
|
13
stack.yaml
13
stack.yaml
@ -1,30 +1,27 @@
|
||||
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
|
||||
|
||||
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
|
||||
resolver: lts-4.0
|
||||
resolver: lts-9.14
|
||||
|
||||
# Local packages, usually specified by relative directory name
|
||||
packages:
|
||||
- location: .
|
||||
- location:
|
||||
git: https://github.com/Drezil/yesod-auth-oauth2.git
|
||||
commit: 8412cb6c263b30f62c64a3be964448c09000f07c
|
||||
- location:
|
||||
git: https://github.com/Drezil/eve-api.git
|
||||
commit: 5775b01785c684f27bb81a9d58cf2180205de3e5
|
||||
commit: efeaf8e2cc19cd7528a17dc0aa40911bf19fa316
|
||||
#- deps/yesod-auth-oauth2/
|
||||
#- deps/eve-api/
|
||||
|
||||
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
|
||||
extra-deps: []
|
||||
extra-deps:
|
||||
- yesod-auth-oauth2-0.3.0
|
||||
- load-env-0.1.1
|
||||
|
||||
# Override default flag values for local packages and extra-deps
|
||||
flags:
|
||||
neat:
|
||||
library-only: false
|
||||
dev: false
|
||||
yesod-auth-oauth2:
|
||||
network-uri: true
|
||||
|
||||
# Extra package databases containing global packages
|
||||
extra-package-dbs: []
|
||||
|
Loading…
Reference in New Issue
Block a user