gem_comet 0.7.2 → 0.8.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
  SHA256:
3
- metadata.gz: 0e992b42942e26870fca6a89bcb9f315e784a55b0af467e722eb9484b8ea0a91
4
- data.tar.gz: 90402f9d8725fec32adfa11f57bb6bc9681b51d504b4023c3c34e49ef504bdd0
3
+ metadata.gz: e11e63f7c4687ba1b98858b475b9eaa471cc96bde4be53df6fac06ea5a06069c
4
+ data.tar.gz: 20bc0f22daf10dae7078160799e8c1beaa5e4bca084dcc973db68f06ea7dd7b2
5
5
  SHA512:
6
- metadata.gz: 53e9e981b9f0719393f29e2c2c97e0bbcbb603d17d00f3ba231f9a7dc060c56338df04ebb3529e344ec565eb3ee118ab7d87bce03d38133226381f0b1e35fafe
7
- data.tar.gz: 68c7a8357214f401e873dcc8f1c2a230184cddf088f51726fa485fa5ba51620772d728f38cea996aafff100dcdeb55fd740c818402c4b93e8c299e2db5295630
6
+ metadata.gz: d45c9585a76e9bef8682e2f22350d9af725728092c9c653885b9337221adf41b08b17fbf4ea677fcf19211d42a5f2698d0236b233432262c907df840d8e25180
7
+ data.tar.gz: e069789e5c5c56f8427d375c7eac37027551a3eb0a34ee15bc852d3699c8515afad061160973b1f3eecf0d389383e664ded2c0f232c55c3c37350a83ba13abe8
@@ -42,7 +42,7 @@ commands:
42
42
  - code-climate/format-coverage:
43
43
  input-type: simplecov
44
44
  prefix: $(readlink -f .)
45
- coverage-file: coverage/.resultset.json
45
+ coverage-file: coverage/coverage.json
46
46
  output: coverage/codeclimate.$CIRCLE_BUILD_NUM.json
47
47
  - persist_to_workspace:
48
48
  root: coverage
@@ -97,9 +97,6 @@ commands:
97
97
  <<: *ruby_version
98
98
  steps:
99
99
  - checkout
100
- - run:
101
- name: Install bundler v1.x for ruby 2.7
102
- command: gem install bundler:1.17.3
103
100
  - ruby-orbs/bundle-install:
104
101
  cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
105
102
  test_and_build:
@@ -6,10 +6,18 @@
6
6
  # $ gem_comet changelog
7
7
  # $ gem_comet versions
8
8
 
9
- version: 1.1
9
+ version: 1.2
10
10
 
11
11
  release:
12
12
  base_branch: master
13
13
  release_branch: release
14
14
  version_file_path: lib/gem_comet/version.rb
15
15
  changelog_file_path: CHANGELOG.md
16
+ changelog:
17
+ categories:
18
+ - Feature
19
+ - Bugfix
20
+ - Breaking Change
21
+ - Rubocop Challenger
22
+ - Dependabot
23
+ - Misc
@@ -1,5 +1,19 @@
1
1
  # Change log
2
2
 
3
+ ## v0.8.0 (Jan 11, 2021)
4
+
5
+ ### Feature
6
+
7
+ * [#223](https://github.com/ryz310/gem_comet/pull/223) Add verbose option ([@ryz310](https://github.com/ryz310))
8
+ * [#226](https://github.com/ryz310/gem_comet/pull/226) Add categories option ([@ryz310](https://github.com/ryz310))
9
+
10
+ ### Dependabot
11
+
12
+ * [#201](https://github.com/ryz310/gem_comet/pull/201) Update bundler requirement from ~> 1.16 to ~> 2.2 ([@ryz310](https://github.com/ryz310))
13
+ * [#221](https://github.com/ryz310/gem_comet/pull/221) ryz310/dependabot/bundler/rubocop-1.8.0 ([@ryz310](https://github.com/ryz310))
14
+ * [#222](https://github.com/ryz310/gem_comet/pull/222) Update simplecov requirement from = 0.17.1 to = 0.21.2 ([@ryz310](https://github.com/ryz310))
15
+ * [#227](https://github.com/ryz310/gem_comet/pull/227) ryz310/dependabot/bundler/rubocop-1.8.1 ([@ryz310](https://github.com/ryz310))
16
+
3
17
  ## v0.7.2 (Jan 04, 2021)
4
18
 
5
19
  ### Bugfix
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gem_comet (0.7.2)
5
- pr_comet (~> 0.4.0)
4
+ gem_comet (0.8.0)
5
+ pr_comet (~> 0.5.1)
6
6
  thor
7
7
  type_struct
8
8
 
@@ -21,7 +21,6 @@ GEM
21
21
  multipart-post (>= 1.2, < 3)
22
22
  ruby2_keywords
23
23
  faraday-net_http (1.0.0)
24
- json (2.5.1)
25
24
  method_source (1.0.0)
26
25
  multipart-post (2.1.1)
27
26
  octokit (4.20.0)
@@ -30,7 +29,7 @@ GEM
30
29
  parallel (1.20.1)
31
30
  parser (3.0.0.0)
32
31
  ast (~> 2.4.1)
33
- pr_comet (0.4.0)
32
+ pr_comet (0.5.1)
34
33
  octokit
35
34
  rainbow
36
35
  pry (0.13.1)
@@ -59,15 +58,15 @@ GEM
59
58
  rspec-support (3.10.1)
60
59
  rspec_junit_formatter (0.4.1)
61
60
  rspec-core (>= 2, < 4, != 2.12.0)
62
- rubocop (1.7.0)
61
+ rubocop (1.8.1)
63
62
  parallel (~> 1.10)
64
- parser (>= 2.7.1.5)
63
+ parser (>= 3.0.0.0)
65
64
  rainbow (>= 2.2.2, < 4.0)
66
65
  regexp_parser (>= 1.8, < 3.0)
67
66
  rexml
68
67
  rubocop-ast (>= 1.2.0, < 2.0)
69
68
  ruby-progressbar (~> 1.7)
70
- unicode-display_width (>= 1.4.0, < 2.0)
69
+ unicode-display_width (>= 1.4.0, < 3.0)
71
70
  rubocop-ast (1.4.0)
72
71
  parser (>= 2.7.1.5)
73
72
  rubocop-performance (1.9.2)
@@ -81,21 +80,22 @@ GEM
81
80
  sawyer (0.8.2)
82
81
  addressable (>= 2.3.5)
83
82
  faraday (> 0.8, < 2.0)
84
- simplecov (0.17.1)
83
+ simplecov (0.21.2)
85
84
  docile (~> 1.1)
86
- json (>= 1.8, < 3)
87
- simplecov-html (~> 0.10.0)
88
- simplecov-html (0.10.2)
85
+ simplecov-html (~> 0.11)
86
+ simplecov_json_formatter (~> 0.1)
87
+ simplecov-html (0.12.3)
88
+ simplecov_json_formatter (0.1.2)
89
89
  thor (1.0.1)
90
90
  type_struct (0.8.0)
91
- unicode-display_width (1.7.0)
91
+ unicode-display_width (2.0.0)
92
92
  yard (0.9.26)
93
93
 
94
94
  PLATFORMS
95
95
  ruby
96
96
 
97
97
  DEPENDENCIES
98
- bundler (~> 1.16)
98
+ bundler (~> 2.2)
99
99
  gem_comet!
100
100
  pry-byebug
101
101
  rake (~> 13.0)
@@ -104,8 +104,8 @@ DEPENDENCIES
104
104
  rubocop
105
105
  rubocop-performance
106
106
  rubocop-rspec
107
- simplecov (= 0.17.1)
107
+ simplecov (= 0.21.2)
108
108
  yard
109
109
 
110
110
  BUNDLED WITH
111
- 1.17.3
111
+ 2.2.4
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = '>= 2.7.0'
26
26
 
27
- spec.add_runtime_dependency 'pr_comet', '~> 0.4.0'
27
+ spec.add_runtime_dependency 'pr_comet', '~> 0.5.1'
28
28
  spec.add_runtime_dependency 'thor'
29
29
  spec.add_runtime_dependency 'type_struct'
30
30
 
31
- spec.add_development_dependency 'bundler', '~> 1.16'
31
+ spec.add_development_dependency 'bundler', '~> 2.2'
32
32
  spec.add_development_dependency 'pry-byebug'
33
33
  spec.add_development_dependency 'rake', '~> 13.0'
34
34
  spec.add_development_dependency 'rspec'
@@ -36,6 +36,6 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'rubocop'
37
37
  spec.add_development_dependency 'rubocop-performance'
38
38
  spec.add_development_dependency 'rubocop-rspec'
39
- spec.add_development_dependency 'simplecov', '0.17.1'
39
+ spec.add_development_dependency 'simplecov', '0.21.2'
40
40
  spec.add_development_dependency 'yard'
41
41
  end
@@ -17,6 +17,7 @@ module GemComet
17
17
  private
18
18
 
19
19
  MERGE_COMMIT_TITLE = /Merge pull request #(\d+) from (.+)/.freeze
20
+ DEFAULT_CATEGORIES = ['Feature', 'Bugfix', 'Breaking Change', 'Misc'].freeze
20
21
 
21
22
  # Returns changelogs as markdown format from current version to HEAD commit.
22
23
  #
@@ -27,10 +28,7 @@ module GemComet
27
28
 
28
29
  ## #{title} (#{versioning_date})
29
30
 
30
- ### Feature
31
- ### Bugfix
32
- ### Breaking Change
33
- ### Misc
31
+ #{changelog_categories.join("\n")}
34
32
 
35
33
  #{changelogs.reverse.join("\n")}
36
34
  MARKDOWN
@@ -43,6 +41,13 @@ module GemComet
43
41
  VersionHistory.new.versioning_date_of(version).strftime('%b %d, %Y')
44
42
  end
45
43
 
44
+ # Returns array of changelog categories reading from the config file.
45
+ #
46
+ # @return [Array<String>] Array of changelog categories as markdown format
47
+ def changelog_categories
48
+ (Config.call.changelog&.categories || DEFAULT_CATEGORIES).map { |c| "### #{c}" }
49
+ end
50
+
46
51
  # Returns array of changelogs as markdown format.
47
52
  #
48
53
  # @return [Array<String>] Array of changelogs as markdown format
@@ -20,8 +20,12 @@ module GemComet
20
20
  end
21
21
 
22
22
  desc 'release VERSION', 'Creates update PR and release PR'
23
+ option :verbose,
24
+ type: :boolean,
25
+ default: false,
26
+ desc: 'Displays executing commands.'
23
27
  def release(version)
24
- Release.call(version: version)
28
+ Release.call(version: version, verbose: options[:verbose])
25
29
  rescue StandardError => e
26
30
  puts e.message
27
31
  end
@@ -6,16 +6,23 @@ module GemComet
6
6
  using TypeStruct::Union::Ext
7
7
 
8
8
  CONFIG_FILE_PATH = '.gem_comet.yml'
9
- CURRENT_VERSION = 1.1
9
+ CURRENT_VERSION = 1.2
10
10
 
11
- V1_1 = TypeStruct.new(
11
+ Release = TypeStruct.new(
12
+ base_branch: String,
13
+ release_branch: String,
14
+ version_file_path: String,
15
+ changelog_file_path: String | nil
16
+ )
17
+
18
+ Changelog = TypeStruct.new(
19
+ categories: TypeStruct::ArrayOf.new(String)
20
+ )
21
+
22
+ V1_2 = TypeStruct.new(
12
23
  version: 1.0...2.0,
13
- release: TypeStruct.new(
14
- base_branch: String,
15
- release_branch: String,
16
- version_file_path: String,
17
- changelog_file_path: String | nil
18
- )
24
+ release: Release,
25
+ changelog: Changelog | nil
19
26
  )
20
27
 
21
28
  def initialize; end
@@ -23,7 +30,7 @@ module GemComet
23
30
  private
24
31
 
25
32
  def call
26
- V1_1.from_hash(YAML.safe_load(File.open(CONFIG_FILE_PATH)))
33
+ V1_2.from_hash(YAML.safe_load(File.open(CONFIG_FILE_PATH)))
27
34
  rescue Errno::ENOENT
28
35
  raise 'Not initialized. Please run `$ gem_comet init`.'
29
36
  rescue TypeStruct::MultiTypeError => e
@@ -3,16 +3,17 @@
3
3
  module GemComet
4
4
  # Creates pull requests for gem release and that preparation
5
5
  class Release < ServiceAbstract
6
- def initialize(version:)
6
+ def initialize(version:, verbose: false)
7
7
  verify_version_number(version)
8
8
 
9
9
  @version = version
10
10
  @config = Config.call
11
+ @verbose = verbose
11
12
  end
12
13
 
13
14
  private
14
15
 
15
- attr_reader :version, :config
16
+ attr_reader :version, :config, :verbose
16
17
 
17
18
  def call
18
19
  VerifyGitCondition.call
@@ -24,7 +25,8 @@ module GemComet
24
25
  def update_pr_args
25
26
  {
26
27
  version: version,
27
- base_branch: config.release.base_branch
28
+ base_branch: config.release.base_branch,
29
+ verbose: verbose
28
30
  }
29
31
  end
30
32
 
@@ -32,7 +34,8 @@ module GemComet
32
34
  {
33
35
  version: version,
34
36
  base_branch: config.release.base_branch,
35
- release_branch: config.release.release_branch
37
+ release_branch: config.release.release_branch,
38
+ verbose: verbose
36
39
  }
37
40
  end
38
41
 
@@ -8,9 +8,9 @@ module GemComet
8
8
 
9
9
  attr_reader :version, :pr_comet
10
10
 
11
- def initialize(version:, base_branch:, release_branch:)
11
+ def initialize(version:, base_branch:, release_branch:, verbose: false)
12
12
  @version = version
13
- @pr_comet = PrComet.new(base: release_branch, branch: base_branch)
13
+ @pr_comet = PrComet.new(base: release_branch, branch: base_branch, verbose: verbose)
14
14
  end
15
15
 
16
16
  def call
@@ -4,9 +4,9 @@ module GemComet
4
4
  class Release
5
5
  # Creates a pull request for release preparation
6
6
  class CreateUpdatePR < ServiceAbstract
7
- def initialize(version:, base_branch:)
7
+ def initialize(version:, base_branch:, verbose: false)
8
8
  @version = version
9
- @pr_comet = PrComet.new(base: base_branch, branch: "update/v#{version}")
9
+ @pr_comet = PrComet.new(base: base_branch, branch: "update/v#{version}", verbose: verbose)
10
10
  @version_editor = VersionEditor.new
11
11
  @prev_version = version_editor.current_version
12
12
  @changelog_editor = Changelog::Editor.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GemComet
4
- VERSION = '0.7.2'
4
+ VERSION = '0.8.0'
5
5
  end
@@ -13,3 +13,9 @@ release:
13
13
  release_branch: release
14
14
  version_file_path: '{Path of your version file}'
15
15
  changelog_file_path: CHANGELOG.md # optional
16
+ changelog:
17
+ categories:
18
+ - Feature
19
+ - Bugfix
20
+ - Breaking Change
21
+ - Misc
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_comet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryz310
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-04 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pr_comet
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0
19
+ version: 0.5.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0
26
+ version: 0.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.16'
61
+ version: '2.2'
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
- version: '1.16'
68
+ version: '2.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry-byebug
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.17.1
173
+ version: 0.21.2
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 0.17.1
180
+ version: 0.21.2
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: yard
183
183
  requirement: !ruby/object:Gem::Requirement