asciidoctor-jenkins-extensions 0.4.0 → 0.5.0

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: ee1c1c33177b20cfad6e9dee7ca15929dcfa2d8a
4
- data.tar.gz: 5e88024460fc5ecb4e62197ea751b64e6a0c72b4
3
+ metadata.gz: d8dc38dc630efba5b5aed928936228d72ceb5282
4
+ data.tar.gz: 2bb8b2865872426a6a4dd51afa8a5d18e5d97a07
5
5
  SHA512:
6
- metadata.gz: 667f68027379155a97b278addaf22adf68192f6881bbe7d443de6c48a282e8c15e59766e95c0a6e58d85bc95c64e90fb1cecb878cc2fdd5fe75144911f7df5c5
7
- data.tar.gz: f6f612f16c54321f846ff3ef62c166a740c4740477d6d509383a2cc862f93c725e1b84954d994920c807ea6c41cb1070f84789946d35c5b65fb848d2a2461577
6
+ metadata.gz: 7bdecd22510f01eeba120801510269fc333f666513fd17b342d85b6f3d88aed626dd5828a0ae6b5c9addac86d0bb20ed659da9d2f0a755bdfc2241fa0d89b3a0
7
+ data.tar.gz: 7a95c49fcf681b559481f3fa4f080fe54030192a454f8e47d3ea10c19b79a7200bc009c9789dbfa35a4e163a56681b4267c01d34834a6934b23c8c9f67f6da49
@@ -0,0 +1,23 @@
1
+ require 'asciidoctor'
2
+ require 'asciidoctor/extensions'
3
+
4
+ #
5
+ # Usage:
6
+ # jep:201[Jenkins Configuration as Code]
7
+ #
8
+ Asciidoctor::Extensions.register do
9
+ inline_macro do
10
+ named :jep
11
+ name_positional_attributes 'label'
12
+
13
+ process do |parent, target, attrs|
14
+ if attrs['label']
15
+ label = %(JEP-#{target}: #{attrs['label']})
16
+ else
17
+ label = %(JEP-#{target})
18
+ end
19
+ target = %(https://github.com/jenkinsci/jep/blob/master/jep/#{target}/README.adoc)
20
+ (create_anchor parent, label, type: :link, target: target).render
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ require 'asciidoctor'
2
+ require 'asciidoctor/extensions'
3
+
4
+ #
5
+ # Usage:
6
+ # jira:JENKINS-12345[Issue description]
7
+ #
8
+ Asciidoctor::Extensions.register do
9
+ inline_macro do
10
+ named :jira
11
+ name_positional_attributes 'label'
12
+
13
+ process do |parent, target, attrs|
14
+ if target.include? "-"
15
+ issueId = target
16
+ else
17
+ issueId = %(JENKINS-#{target})
18
+ end
19
+
20
+ if attrs['label']
21
+ label = %(#{issueId}: #{attrs['label']})
22
+ else
23
+ label = issueId
24
+ end
25
+
26
+ target = %(https://issues.jenkins-ci.org/browse/#{target})
27
+ (create_anchor parent, label, type: :link, target: target).render
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,36 @@
1
+ require 'asciidoctor'
2
+ require 'asciidoctor/extensions'
3
+
4
+ #
5
+ # Usage:
6
+ # security:12345[Issue description, date]
7
+ #
8
+ Asciidoctor::Extensions.register do
9
+ inline_macro do
10
+ named :security
11
+ name_positional_attributes 'label', 'date'
12
+
13
+ process do |parent, target, attrs|
14
+ if target.include? "-"
15
+ issueId = target
16
+ else
17
+ issueId = %(SECURITY-#{target})
18
+ end
19
+
20
+ if attrs['label']
21
+ label = %(#{issueId}: #{attrs['label']})
22
+ else
23
+ label = issueId
24
+ end
25
+
26
+ if attrs['date']
27
+ target = %(https://jenkins.io/security/advisory/#{attrs['date']}/##{issueId})
28
+ else
29
+ # TODO(oleg_nenashev): Change to a security issue redirect service if it gets created
30
+ target = %(https://jenkins.io/security/advisories/)
31
+ end
32
+
33
+ (create_anchor parent, label, type: :link, target: target).render
34
+ end
35
+ end
36
+ end
@@ -1,7 +1,7 @@
1
1
  module Asciidoctor
2
2
  module Jenkins
3
3
  module Extensions
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-jenkins-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - R. Tyler Croy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -162,8 +162,11 @@ files:
162
162
  - asciidoctor-jenkins-extensions.gemspec
163
163
  - lib/asciidoctor/jenkins/extensions.rb
164
164
  - lib/asciidoctor/jenkins/extensions/javadoc-link.rb
165
+ - lib/asciidoctor/jenkins/extensions/jep-link.rb
166
+ - lib/asciidoctor/jenkins/extensions/jira-link.rb
165
167
  - lib/asciidoctor/jenkins/extensions/pipeline-block.rb
166
168
  - lib/asciidoctor/jenkins/extensions/plugin-link.rb
169
+ - lib/asciidoctor/jenkins/extensions/security-link.rb
167
170
  - lib/asciidoctor/jenkins/extensions/version.rb
168
171
  homepage: https://github.com/jenkins-infra/asciidoctor-jenkins-extensions
169
172
  licenses: []
@@ -184,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
187
  version: '0'
185
188
  requirements: []
186
189
  rubyforge_project:
187
- rubygems_version: 2.5.1
190
+ rubygems_version: 2.6.14
188
191
  signing_key:
189
192
  specification_version: 4
190
193
  summary: a collection of Asciidoctor extensions which enable more advanced formatting