Update dependencies + minor refactoring

* update all dependency libraries to latest
* use ring.util.http-response instead of ring.util.response everywhere
This commit is contained in:
Teemu Patja 2017-08-17 11:42:08 +03:00
parent 2bb7790768
commit cc36b5bb02
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
3 changed files with 38 additions and 39 deletions

View File

@ -1,53 +1,54 @@
(defproject commiteth "0.1.0-SNAPSHOT"
:description "Ethereum bounty bot for Github"
:url "https://commiteth.com"
:dependencies [[metosin/compojure-api "1.1.10"
:dependencies [[metosin/compojure-api "1.1.11"
:exclusions [joda-time]]
[re-frame "0.9.2"]
[cljs-ajax "0.5.9"]
[re-frame "0.10.1"]
[cljs-ajax "0.6.0"]
[secretary "1.2.3"]
[reagent-utils "0.2.1"]
[reagent "0.6.1"]
[org.clojure/clojurescript "1.9.518"]
[reagent "0.7.0"]
[org.clojure/clojurescript "1.9.908"]
[org.clojure/clojure "1.8.0"]
[selmer "1.10.7"]
[markdown-clj "0.9.98"]
[selmer "1.11.0"]
[markdown-clj "0.9.99"]
[ring-middleware-format "0.7.2"]
[metosin/ring-http-response "0.8.2"]
[ring/ring-core "1.6.2"]
[ring/ring-json "0.4.0"]
[ring/ring-defaults "0.3.1"]
[ring/ring-codec "1.0.1"]
[metosin/ring-http-response "0.9.0"]
[bouncer "1.0.1"
:exclusions [joda-time]]
[org.clojure/tools.logging "0.3.1"]
[compojure "1.5.2"]
[org.clojure/tools.logging "0.4.0"]
[compojure "1.6.0"]
[http-kit "2.2.0"]
[ring/ring-json "0.4.0"]
[ring/ring-defaults "0.2.3"]
[ring/ring-codec "1.0.1"]
[mount "0.1.11"]
[cprop "0.1.10"]
[cprop "0.1.11"]
[org.clojure/tools.cli "0.3.5"]
[luminus-nrepl "0.1.4"]
[buddy/buddy-auth "1.4.1"]
[luminus-migrations "0.3.0"]
[conman "0.6.3"]
[org.postgresql/postgresql "42.0.0"]
[buddy/buddy-auth "2.0.0"]
[luminus-migrations "0.4.0"]
[conman "0.6.7"]
[org.postgresql/postgresql "42.1.4"]
[luminus-immutant "0.2.3"]
[clj.qrgen "0.4.0"]
[digest "1.4.5"]
[tentacles "0.5.1"]
[re-frisk "0.4.4"]
[re-frisk "0.4.5"]
[bk/ring-gzip "0.2.1"]
[crypto-random "1.2.0"]
[crypto-equality "1.0.0"]
[cheshire "5.7.0"]
[cheshire "5.8.0"]
[mpg "1.3.0"]
[pandect "0.6.1"]
[cljsjs/moment "2.17.1-0"]
[cljsjs/moment "2.17.1-1"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.1"]
[jarohen/chime "0.2.0"]
[com.andrewmcveigh/cljs-time "0.4.0"]
[akiroz.re-frame/storage "0.1.1"]
[cljsjs/chartjs "2.5.0-0"]]
[com.cemerick/piggieback "0.2.2"]
[jarohen/chime "0.2.2"]
[com.andrewmcveigh/cljs-time "0.5.1"]
[akiroz.re-frame/storage "0.1.2"]
[cljsjs/chartjs "2.6.0-0"]]
:min-lein-version "2.0.0"
:source-paths ["src/clj" "src/cljc"]
@ -107,14 +108,14 @@
:dev {:dependencies [[prone "1.1.4"]
[ring/ring-mock "0.3.0"]
[ring/ring-devel "1.5.1"]
[pjstadig/humane-test-output "0.8.1"]
[ring/ring-mock "0.3.1"]
[ring/ring-devel "1.6.2"]
[pjstadig/humane-test-output "0.8.2"]
[doo "0.1.7"]
[binaryage/devtools "0.9.2"]
[figwheel-sidecar "0.5.10"]
[binaryage/devtools "0.9.4"]
[figwheel-sidecar "0.5.13"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.1"]
[com.cemerick/piggieback "0.2.2"]
[sablono "0.8.0"]]
:plugins [[com.jakemccrary/lein-test-refresh "0.14.0"]
[lein-doo "0.1.7"]

View File

@ -2,8 +2,7 @@
(:require [commiteth.layout :as layout]
[commiteth.github.core :as github]
[compojure.core :refer [defroutes GET]]
[ring.util.response :refer [redirect]]
[ring.util.http-response :refer [ok header]]
[ring.util.http-response :refer [ok header found]]
[clojure.tools.logging :as log]
[clojure.java.io :as io]
[commiteth.config :refer [env]]))
@ -27,5 +26,5 @@
(GET "/" {{user :identity} :session}
(home-page user))
(GET "/logout" {session :session}
(assoc (redirect (str (env :server-address) "/"))
(assoc (found (str (env :server-address) "/"))
:session nil)))

View File

@ -5,8 +5,7 @@
[commiteth.github.core :as github]
[commiteth.db.users :as users]
[commiteth.config :refer [env]]
[ring.util.http-response :refer [content-type ok]]
[ring.util.response :as response]
[ring.util.http-response :refer [content-type ok found]]
[commiteth.layout :refer [render]]
[cheshire.core :refer [generate-string]]
[clojure.tools.logging :as log]
@ -41,10 +40,10 @@
(log/debug "github sign-in callback, response body:" body)
(if (:error body)
;; Why does Mist browser sends two redirects at the same time? The latter results in 401 error.
(response/redirect (str (env :server-address) "/"))
(found (str (env :server-address) "/"))
(let [admin-token? (str/includes? scope "repo")
token-key (if admin-token? :admin-token :token)
user (assoc (get-or-create-user access-token)
token-key access-token)]
(assoc (response/redirect (str (env :server-address) "/"))
(assoc (found (str (env :server-address) "/"))
:session {:identity user}))))))