Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added support for environ to manage github auth locally, updated clj …

…version
  • Loading branch information...
commit cf6ae422535101eff07977353476ea40ba2f2405 1 parent 61e609d
@poetroid-bot poetroid-bot authored committed
Showing with 9 additions and 3 deletions.
  1. +3 −2 project.clj
  2. +6 −1 src/tentacles/core.clj
View
5 project.clj
@@ -3,8 +3,9 @@
:url "https://github.com/Raynes/tentacles"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
- :dependencies [[org.clojure/clojure "1.4.0"]
+ :dependencies [[org.clojure/clojure "1.5.1"]
[clj-http "0.4.0"]
[cheshire "4.0.0"]
[com.cemerick/url "0.0.6"]
- [org.clojure/data.codec "0.1.0"]])
+ [org.clojure/data.codec "0.1.0"]
+ [environ "0.4.0"]])
View
7 src/tentacles/core.clj
@@ -133,7 +133,12 @@
req (make-request method end-point positional query)]
(http/request req))))
-(defn rate-limit
+(defn environ-auth
+ "Lookup :gh-username and :gh-password in environ (~/.lein/profiles.clj or .lein-env) and return a string auth.
+ Usage: (users/me {:auth (environ-auth)})"
+ (str (:gh-username env ) ":" (:gh-password env)))
@cbilson
cbilson added a note

Forgot parameter vector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+(defn rate-limit
([] (api-call :get "rate_limit"))
([opts] (api-call :get "rate_limit" nil opts)))
Please sign in to comment.
Something went wrong with that request. Please try again.