gitlab-release-tools 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab/release/changelog/entries.rb +10 -5
- data/lib/gitlab/release/changelog/entry.rb +7 -6
- data/lib/gitlab/release/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc5b89c86cac432823c0c80465f2db7bca594f032f147acb2a44e3fc541eeca0
|
4
|
+
data.tar.gz: 486d3550693609d543427d5cbd4186c19db079289600384da6c6b57d256062f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae7ca58e5f26bfceddf60705098129908146e55f48e8be23efbe502778c1a9050bbe54d8f4bd7ee3241732d1efc05d45547c6daf9bb56813387c8c4ab01a81a
|
7
|
+
data.tar.gz: d58da60bac59b9342ee7feebc8985b778de4cf1c87bca5434a95558327ffb4284e71dea511a9b56c205d1d84f983edc19b9e13a0b3b10bab591cfbdff965d4b5
|
data/Gemfile.lock
CHANGED
@@ -13,16 +13,21 @@ module Gitlab
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def to_s
|
16
|
-
|
16
|
+
to_s_with_reference(true)
|
17
|
+
end
|
18
|
+
|
19
|
+
# @param [Boolean] with_reference
|
20
|
+
def to_s_with_reference(with_reference)
|
21
|
+
@elements.map { |element| element.to_s_with_reference(with_reference) }
|
17
22
|
.join("\n")
|
18
|
-
#.reject(&:empty?)
|
19
23
|
end
|
20
24
|
|
21
25
|
# @param [String] path
|
22
|
-
# @param [
|
23
|
-
|
26
|
+
# @param [Boolean] appending default false
|
27
|
+
# @param [Boolean] with_reference default true
|
28
|
+
def write_on_file(path, appending = false, with_reference = true)
|
24
29
|
# @type [String] changelog_string
|
25
|
-
changelog_string =
|
30
|
+
changelog_string = to_s_with_reference(with_reference)
|
26
31
|
|
27
32
|
File.open(path, appending ? "a" : "w+") do |file|
|
28
33
|
file.puts(changelog_string)
|
@@ -11,20 +11,21 @@ module Gitlab
|
|
11
11
|
@title = title
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
# @param [Boolean] with_reference
|
15
|
+
def to_s_with_reference(with_reference)
|
16
|
+
"- #{title}"
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
20
|
class MergeRequest < Entry
|
20
|
-
def
|
21
|
-
"- #{title} !#{id}"
|
21
|
+
def to_s_with_reference(with_reference)
|
22
|
+
with_reference ? "- #{title} !#{id}" : super
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
25
26
|
class Issue < Entry
|
26
|
-
def
|
27
|
-
"- #{title} ##{id}"
|
27
|
+
def to_s_with_reference(with_reference)
|
28
|
+
with_reference ? "- #{title} ##{id}" : super
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-release-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Del Fante
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab
|