changelog-builder 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd667a2329e7e659d7f2636dfd127b1dbe6c07324ef172598ff405996c0b8605
4
- data.tar.gz: 83f72939a36976c350205ed601702660ddca22eb7bb8d4af0909b5da6033cfee
3
+ metadata.gz: f069b465f4ece00502ba5aed97b2eb8adff502d8cfd5ed52d2100817b965ff50
4
+ data.tar.gz: 90e939ad6da47e4f07a99bb529612c9c3c8198c6adf3e18b33509f4009d55865
5
5
  SHA512:
6
- metadata.gz: 3813e05cf2b2d48f45a061029f2b0bc8b7ecfc8bbf198d1826359c68c81dca20ec8a15889f9a2c834118cac797e431f60f0e8176829e01672f210dc00067eaa7
7
- data.tar.gz: 289416043aac78fd25db488940c09a2b84fec4eceeaaf0437bed48f2c88b07babe14b95fe5143be16207a468ebf2723462aa3c8fa4b4db0b69300e7f5f243691
6
+ metadata.gz: 6c7d5a6cc2e0270bc6ad79fdf1504505af3844e1cd3ac62f78c1ad46838f76c1d2bcc9d8b8ae6dd7e7a40a59f3fb3e9fc733c2fa86240fbc98a8a213949d12a1
7
+ data.tar.gz: c317b563e09a5ed26309e89b54df415d0b0dac61d3337540b8e65762ce7f22eff259d059ea183482731780f1613e6cfd18b0fc8032338c9e30f4bc66f3554023
@@ -0,0 +1,66 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ tags:
7
+ - "v*"
8
+ pull_request:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ ruby: [3.0, 3.1, 3.2, 3.3, 3.4]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Ruby ${{ matrix.ruby }}
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ bundler-cache: true
26
+
27
+ - name: RuboCop (self‑check)
28
+ run: |
29
+ bundle exec rubocop
30
+
31
+ - name: RSpec
32
+ run: bundle exec rspec
33
+
34
+ release:
35
+ # Run only after all matrix jobs succeed
36
+ needs: test
37
+ if: startsWith(github.ref, 'refs/tags/v')
38
+ runs-on: ubuntu-latest
39
+
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - name: Set up Ruby
43
+ uses: ruby/setup-ruby@v1
44
+ with:
45
+ ruby-version: '3.3'
46
+ bundler-cache: true
47
+
48
+ - name: Build gem
49
+ run: |
50
+ gem build changelog-builder.gemspec
51
+ if [ ! -f changelog-builder-*.gem ]; then
52
+ echo "Gem build failed!"
53
+ exit 1
54
+ fi
55
+
56
+ - name: Create GitHub Release
57
+ uses: softprops/action-gh-release@v2
58
+ with:
59
+ files: changelog-builder-*.gem
60
+ env:
61
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62
+
63
+ - name: Push gem to RubyGems.org
64
+ env:
65
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
66
+ run: gem push changelog-builder-*.gem
data/.gitignore CHANGED
@@ -10,14 +10,8 @@
10
10
  .DS_Store
11
11
 
12
12
  .graph
13
- .lorum
14
13
 
15
14
  # rspec failure tracking
16
15
  .rspec_status
17
16
 
18
- .graph
19
- .lorum
20
-
21
- /.github
22
-
23
17
  *.gem
data/.rubocop.yml CHANGED
@@ -1,13 +1,8 @@
1
- AllCops:
2
- TargetRubyVersion: 2.7
3
-
4
- Style/StringLiterals:
5
- Enabled: true
6
- EnforcedStyle: double_quotes
1
+ inherit_from: .rubocop_todo.yml
7
2
 
8
- Style/StringLiteralsInInterpolation:
9
- Enabled: true
10
- EnforcedStyle: double_quotes
3
+ AllCops:
4
+ NewCops: enable
5
+ TargetRubyVersion: 3.4
11
6
 
12
7
  Layout/LineLength:
13
8
  Max: 120
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,89 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-11-05 23:12:47 UTC using RuboCop version 1.81.7.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Severity.
11
+ Gemspec/RequiredRubyVersion:
12
+ Exclude:
13
+ - 'changelog-builder.gemspec'
14
+
15
+ # Offense count: 2
16
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
17
+ Lint/DuplicateBranch:
18
+ Exclude:
19
+ - 'lib/changelogger/cli.rb'
20
+ - 'lib/changelogger/repo_info.rb'
21
+
22
+ # Offense count: 2
23
+ # Configuration parameters: AllowComments, AllowNil.
24
+ Lint/SuppressedException:
25
+ Exclude:
26
+ - 'lib/changelogger/branches_window.rb'
27
+ - 'lib/changelogger/tui.rb'
28
+
29
+ # Offense count: 16
30
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
31
+ Metrics/AbcSize:
32
+ Max: 73
33
+
34
+ # Offense count: 3
35
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
36
+ # AllowedMethods: refine
37
+ Metrics/BlockLength:
38
+ Max: 95
39
+
40
+ # Offense count: 1
41
+ # Configuration parameters: CountBlocks, CountModifierForms.
42
+ Metrics/BlockNesting:
43
+ Max: 4
44
+
45
+ # Offense count: 2
46
+ # Configuration parameters: CountComments, CountAsOne.
47
+ Metrics/ClassLength:
48
+ Max: 465
49
+
50
+ # Offense count: 6
51
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
52
+ Metrics/CyclomaticComplexity:
53
+ Max: 30
54
+
55
+ # Offense count: 22
56
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
57
+ Metrics/MethodLength:
58
+ Max: 97
59
+
60
+ # Offense count: 3
61
+ # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
62
+ Metrics/ParameterLists:
63
+ Max: 6
64
+
65
+ # Offense count: 5
66
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
67
+ Metrics/PerceivedComplexity:
68
+ Max: 29
69
+
70
+ # Offense count: 4
71
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
72
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
73
+ Naming/MethodParameterName:
74
+ Exclude:
75
+ - 'lib/changelogger/branches_window.rb'
76
+ - 'lib/changelogger/cli.rb'
77
+ - 'lib/changelogger/repo_info.rb'
78
+
79
+ # Offense count: 1
80
+ # This cop supports unsafe autocorrection (--autocorrect-all).
81
+ Style/CombinableLoops:
82
+ Exclude:
83
+ - 'lib/changelogger/versioner.rb'
84
+
85
+ # Offense count: 4
86
+ # This cop supports safe autocorrection (--autocorrect).
87
+ Style/ComparableClamp:
88
+ Exclude:
89
+ - 'lib/changelogger/branches_window.rb'
data/CHANGELOG.md CHANGED
@@ -1,122 +1,5 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.0] - 2021-08-09
3
4
 
4
- ## [0.1.0] - 2021-11-10
5
-
6
- - Ignore text files (03fbcb2)
7
-
8
- ## [0.1.1] - 2021-11-10
9
-
10
- - Fix docs for header file (84cefbd)
11
-
12
- ## [0.1.3] - 2021-12-03
13
-
14
- - Reformat files (035f010)
15
-
16
- ## [0.1.4] - 2021-11-09
17
-
18
- - Sample impl of branches window (4fc92e7)
19
-
20
- ## [0.1.6] - 2021-12-03
21
-
22
- - Update .gitignore (41d4f74)
23
-
24
- ## [0.1.7] - 2021-11-09
25
-
26
- - Fix error method in main file (081846c)
27
-
28
- ## [0.1.9] - 2021-11-10
29
-
30
- - Add branches window (5a9f959)
31
-
32
- ## [0.2.0] - 2021-11-10
33
-
34
- - Ignore text files (e12d643)
35
-
36
- ## [0.2.3] - 2021-11-10
37
-
38
- - Fix docs for header file (1c2e935)
39
-
40
- ## [0.2.5] - 2021-12-03
41
-
42
- - Reformat files (03c36b3)
43
-
44
- ## [0.2.8] - 2021-12-03
45
-
46
- - Merge branch 'branch_window' (14a2979)
47
-
48
- ## [0.3.0] - 2021-12-04
49
-
50
- - Edit some code (46457f6)
51
-
52
- ## [0.3.5] - 2021-12-04
53
-
54
- - Update Gemfile.lock (74fbaa6)
55
-
56
- ## [0.4.0] - 2022-01-16
57
-
58
- - Declare 'curses' dependency (f4ddd8e)
59
-
60
- ## [0.5.0] - 2022-01-16
61
-
62
- - Add .ruby-version for development (e91a407)
63
-
64
- ## [0.6.0] - 2022-01-16
65
-
66
- - Add GitHub Actions to .gitignore (4bda768)
67
-
68
- ## [0.7.0] - 2022-01-16
69
-
70
- - Make scrolling work (26ff299)
71
-
72
- ## [0.7.5] - 2022-01-16
73
-
74
- - Add documentation (79684ff)
75
-
76
- ## [0.8.0] - 2022-02-06
77
-
78
- - Adding a skeleton for splitting commits into blocks (6444b24)
79
-
80
- ## [0.8.5] - 2022-03-01
81
-
82
- - :nodocs: (719235a)
83
-
84
- ## [0.9.0] - 2022-08-17
85
-
86
- - Upgraded ruby version (32d3e1a)
87
-
88
- ## [0.10.0] - 2022-08-17
89
-
90
- - Updated `bin/setup` script for development (9f295d9)
91
-
92
- ## [0.11.0] - 2022-08-17
93
-
94
- - Updated `Gemfile.lock` (e0ea39f)
95
-
96
- ## [0.12.0] - 2022-08-17
97
-
98
- - Updated authors list (39f0a12)
99
-
100
- ## [0.13.0] - 2022-08-17
101
-
102
- - Removed `*.gem` binaries from repo (4ecfae0)
103
-
104
- ## [0.13.5] - 2022-08-17
105
-
106
- - Updated `Gemfile.lock` (61cbb94)
107
-
108
- ## [0.14.0] - 2022-01-16
109
-
110
- - Make scrolling work (581af60)
111
-
112
- ## [0.15.0] - 2022-01-16
113
-
114
- - Add documentation (859ca97)
115
-
116
- ## [0.16.0] - 2022-02-06
117
-
118
- - Adding a skeleton for splitting commits into blocks (a81f464)
119
-
120
- ## [0.17.0] - 2022-03-01
121
-
122
- - :nodocs: (71e3e4c)
5
+ - Initial release
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
- # Specify your gem's dependencies in changelogger.gemspec
5
+ # Specify your gem's dependencies in changelog-builder.gemspec
6
6
  gemspec
7
7
 
8
- gem "curses"
9
- gem "rake", "~> 13.0"
10
- gem "rspec"
11
- gem "rubocop", require: false
12
- gem "yard", require: false
8
+ gem 'curses'
9
+ gem 'rake', '~> 13.0'
10
+ gem 'rspec'
11
+ gem 'rubocop', require: false
12
+ gem 'yard', require: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- changelog-builder (1.0.0)
4
+ changelog-builder (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -67,4 +67,4 @@ DEPENDENCIES
67
67
  yard
68
68
 
69
69
  BUNDLED WITH
70
- 2.7.2
70
+ 2.5.23
data/README.md CHANGED
@@ -12,7 +12,12 @@ non-interactive CLI in scripts.
12
12
 
13
13
  Works best on macOS/Linux terminals. Windows users: try WSL.
14
14
 
15
+ ![Repobeats](https://repobeats.axiom.co/api/embed/024f2221c22d7ca681093ed150c33e2e5453c237.svg "Repobeats analytics image")
16
+ [![CI](https://github.com/unurgunite/changelogger/actions/workflows/ci.yml/badge.svg)](https://github.com/unurgunite/changelogger/actions)
17
+ [![Gem Version](https://badge.fury.io/rb/changelogger.svg)](https://rubygems.org/gems/changelogger)
18
+
15
19
  * [Changelogger](#changelogger)
20
+ * [Demo](#demo)
16
21
  * [Install](#install)
17
22
  * [Usage](#usage)
18
23
  * [Interactive (TUI)](#interactive-tui)
@@ -22,6 +27,7 @@ Works best on macOS/Linux terminals. Windows users: try WSL.
22
27
  * [Library (programmatic)](#library-programmatic)
23
28
  * [UI details](#ui-details)
24
29
  * [Requirements](#requirements)
30
+ * [Documentation](#documentation)
25
31
  * [Troubleshooting](#troubleshooting)
26
32
  * [Contributing](#contributing)
27
33
  * [License](#license)
@@ -35,7 +41,7 @@ Works best on macOS/Linux terminals. Windows users: try WSL.
35
41
  Gemfile:
36
42
 
37
43
  ```ruby
38
- gem "changelogger"
44
+ gem "changelog-builder"
39
45
  ```
40
46
 
41
47
  Then:
@@ -47,7 +53,7 @@ bundle install
47
53
  Or install globally:
48
54
 
49
55
  ```shell
50
- gem install changelogger
56
+ gem install changelog-builder
51
57
  ```
52
58
 
53
59
  ## Usage
@@ -183,11 +189,16 @@ Note:
183
189
 
184
190
  ## Requirements
185
191
 
186
- - Ruby 2.7+
192
+ - Ruby 3.0+
187
193
  - Git installed
188
194
  - POSIX terminal (colors recommended)
189
195
  - Linux/macOS tested; Windows via WSL recommended
190
196
 
197
+ ## Documentation
198
+
199
+ Code is covered with YARD notation. All docs could be accessed from separate
200
+ page https://unurgunite.github.io/changelog-builder_docs/
201
+
191
202
  ## Troubleshooting
192
203
 
193
204
  - Tab doesn’t switch focus: try Shift-Tab; ensure TERM is set (e.g., xterm-256color)
data/Rakefile CHANGED
@@ -1,18 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- require "rubocop/rake_task"
8
+ require 'rubocop/rake_task'
9
9
 
10
10
  RuboCop::RakeTask.new
11
11
 
12
12
  begin
13
- require "yard"
13
+ require 'yard'
14
14
  YARD::Rake::YardocTask.new(:yard) do |t|
15
- t.options = File.exist?(".yardopts") ? File.read(".yardopts").split : []
15
+ t.options = File.exist?('.yardopts') ? File.read('.yardopts').split : []
16
16
  end
17
17
  rescue LoadError
18
18
  # yard not installed
data/bin/console CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "bundler/setup"
5
- require "changelogger"
4
+ require 'bundler/setup'
5
+ require 'changelogger'
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -11,5 +11,5 @@ require "changelogger"
11
11
  # require "pry"
12
12
  # Pry.start
13
13
 
14
- require "irb"
14
+ require 'irb'
15
15
  IRB.start(__FILE__)
data/bin/release ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ RED='\033[0;31m'
5
+ GREEN='\033[0;32m'
6
+ YELLOW='\033[1;33m'
7
+ NC='\033[0m'
8
+
9
+ function log_error() {
10
+ echo -e "${RED}ERROR: $1${NC}" >&2
11
+ }
12
+
13
+ function log_warn() {
14
+ echo -e "${YELLOW}WARNING: $1${NC}" >&2
15
+ }
16
+
17
+ function log_success() {
18
+ echo -e "${GREEN}$1${NC}"
19
+ }
20
+
21
+ function check_clean_working_directory() {
22
+ if ! git diff-index --quiet HEAD --; then
23
+ log_error "Working directory is not clean. Please commit or stash your changes."
24
+ exit 1
25
+ fi
26
+ }
27
+
28
+ function check_main_branch() {
29
+ current_branch=$(git rev-parse --abbrev-ref HEAD)
30
+ if [[ "$current_branch" != "main" && "$current_branch" != "master" ]]; then
31
+ log_error "Must be on 'main' or 'master' branch to release. Current branch: $current_branch"
32
+ exit 1
33
+ fi
34
+ }
35
+
36
+ function check_version_tag_exists() {
37
+ VERSION=$(ruby -e "require './lib/changelogger/version'; puts Changelogger::VERSION")
38
+
39
+ if git rev-parse "v$VERSION" >/dev/null 2>&1; then
40
+ log_error "Git tag v$VERSION already exists. Please update the version in version.rb first."
41
+ exit 1
42
+ fi
43
+
44
+ echo "Preparing to release version $VERSION"
45
+ }
46
+
47
+ function confirm_release() {
48
+ echo ""
49
+ log_warn "This will:"
50
+ echo " • Build gem version $VERSION"
51
+ echo " • Create git tag v$VERSION"
52
+ echo " • Push tag to origin"
53
+ echo " • Publish to RubyGems"
54
+ echo ""
55
+
56
+ read -p "Are you sure you want to proceed? (y/N): " -n 1 -r
57
+ echo
58
+ if [[ ! $REPLY =~ ^[Yy]$ ]]; then
59
+ log_warn "Release cancelled."
60
+ exit 1
61
+ fi
62
+ }
63
+
64
+ function build_gem() {
65
+ log_success "Building gem..."
66
+ gem build changelog-builder.gemspec
67
+ }
68
+
69
+ function create_and_push_tag() {
70
+ log_success "Creating and pushing git tag..."
71
+ git tag "v$VERSION" -m "Release v$VERSION"
72
+ git push origin "v$VERSION"
73
+ }
74
+
75
+ function publish_to_rubygems() {
76
+ log_success "Publishing to RubyGems..."
77
+ gem push "changelog-builder-$VERSION.gem"
78
+ }
79
+
80
+ function main() {
81
+ log_success "Starting release process..."
82
+
83
+ check_clean_working_directory
84
+ check_main_branch
85
+ check_version_tag_exists
86
+ confirm_release
87
+
88
+ # Release steps
89
+ build_gem
90
+ create_and_push_tag
91
+ publish_to_rubygems
92
+
93
+ log_success "✅ Release v$VERSION completed successfully!"
94
+ echo ""
95
+ echo "Next steps:"
96
+ echo " • Create a GitHub release: https://github.com/$(git remote get-url origin | sed -E 's/.*github.com[:\/]([^\/]+\/[^.]+).*/\1/')/releases/new?tag=v$VERSION"
97
+ echo " • Update CHANGELOG.md for the next release"
98
+ }
99
+
100
+ main "$@"
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/changelogger/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'changelog-builder'
7
+ spec.version = Changelogger::VERSION
8
+ spec.authors = %w[unurgunite SY573M404]
9
+ spec.email = ['senpaiguru1488@gmail.com', 'admin@trolltom.xyz']
10
+
11
+ spec.summary = 'Gem to generate CHANGELOG.md'
12
+ spec.description = 'A pretty simple gem to easily create changelogs according to your git commit history.'
13
+ spec.homepage = 'https://github.com/unurgunite/changelogger'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 3.0.0'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = 'https://github.com/unurgunite/changelogger'
21
+ spec.metadata['changelog_uri'] = 'https://github.com/unurgunite/changelogger/CHANGELOG.md'
22
+ spec.metadata['rubygems_mfa_required'] = 'true'
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
27
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
28
+ end
29
+ spec.bindir = 'exe'
30
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ['lib']
32
+
33
+ # Uncomment to register a new dependency of your gem
34
+ # spec.add_dependency "example-gem", "~> 1.0"
35
+
36
+ # For more information and examples about making a new gem, checkout our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
data/exe/changelogger CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "changelogger/cli"
4
+ require 'changelogger/cli'
5
5
  exit Changelogger::CLI.start(ARGV)