changelog-builder 1.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: cd667a2329e7e659d7f2636dfd127b1dbe6c07324ef172598ff405996c0b8605
4
+ data.tar.gz: 83f72939a36976c350205ed601702660ddca22eb7bb8d4af0909b5da6033cfee
5
+ SHA512:
6
+ metadata.gz: 3813e05cf2b2d48f45a061029f2b0bc8b7ecfc8bbf198d1826359c68c81dca20ec8a15889f9a2c834118cac797e431f60f0e8176829e01672f210dc00067eaa7
7
+ data.tar.gz: 289416043aac78fd25db488940c09a2b84fec4eceeaaf0437bed48f2c88b07babe14b95fe5143be16207a468ebf2723462aa3c8fa4b4db0b69300e7f5f243691
data/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ .idea/
10
+ .DS_Store
11
+
12
+ .graph
13
+ .lorum
14
+
15
+ # rspec failure tracking
16
+ .rspec_status
17
+
18
+ .graph
19
+ .lorum
20
+
21
+ /.github
22
+
23
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.4.7
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --title "Changelogger Documentation"
2
+ --output-dir doc
3
+ lib/**/*.rb
data/CHANGELOG.md ADDED
@@ -0,0 +1,122 @@
1
+ ## [Unreleased]
2
+
3
+
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)
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at senpaiguru1488@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in changelogger.gemspec
6
+ gemspec
7
+
8
+ gem "curses"
9
+ gem "rake", "~> 13.0"
10
+ gem "rspec"
11
+ gem "rubocop", require: false
12
+ gem "yard", require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ changelog-builder (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.3)
10
+ curses (1.5.3)
11
+ diff-lcs (1.6.2)
12
+ json (2.15.2)
13
+ language_server-protocol (3.17.0.5)
14
+ lint_roller (1.1.0)
15
+ parallel (1.27.0)
16
+ parser (3.3.10.0)
17
+ ast (~> 2.4.1)
18
+ racc
19
+ prism (1.6.0)
20
+ racc (1.8.1)
21
+ rainbow (3.1.1)
22
+ rake (13.3.1)
23
+ regexp_parser (2.11.3)
24
+ rspec (3.13.2)
25
+ rspec-core (~> 3.13.0)
26
+ rspec-expectations (~> 3.13.0)
27
+ rspec-mocks (~> 3.13.0)
28
+ rspec-core (3.13.6)
29
+ rspec-support (~> 3.13.0)
30
+ rspec-expectations (3.13.5)
31
+ diff-lcs (>= 1.2.0, < 2.0)
32
+ rspec-support (~> 3.13.0)
33
+ rspec-mocks (3.13.7)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.13.0)
36
+ rspec-support (3.13.6)
37
+ rubocop (1.81.7)
38
+ json (~> 2.3)
39
+ language_server-protocol (~> 3.17.0.2)
40
+ lint_roller (~> 1.1.0)
41
+ parallel (~> 1.10)
42
+ parser (>= 3.3.0.2)
43
+ rainbow (>= 2.2.2, < 4.0)
44
+ regexp_parser (>= 2.9.3, < 3.0)
45
+ rubocop-ast (>= 1.47.1, < 2.0)
46
+ ruby-progressbar (~> 1.7)
47
+ unicode-display_width (>= 2.4.0, < 4.0)
48
+ rubocop-ast (1.47.1)
49
+ parser (>= 3.3.7.2)
50
+ prism (~> 1.4)
51
+ ruby-progressbar (1.13.0)
52
+ unicode-display_width (3.2.0)
53
+ unicode-emoji (~> 4.1)
54
+ unicode-emoji (4.1.0)
55
+ yard (0.9.37)
56
+
57
+ PLATFORMS
58
+ arm64-darwin-25
59
+ ruby
60
+
61
+ DEPENDENCIES
62
+ changelog-builder!
63
+ curses
64
+ rake (~> 13.0)
65
+ rspec
66
+ rubocop
67
+ yard
68
+
69
+ BUNDLED WITH
70
+ 2.7.2
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 unurgunite
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # Changelogger
2
+
3
+ A tiny TUI and CLI to build CHANGELOGs from your git history. Browse your git graph on the left, pick "anchor" commits
4
+ that mark minor releases, and watch a live preview on the right. Press Enter to write CHANGELOG.md. Or, use the
5
+ non-interactive CLI in scripts.
6
+
7
+ - Left pane: git log graph with htop-style scrolling
8
+ - Right pane: live preview of the generated CHANGELOG
9
+ - Anchor selection -> versions: 0.1.0, 0.2.0, ... with evenly spaced patches in between
10
+ - Colorful highlighting, persistent help bars, comfy terminal UX
11
+ - Headless CLI mode for CI/scripts
12
+
13
+ Works best on macOS/Linux terminals. Windows users: try WSL.
14
+
15
+ * [Changelogger](#changelogger)
16
+ * [Install](#install)
17
+ * [Usage](#usage)
18
+ * [Interactive (TUI)](#interactive-tui)
19
+ * [Non-interactive (CLI for scripts/CI)](#non-interactive-cli-for-scriptsci)
20
+ * [Versioning algorithm](#versioning-algorithm)
21
+ * [Output format](#output-format)
22
+ * [Library (programmatic)](#library-programmatic)
23
+ * [UI details](#ui-details)
24
+ * [Requirements](#requirements)
25
+ * [Troubleshooting](#troubleshooting)
26
+ * [Contributing](#contributing)
27
+ * [License](#license)
28
+
29
+ ## Demo
30
+
31
+ ![Demo](docs/demo.gif)
32
+
33
+ ## Install
34
+
35
+ Gemfile:
36
+
37
+ ```ruby
38
+ gem "changelogger"
39
+ ```
40
+
41
+ Then:
42
+
43
+ ```shell
44
+ bundle install
45
+ ```
46
+
47
+ Or install globally:
48
+
49
+ ```shell
50
+ gem install changelogger
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ### Interactive (TUI)
56
+
57
+ From a git repository (or pass a repo path/URL):
58
+
59
+ ```shell
60
+ # Current repo
61
+ changelogger
62
+
63
+ # Local path
64
+ changelogger ../some_dir/project
65
+
66
+ # GitHub slug
67
+ changelogger rails/rails
68
+
69
+ # Full URL
70
+ changelogger https://github.com/rails/rails.git
71
+ changelogger git@github.com:rails/rails.git
72
+ ```
73
+
74
+ - Move (left): Up/Down or j/k
75
+ - Select anchors: Space
76
+ - Toggle fit: f (show entire selected commit block if it fits)
77
+ - Refresh graph: r
78
+ - Resize split: < and >
79
+ - Switch focus: Tab / Shift-Tab
80
+ - Scroll preview (right): Up/Down, PgUp/PgDn, g/G
81
+ - Generate: Enter (writes CHANGELOG.md)
82
+ - Quit: q or ESC (exits quietly)
83
+ - z: toggle zebra striping
84
+ - The frame titles show which repo you’re working in:
85
+ - Left title: `Graph — <repo_name> [<branch>@<short_sha>*]`, where `*` indicates uncommitted changes
86
+ - Right title: `Preview — <remote slug>` (e.g., owner/repo) or repo name if no remote
87
+ - Visual separators:
88
+ - A thin dotted line appears at commit boundaries (without overwriting the graph)
89
+ - Zebra striping per commit block helps scanning; toggle with z
90
+
91
+ The `.graph` cache is regenerated automatically; use r to refresh.
92
+
93
+ ### Non-interactive (CLI for scripts/CI)
94
+
95
+ Generate a CHANGELOG without the TUI. You must provide at least 2 anchors (SHAs, tags, or branches). REPO can be a local
96
+ path, GitHub slug, or git URL.
97
+
98
+ ```shell
99
+ # Write CHANGELOG.md in current repo
100
+ changelogger --generate --anchors v1.0.0,v1.1.0
101
+
102
+ # Write to custom file
103
+ changelogger --generate --anchors abc1234,def5678 -o HISTORY.md
104
+
105
+ # Run against another repo (local path)
106
+ changelogger --generate --anchors v1.0.0,v1.2.0 ../some/project
107
+
108
+ # Run against a GitHub repo (slug or URL)
109
+ changelogger --generate --anchors v7.0.0,main rails/rails
110
+ changelogger --generate --anchors a1b2c3d,deadbeef https://github.com/user/repo.git
111
+
112
+ # Print to stdout (no file)
113
+ changelogger --generate --anchors v1.0.0,v1.1.0 --dry-run
114
+ ```
115
+
116
+ Options:
117
+
118
+ - `--generate`, `-g`: Non-interactive mode
119
+ - `--anchors x,y,z`: Anchors (2+). Each token can be a full/short SHA, tag, or branch name
120
+ - `--output PATH`, `-o PATH`: Output file (default: CHANGELOG.md)
121
+ - `--major N`: Major version (default 0)
122
+ - `--minor-start N`: Minor start index (default 1 -> 0.1.0, 0.2.0, ...)
123
+ - `--base-patch N`: Patch spacing base (default 10)
124
+ - `--dry-run`: Print to stdout
125
+
126
+ Exit codes:
127
+
128
+ - 0: Success
129
+ - 1: General error
130
+ - 2: Invalid arguments (e.g., insufficient anchors)
131
+
132
+ ## Versioning algorithm
133
+
134
+ "Semantic-ish" mapping:
135
+
136
+ - Major stays 0 by default (configurable)
137
+ - Minor increments per anchor: 0.1.0, 0.2.0, 0.3.0, ...
138
+ - In-between commits get patches spaced over 1..base (default 10):
139
+ - `patches[i] = round((i+1) * base / (k+1))` with monotonic fixups
140
+ - 1 between -> 0.1.5
141
+ - 2 between -> 0.1.3, 0.1.7
142
+ - 3 between -> 0.1.3, 0.1.5, 0.1.8
143
+
144
+ ## Output format
145
+
146
+ Each selected commit (anchors and in-between) gets:
147
+
148
+ - Section: "## [x.y.z] - YYYY-MM-DD"
149
+ - Bullet: "- <subject> (<short_sha>)"
150
+ - Commit body is included and indented
151
+ - A top "## [Unreleased]" section is always present
152
+
153
+ ## Library (programmatic)
154
+
155
+ Use the building blocks directly:
156
+
157
+ ```ruby
158
+ require "changelogger"
159
+ # or just require "changelogger"
160
+
161
+ commits = Changelogger::Git.commits
162
+ anchors = ["abc1234", "def5678"] # full or short SHAs, or resolve with `git rev-parse`
163
+
164
+ # Preview as a string:
165
+ puts Changelogger::ChangelogGenerator.render(commits, anchors, base_patch: 12)
166
+
167
+ # Or write:
168
+ Changelogger::ChangelogGenerator.generate(commits, anchors, path: "CHANGELOG.md", major: 1, minor_start: 0)
169
+ ```
170
+
171
+ Note:
172
+
173
+ - `require "changelogger"` only loads the module/version (no TUI).
174
+ - For the TUI specifically: require "changelogger/tui".
175
+
176
+ ## UI details
177
+
178
+ - Side-by-side layout with color highlighting
179
+ - Help bars at the top of each pane
180
+ - htop-like scrolling in the graph pane
181
+ - "Fit selected commit" avoids cutting blocks at the bottom (toggle with f)
182
+ - .graph is auto-regenerated; press r to refresh
183
+
184
+ ## Requirements
185
+
186
+ - Ruby 2.7+
187
+ - Git installed
188
+ - POSIX terminal (colors recommended)
189
+ - Linux/macOS tested; Windows via WSL recommended
190
+
191
+ ## Troubleshooting
192
+
193
+ - Tab doesn’t switch focus: try Shift-Tab; ensure TERM is set (e.g., xterm-256color)
194
+ - No colors: falls back to bold/standout
195
+ - Not a git repo: pass a repo path/slug/URL
196
+ - Cancel in TUI: exits quietly (no "not enough commits" message)
197
+
198
+ ## Contributing
199
+
200
+ PRs welcome. Please keep changes focused and include reproduction steps or a short clip for UI tweaks.
201
+
202
+ ## License
203
+
204
+ MIT © 2021–present unurgunite, SY573M404
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ begin
13
+ require "yard"
14
+ YARD::Rake::YardocTask.new(:yard) do |t|
15
+ t.options = File.exist?(".yardopts") ? File.read(".yardopts").split : []
16
+ end
17
+ rescue LoadError
18
+ # yard not installed
19
+ end
20
+
21
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "changelogger"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ PROJECT_NAME='changelogger'
7
+ if pwd | grep $PROJECT_NAME; then
8
+ cd "${PWD%$PROJECT_NAME*}$PROJECT_NAME"
9
+ else
10
+ echo "Change your working directory to the $PROJECT_NAME dir or its relative directories. Exiting with error code 1"
11
+ exit 1
12
+ fi
13
+
14
+ bundle install
15
+
16
+ gem build "$PROJECT_NAME".gemspec
17
+ GEM_VERSION=$(bundle info $PROJECT_NAME | head -n 1 | sed 's/.*(\(.*\))/\1/')
18
+ GEM_ARCHIVE="$PROJECT_NAME-$GEM_VERSION.gem"
19
+ gem install "$GEM_ARCHIVE"
20
+
21
+ bin/console
@@ -0,0 +1,37 @@
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 = ">= 2.7.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
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+
35
+ # For more information and examples about making a new gem, checkout our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
data/docs/demo.gif ADDED
Binary file
data/exe/changelogger ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "changelogger/cli"
5
+ exit Changelogger::CLI.start(ARGV)