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 +4 -4
- data/VERSION +1 -1
- data/etc/config.json +0 -1
- data/lib/kitchen_hooks/helpers.rb +18 -1
- data/lib/kitchen_hooks/main.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34582a932c513661eb3fe5b52c1b3ab5857ac620
|
4
|
+
data.tar.gz: 8df2638a96438cd7e369b87c67d224da09a0076d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eee7d822e8ca772e058bc9dcd5bc525763b29d33eb1ae199ccf2778c1f570c2c4174fd3ebe8b8d54671dfa99ed746faad0e154cc0a8df7bea374bb8ff6aa80a4
|
7
|
+
data.tar.gz: dae1a7868926836a84e9c4b6b0a4e5721f4cb4b12e4708b44c79bda5c9c7e59cb31279d314ee3381b70a11f2d0226fc965968a3e2581e41a4324692d09df6409
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.8.
|
1
|
+
1.8.2
|
data/etc/config.json
CHANGED
@@ -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
|
data/lib/kitchen_hooks/main.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hipchat
|