kitchen_hooks 1.8.1 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 183beaa6ba3fb0951ca835a350b48982a6062a12
4
- data.tar.gz: daea6fb0b7d3dd300a003d0c0d379eceb5ba6c4f
3
+ metadata.gz: 34582a932c513661eb3fe5b52c1b3ab5857ac620
4
+ data.tar.gz: 8df2638a96438cd7e369b87c67d224da09a0076d
5
5
  SHA512:
6
- metadata.gz: a8529690e2ab1db4546774889e0d271e2bbcf9a3ff6b7464363677e2f04704f47cd84fa4f0b8729dfb2f4b2aa7ab8a1e86fedfbaceb55f1b066c592f106f8096
7
- data.tar.gz: c5f61a7f4a0664c39e463944262804f0fa35258fb668008efef0060ef4a065b1d36fba097e889b2a043fe346fb175af5431c1b33cb7ebc0972177ca3fd76a6e5
6
+ metadata.gz: eee7d822e8ca772e058bc9dcd5bc525763b29d33eb1ae199ccf2778c1f570c2c4174fd3ebe8b8d54671dfa99ed746faad0e154cc0a8df7bea374bb8ff6aa80a4
7
+ data.tar.gz: dae1a7868926836a84e9c4b6b0a4e5721f4cb4b12e4708b44c79bda5c9c7e59cb31279d314ee3381b70a11f2d0226fc965968a3e2581e41a4324692d09df6409
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.1
1
+ 1.8.2
data/etc/config.json CHANGED
@@ -2,7 +2,6 @@
2
2
  "sync_interval": null,
3
3
  "hipchat": null,
4
4
  "knives": {
5
- "dc1": "~/.chef/dc1.rb",
6
5
  "bng11": "~/.chef/bng11.rb"
7
6
  }
8
7
  }
@@ -70,6 +70,9 @@ module KitchenHooks
70
70
  verify_constraints constraints, environment, k
71
71
  end
72
72
 
73
+ head_tags = `git tag --points-at HEAD`.lines.map(&:strip)
74
+ version_tag = head_tags.select { |t| t =~ /^v\d+/ }.shift
75
+ event['version'] = version_tag
73
76
  end
74
77
  end
75
78
 
@@ -403,9 +406,11 @@ module KitchenHooks
403
406
  when 'cookbook upload'
404
407
  %Q| <i>#{author(event)}</i> released <a href="#{gitlab_tag_url(event)}">#{tag_name(event)}</a> of <a href="#{gitlab_url(event)}">#{cookbook_name(event)}</a> |
405
408
  when 'constraint application'
406
- %Q| <i>#{author(event)}</i> constrained <a href="#{gitlab_tag_url(event)}">#{tag_name(event)}</a> with <a href="#{gitlab_url(event)}">#{cookbook_name(event)}</a> |
409
+ %Q| <i>#{author(event)}</i> constrained <a href="#{gitlab_tag_url(event)}">#{tag_name(event)}</a> with <a href="#{gitlab_url(event)}">#{cookbook_name(event)}</a> #{version_link event} |
407
410
  when 'release'
408
411
  %Q| Kitchen Hooks <b>v#{event}</b> released! |
412
+ else
413
+ raise entry.inspect
409
414
  end.strip
410
415
  end
411
416
 
@@ -519,5 +524,17 @@ module KitchenHooks
519
524
  tagged_commit_to_cookbook?(event) &&
520
525
  commit_to_realm?(event)
521
526
  end
527
+
528
+ def self.version_url event
529
+ return unless v = event['version']
530
+ url = git_daemon_style_url(event).sub(/^git/, 'http').sub(/\.git$/, '')
531
+ "#{url}/commits/#{v}"
532
+ end
533
+
534
+ def self.version_link event
535
+ return unless v = event['version']
536
+ url = version_url(event)
537
+ 'at <a href="%s">%s</a>' % [ url, v ]
538
+ end
522
539
  end
523
540
  end
@@ -61,6 +61,8 @@ module KitchenHooks
61
61
  desc: 'Location of temporary directory',
62
62
  default: '/tmp'
63
63
  def server
64
+ Thread.abort_on_exception = true
65
+
64
66
  App.config! JSON::parse(File.read(options.config))
65
67
  App.backlog!
66
68
  App.db! options.database
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hipchat