gitlab_awesome_release 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitlab-ci.yml +20 -6
- data/.rubocop.yml +12 -0
- data/CHANGELOG.md +22 -1
- data/Gemfile +7 -0
- data/README.md +0 -1
- data/gitlab-ci/config +4 -0
- data/gitlab-ci/setup.sh +4 -1
- data/gitlab_awesome_release.gemspec +6 -6
- data/lib/gitlab_awesome_release/cli.rb +3 -3
- data/lib/gitlab_awesome_release/gitlab_logging_ext.rb +1 -1
- data/lib/gitlab_awesome_release/project.rb +6 -2
- data/lib/gitlab_awesome_release/version.rb +1 -1
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b06b0641e64b18b73964532ea9201f3359715cf553b84b7fdb915caa11014933
|
4
|
+
data.tar.gz: a331a212b6766a929451480b37f94ea236daf6c5934008fd0566926ecf65a032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7959d224ef36b6b836dacbbe2eff226ff5a7849f9568b482b9b379a978168ae80a2c1d00e04ca8d43e570d88efddabdeba1a7c647d1b40929b9db4b43e29a71f
|
7
|
+
data.tar.gz: 46420eb0ce8ad46621a0e213dc2fbfee6663d304e3b78fa10d966bd2031823d32237836df9e28959a4cecf617a0d2ad417a54e7a9463da35edc1a3a731499435
|
data/.gitlab-ci.yml
CHANGED
@@ -21,35 +21,49 @@ stages:
|
|
21
21
|
|
22
22
|
ruby2.1:rspec:
|
23
23
|
<<: *job_definition
|
24
|
-
image:
|
24
|
+
image: ruby:2.1
|
25
25
|
|
26
26
|
script:
|
27
27
|
- ./gitlab-ci/rspec.sh
|
28
28
|
|
29
29
|
ruby2.2:rspec:
|
30
30
|
<<: *job_definition
|
31
|
-
image:
|
31
|
+
image: ruby:2.2
|
32
32
|
|
33
33
|
script:
|
34
34
|
- ./gitlab-ci/rspec.sh
|
35
35
|
|
36
36
|
ruby2.3:rspec:
|
37
37
|
<<: *job_definition
|
38
|
-
image:
|
38
|
+
image: ruby:2.3
|
39
39
|
|
40
40
|
script:
|
41
41
|
- ./gitlab-ci/rspec.sh
|
42
42
|
|
43
43
|
ruby2.4:rspec:
|
44
44
|
<<: *job_definition
|
45
|
-
image:
|
45
|
+
image: ruby:2.4
|
46
|
+
|
47
|
+
script:
|
48
|
+
- ./gitlab-ci/rspec.sh
|
49
|
+
|
50
|
+
ruby2.5:rspec:
|
51
|
+
<<: *job_definition
|
52
|
+
image: ruby:2.5
|
53
|
+
|
54
|
+
script:
|
55
|
+
- ./gitlab-ci/rspec.sh
|
56
|
+
|
57
|
+
ruby2.6:rspec:
|
58
|
+
<<: *job_definition
|
59
|
+
image: ruby:2.6
|
46
60
|
|
47
61
|
script:
|
48
62
|
- ./gitlab-ci/rspec.sh
|
49
63
|
|
50
64
|
rubocop:
|
51
65
|
<<: *job_definition
|
52
|
-
image:
|
66
|
+
image: ruby
|
53
67
|
|
54
68
|
script:
|
55
69
|
- bundle exec rubocop
|
@@ -58,7 +72,7 @@ rubocop:
|
|
58
72
|
|
59
73
|
pages:
|
60
74
|
<<: *job_definition
|
61
|
-
image:
|
75
|
+
image: ruby
|
62
76
|
|
63
77
|
stage: deploy
|
64
78
|
|
data/.rubocop.yml
CHANGED
@@ -4,5 +4,17 @@ inherit_gem:
|
|
4
4
|
AllCops:
|
5
5
|
TargetRubyVersion: 2.4
|
6
6
|
|
7
|
+
Gemspec/RequiredRubyVersion:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Layout/AlignHash:
|
11
|
+
EnforcedColonStyle: table
|
12
|
+
|
13
|
+
Layout/ClosingHeredocIndentation:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Layout/IndentHeredoc:
|
17
|
+
Enabled: false
|
18
|
+
|
7
19
|
Metrics/ClassLength:
|
8
20
|
Max: 130
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,27 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v1.0.
|
2
|
+
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v1.0.2...HEAD)
|
3
3
|
|
4
|
+
## v1.0.2
|
5
|
+
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v1.0.1...v1.0.2)
|
6
|
+
|
7
|
+
### Bugfix
|
8
|
+
* Fixed SEGV on ruby 2.6.0 [!39](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/39) *@sue445*
|
9
|
+
|
10
|
+
### Others
|
11
|
+
* CI against ruby 2.5 [!33](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/33) *@sue445*
|
12
|
+
* Setup Dependency Scanning [!34](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/34) *@sue445*
|
13
|
+
* Fixed failed CI on ruby < 2.3 [!35](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/35) *@sue445*
|
14
|
+
* Fix CI [!36](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/36) *@sue445*
|
15
|
+
* Update rubocop [!37](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/37) *@sue445*
|
16
|
+
* Relax bundler dependency [!38](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/38) *@sue445*
|
17
|
+
|
18
|
+
## v1.0.1
|
19
|
+
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v1.0.0...v1.0.1)
|
20
|
+
|
21
|
+
* Deploy yard to GitLab Pages [!29](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/29) *@sue445*
|
22
|
+
* Tweak .gitlab-ci.yml [!30](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/30) *@sue445*
|
23
|
+
* Support new merge commit format for GitLab v10.0.0+ [!31](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/31) *@sue445*
|
24
|
+
* Refactor .gitlab-ci.yml [!32](https://gitlab.com/sue445/gitlab_awesome_release/merge_requests/32) *@sue445*
|
4
25
|
|
5
26
|
## v1.0.0
|
6
27
|
[full changelog](https://gitlab.com/sue445/gitlab_awesome_release/compare/v0.1.2...v1.0.0)
|
data/Gemfile
CHANGED
@@ -2,3 +2,10 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in gitlab_awesome_release.gemspec
|
4
4
|
gemspec
|
5
|
+
|
6
|
+
if Gem::Version.create(RUBY_VERSION) < Gem::Version.create("2.3.0")
|
7
|
+
group :development do
|
8
|
+
# NOTE: gitlab 4.6.0+ requires ruby 2.3.0+
|
9
|
+
gem "gitlab", "< 4.6.0"
|
10
|
+
end
|
11
|
+
end
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
Generate changelog from tags and MergeRequests on [GitLab](https://about.gitlab.com/)
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/gitlab_awesome_release.svg)](https://badge.fury.io/rb/gitlab_awesome_release)
|
5
|
-
[![Dependency Status](https://gemnasium.com/7f058801015a4fbcf603d936c08836a4.svg)](https://gemnasium.com/19478d2f2735ee355f4c6cd1b8d2c12e)
|
6
5
|
|
7
6
|
This is inspired by [GitHub Changelog Generator](https://github.com/skywinder/github-changelog-generator)
|
8
7
|
|
data/gitlab-ci/config
ADDED
data/gitlab-ci/setup.sh
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require "gitlab_awesome_release/version"
|
5
4
|
|
@@ -14,9 +13,9 @@ Gem::Specification.new do |spec|
|
|
14
13
|
spec.homepage = "https://gitlab.com/sue445/gitlab_awesome_release"
|
15
14
|
spec.license = "MIT"
|
16
15
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject {
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(test|spec|features)/}) }
|
18
17
|
spec.bindir = "exe"
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) {
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) {|f| File.basename(f) }
|
20
19
|
spec.require_paths = ["lib"]
|
21
20
|
|
22
21
|
spec.required_ruby_version = ">= 2.1.0"
|
@@ -25,12 +24,13 @@ Gem::Specification.new do |spec|
|
|
25
24
|
spec.add_dependency "gitlab", ">= 4.0.0"
|
26
25
|
spec.add_dependency "thor"
|
27
26
|
|
28
|
-
spec.add_development_dependency "bundler", "
|
29
|
-
spec.add_development_dependency "onkcop", "0.
|
27
|
+
spec.add_development_dependency "bundler", ">= 1.10"
|
28
|
+
spec.add_development_dependency "onkcop", "0.53.0.2"
|
30
29
|
spec.add_development_dependency "pry-byebug"
|
31
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
32
31
|
spec.add_development_dependency "rspec"
|
33
32
|
spec.add_development_dependency "rspec-temp_dir"
|
33
|
+
spec.add_development_dependency "rubocop", "0.57.2" # rubocop v0.58.0+ requires ruby 2.2+
|
34
34
|
spec.add_development_dependency "simplecov"
|
35
35
|
spec.add_development_dependency "webmock"
|
36
36
|
spec.add_development_dependency "yard"
|
@@ -7,7 +7,7 @@ module GitlabAwesomeRelease
|
|
7
7
|
|
8
8
|
class CLI < Thor
|
9
9
|
DEFAULT_VERSION_FORMAT = "^v?[\\d.]+".freeze
|
10
|
-
GITLAB_ENV_FILES = %w
|
10
|
+
GITLAB_ENV_FILES = %w[.env.gitlab ~/.env.gitlab].freeze
|
11
11
|
|
12
12
|
GITLAB_API_DESCRIPTION = "GitLab API endpoint (e.g. http://example.com/api/v4)".freeze
|
13
13
|
GITLAB_API_PRIVATE_TOKEN_DESCRIPTION = "Your private token".freeze
|
@@ -118,7 +118,7 @@ module GitlabAwesomeRelease
|
|
118
118
|
|
119
119
|
@logger = Logger.new(STDOUT)
|
120
120
|
@logger.level = logger_level(option_or_env(:log_level))
|
121
|
-
@logger.formatter = proc {
|
121
|
+
@logger.formatter = proc {|severity, datetime, _progname, message|
|
122
122
|
"[#{datetime}] #{severity} #{message}\n"
|
123
123
|
}
|
124
124
|
|
@@ -128,7 +128,7 @@ module GitlabAwesomeRelease
|
|
128
128
|
private_token: gitlab_api_private_token,
|
129
129
|
project_name: gitlab_project_name,
|
130
130
|
allow_tag_format: /#{allow_tag_format}/,
|
131
|
-
logger: @logger
|
131
|
+
logger: @logger,
|
132
132
|
)
|
133
133
|
end
|
134
134
|
|
@@ -10,7 +10,7 @@ module GitlabAwesomeRelease
|
|
10
10
|
end_time = Time.now
|
11
11
|
|
12
12
|
# NOTE: options[:headers] contains PRIVATE-TOKEN
|
13
|
-
_options = options.reject {
|
13
|
+
_options = options.reject {|k, _v| k == :headers }
|
14
14
|
self.class.logger.debug "(#{end_time - start_time} sec) #{method.upcase} #{path} #{_options}"
|
15
15
|
end
|
16
16
|
end
|
@@ -35,12 +35,16 @@ module GitlabAwesomeRelease
|
|
35
35
|
with_paging do |params|
|
36
36
|
Gitlab.repo_tags(@project_name, params)
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
|
+
# rubocop:disable Style/SymbolProc avoid SEGV on ruby 2.6.0
|
40
|
+
# https://bugs.ruby-lang.org/issues/15489
|
41
|
+
@all_tag_names = repo_tags.sort_by {|tag| tag.commit.authored_date }.map {|tag| tag.name }
|
42
|
+
# rubocop:enable Style/SymbolProc
|
39
43
|
end
|
40
44
|
|
41
45
|
# @return [Array<String>]
|
42
46
|
def release_tag_names
|
43
|
-
all_tag_names.find_all {
|
47
|
+
all_tag_names.find_all {|tag| tag =~ @allow_tag_format }
|
44
48
|
end
|
45
49
|
|
46
50
|
# @param oldest_tag [String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_awesome_release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '1.10'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.53.0.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.53.0.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pry-byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.57.2
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.57.2
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: simplecov
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +214,7 @@ files:
|
|
200
214
|
- bin/console
|
201
215
|
- bin/setup
|
202
216
|
- exe/gitlab_awesome_release
|
217
|
+
- gitlab-ci/config
|
203
218
|
- gitlab-ci/rspec.sh
|
204
219
|
- gitlab-ci/setup.sh
|
205
220
|
- gitlab_awesome_release.gemspec
|
@@ -230,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
245
|
version: '0'
|
231
246
|
requirements: []
|
232
247
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.6
|
248
|
+
rubygems_version: 2.7.6
|
234
249
|
signing_key:
|
235
250
|
specification_version: 4
|
236
251
|
summary: Generate changelog from tags and MergeRequests on GitLab
|