This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after 'deploy:create_symlink', 'notify:humbug' | |
namespace :notify do | |
desc "Post a message to Humbug that we've deployed" | |
task :humbug do | |
# this will post to Humbug as the user defined in ~/.humbugrc | |
run_locally "echo ':beers: I just deployed to #{stage}! :beers:' | humbug-send --stream commits --subject deployments || true" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns liberated.core | |
(:require [liberator.core :refer [resource defresource]] | |
[ring.adapter.jetty :refer [run-jetty]] | |
[compojure.core :refer [defroutes ANY]])) | |
(defroutes app | |
(ANY "/" [] (resource :available-media-types ["text/html" | |
"application/json"] | |
:handle-ok (fn [_] {:foo "Hello, Internet."})))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jetty: | |
Request: {:ssl-client-cert nil, :remote-addr 0:0:0:0:0:0:0:1, :scheme :http, :query-params {}, :form-params {}, :body-params {name Test Election, date 2013-08-01}, :request-method :post, :query-string nil, :route-params {}, :content-type application/json, :uri /elections, :server-name localhost, :params {:name Test Election, :date 2013-08-01}, :headers {user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36, cookie _turbovote_session=BAh7DEkiD3Nlc3Npb25faWQGOgZFRkkiJTI2MTQ1NWQxNDEyNWRmZWQ2YzAwZjFjNjlmMjg2N2IzBjsAVEkiC2xvY2FsZQY7AEZJIgdlbgY7AFRJIgtsYXlvdXQGOwBGSSIRZmllbGRvZnR1cmJvBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMWtsNW5TcndPbnFsS2ZFOFcyeFdaU1MzK1lWU1kwQytBY0VPRDZXa053QXM9BjsARkkiHGhhdC10cmljay52aXNpdGVkX3N0ZXBzBjsARlsHOgppbnRybzoLYmFzaWNzSSIcaGF0LXRyaWNrLnNraXBwZWRfc3RlcHMGOwBGWwBJIhFpcF9hZGRyZXNzZXMGOwBGWwciDjEyNy4wLjAuMUkiDmxvY2FsaG9zdAY7AEY%3D--ceabd2996969d8d45481836099f06d623bd5223c, origin chrome-extension://cokgbflfommojgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn create-handler [] | |
(fn [request] | |
((-> | |
(assemble-routes) | |
api | |
wrap-restful-params) | |
request))) | |
(defn handler [request] | |
((create-handler) request)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns reproduce-body-params-bug.core | |
(:require [ring.middleware.format-params :refer [wrap-restful-params]] | |
[compojure.core :refer [routes POST]] | |
[compojure.handler :refer [api]])) | |
(defn handle-post [request] | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} | |
:body (str (:body-params request))}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject pallet-new "0.1.0-SNAPSHOT" | |
:description "FIXME Pallet project for pallet-new" | |
:dependencies [[org.clojure/clojure "1.4.0"] | |
[com.palletops/pallet "0.8.0-RC.1"] | |
[com.palletops/pallet-jclouds "1.5.3"] | |
;; To get started we include all jclouds compute providers. | |
;; You may wish to replace this with the specific jclouds | |
;; providers you use, to reduce dependency sizes. | |
[org.jclouds/jclouds-allblobstore "1.5.5"] | |
[org.jclouds/jclouds-allcompute "1.5.5"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12:46:38,806 ERROR [stderr] (http-/127.0.0.1:8080-1) Exception: java.io.FileNotFoundException: Could not locate ring/mock/request__init.class or ring/mock/request.clj on classpath: | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) RT.java:443 clojure.lang.RT.load | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) RT.java:411 clojure.lang.RT.load | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) core.clj:5530 clojure.core/load[fn] | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) core.clj:5529 clojure.core/load | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) RestFn.java:408 clojure.lang.RestFn.invoke | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) core.clj:5336 clojure.core/load-one | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) core.clj:5375 clojure.core/load-lib[fn] | |
12:46:38,807 ERROR [stderr] (http-/127.0.0.1:8080-1) core.clj:5374 clojur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject elections-api "0.0.1-SNAPSHOT" | |
:description "TurboVote elections API" | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[compojure "1.0.2"] | |
[ring/ring-jetty-adapter "1.1.0"] | |
[liberator "0.9.0-SNAPSHOT"] | |
[com.datomic/datomic-free "0.8.4020.26" | |
:exclusions [org.slf4j/slf4j-nop]] | |
[bouncer "0.2.3-beta1"] | |
[turbovote/clj-time "0.5.1-SNAPSHOT"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
school: &school | |
blah: true | |
thingy: whatever | |
iop: | |
<<: *school | |
harvard: awesome | |
cost: | |
- arm | |
- leg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
school: &school | |
blah: true | |
thingy: whatever | |
sites: | |
iop: | |
<<: *school | |
harvard: awesome | |
cost: | |
- arm |