knife-changelog 0.0.4 → 0.0.5

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: 8dead3f297d3603760f675f9aacfc4c22b8219e2
4
- data.tar.gz: 9f6a5cd6f86f608282e5887f123324d08a92998a
3
+ metadata.gz: 401d0e3f69454195f5582dbdc6084318c3a0c6a6
4
+ data.tar.gz: 6f02bcdf5f2e417af90a6beb11ff66ac67201603
5
5
  SHA512:
6
- metadata.gz: af10ab7b0dd0bcc98405b3557af2651761178d3dfb1e327881461485c8844d07bdc8fe6bc7e40366c30b5f20b0e2617f0fcf12b1f129acf476166856a968317c
7
- data.tar.gz: 1b3e851a1f305ae918dd7d85cfa619df6ea3b52a7bac562e9c8045934e388aaa47bc6a6a34bfb417a9f2b3f9c814ebe8b59034588534e8ce7abdf7fd1b049c9c
6
+ metadata.gz: 5b53bf27f344bc3d7f59812be5e4b7ba7936636b917d8c040bd09f69e3382256e8b2709077030c27cd87e2b0394ed41884c485b77f117f3bb79544767c9ed67f
7
+ data.tar.gz: 63388ad26b299b9d913ee76a87b8f2096838ce02d549252a20d40aafbbb881441cf030ba0058011e716d88795d25478cbd1e0fbf5afdcce15318c6f40783fd2a
@@ -144,9 +144,14 @@ class Chef
144
144
  end
145
145
 
146
146
  def linkify(url, changelog)
147
- changelog.map { |line|
148
- line.gsub(/^([a-f0-9]+) /, '[%s/commit/\1](\1) ' % [url])
149
- }
147
+ changelog.map do |line|
148
+ case url
149
+ when /gitlab[\w\.-]+\/([\w-]+\/[\w-]+)(\.git)?/
150
+ line.gsub(/^([a-f0-9]+) /, '%s@\1 ' % [$1])
151
+ else
152
+ line.gsub(/^([a-f0-9]+) /, '[\1](%s/commit/\1) ' % [url])
153
+ end
154
+ end
150
155
  end
151
156
 
152
157
  def https_url(location)
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module Changelog
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-changelog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregoire Seux