idlepattern-bullhorn 0.1.2.1 → 0.1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bullhorn-server +17 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e5c89e7de833de68c8545311336d7664ba64090
4
- data.tar.gz: be9c01f568b51b0155cb500b90b9d7f29d39f0bb
3
+ metadata.gz: b5a18073298d35edca476eb84e97b849043ab20e
4
+ data.tar.gz: 3e7f822bdca0fb618cf22594a6fd208747d898ba
5
5
  SHA512:
6
- metadata.gz: c5f7a3b0e6f4716eaeae4c9645f67199b77b7f32f769735313f8e35665c1f0e3f632034b58e06c4b0d973991321c83fd17355a9d0e238da0613784147b346460
7
- data.tar.gz: c1884531d2314e50c168cfe36fa3e8317f6ebf0205a5b8c486e587ebac56be4b86f5e9ef549416263432ce61aa62df575ddfb817db5ca8fbee61e05c97b804c7
6
+ metadata.gz: 711a5ec5669b68973a9cc584be2508872be36ae8a601a8bff4ec4ea6050be0212b2de6fd7ea77a9679e37796c03fedfe9ad169715f49821ea865f83fd8254b3c
7
+ data.tar.gz: 62b146175cd05d5c03c6244e01c0a028ebb4d23145db788f13e41e0959940ddfb8c2a238073f8cd5390f0a9bdfeceaeed084a1147ad3ae119e440c5db786d652
data/bin/bullhorn-server CHANGED
@@ -76,6 +76,23 @@ class Bullhorn < Sinatra::Application
76
76
  @publisher.publish File.join(@options['topic'], notify[:name]), notify.to_json
77
77
  end
78
78
 
79
+ post '/force/update' do
80
+ halt 500, 'Need push parameters!' unless (params[:repo] and params[:url] and params[:branch])
81
+
82
+ # generate outbound notify message
83
+ notify = {
84
+ :uuid => UUIDTools::UUID.random_create.to_s,
85
+ :name => params[:repo],
86
+ :repo => params[:url],
87
+ :branch => params[:branch],
88
+ :token => 'githubtokengoeshere'
89
+ }
90
+
91
+ # notify hipchat and all subscribers of this new github push
92
+ @hipchat[@options['hipchat_room']].send 'Bullhorn', "Notifying all subscribers of requested update #{notify[:branch]} @ #{notify[:repo]} (from #{request.ip})"
93
+ @publisher.publish File.join(@options['topic'], notify[:name]), notify.to_json
94
+ end
95
+
79
96
  get '/lifeline' do
80
97
  content_type 'application/json'
81
98
  JSON.pretty_generate @lifeline
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idlepattern-bullhorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.1
4
+ version: 0.1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omachonu Ogali
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-08-31 00:00:00.000000000 Z
12
+ date: 2014-09-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: daemons