Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some more tweaks to get the view where I want it

  • Loading branch information...
commit 290be3fc328a01bd35d5165f943ac67beb77c2fa 1 parent 8039c9a
@ianschreuder authored
View
2  app/controllers/payloads_controller.rb
@@ -5,7 +5,7 @@ class PayloadsController < ApplicationController
# Example JSON post
# have to change code in payload.rb
-# curl http://localhost:3000/notify/Test/test/ -H "content-type: application/json" -d "{\"pusher\":{\"name\":\"mattemge\",\"email\":\"memge@providigm.com\"},\"head_commit\":{\"message\":\"Merge branch master of github.com:GitHubAdmin/abaqis2\"},\"ref\":\"refs/heads/master\",\"commits\":[{\"message\":\"corrections to pdf text\"}]}"
+# curl http://localhost:3000/notify/Test/test/ -H "content-type: application/json" -d "{\"head_commit\":{\"committer\":{\"name\":\"Test\",\"email\":\"test@none.com\"},\"message\":\"Merge branch master of github.com:GitHubAdmin/abaqis2\"},\"ref\":\"refs/heads/master\",\"commits\":[{\"message\":\"corrections to pdf text\"}]}"
def create
acct = Account.find(:first, :conditions=>["name = ?", params[:app_name]])
View
2  app/models/payload.rb
@@ -3,6 +3,8 @@ class Payload
include ParserBranch
include ParserTag
+ attr_reader :hash
+
COMMIT = 1
BRANCH_ADD = 2
BRANCH_DEL = 3
View
5 config/initializers/hash_with_indifferent_access.rb
@@ -0,0 +1,5 @@
+class HashWithIndifferentAccess < Hash
+ def to_yaml(opts = {})
+ self.to_hash.to_yaml(opts)
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.