Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

AgileBench service - v1 (with static IP)

  • Loading branch information...
commit d242362d069461a4c92f6532f0bbc3616bfc70c4 1 parent 8529ab2
@DariuszMichalski DariuszMichalski authored
Showing with 29 additions and 0 deletions.
  1. +29 −0 services/agile_bench.rb
View
29 services/agile_bench.rb
@@ -0,0 +1,29 @@
+class Service::AgileBench < Service
+ string :token, :project_id
+
+ def receive_push
+ token, project_id =
+ data['token'].to_s.strip, data['project_id'].to_s.strip
+
+ raise_config_error "Invalid Token" if !token.present?
+ raise_config_error "Invalid Project ID" if !project_id.present?
+
+ response = {:token => token,
+ :project_id => project_id}
+
+ if payload["commits"]
+ response.merge!({ :commit => {
+ :message => payload['commits'].last["message"]
+ },
+ :github_user => {
+ :username => payload['commits'].last["committer"]["username"],
+ :email => payload['commits'].last["committer"]["email"]
+ }
+ })
+ end
+
+ http_post "http://93.181.168.171:9393/",
+ {:data => response.to_json}
+ end
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.