discharger 0.2.11 → 0.2.12

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: 23bf801a204e17e5f37876fba770bc9610814b629ee570924c04414547bc801b
4
- data.tar.gz: 594b4fceeb396a77ada63a549eee831d72ea6b1c942ff1a1ac813cea877e6c56
3
+ metadata.gz: 0556c953dac93a704d652f69824bd24da384f42c204487340512beafde360f95
4
+ data.tar.gz: f3224ed2f8bc399bc7a9e33014334843058a4e44540fc8a14e34fa47091611d5
5
5
  SHA512:
6
- metadata.gz: ec6dadb8198acd18144256694bcfdd0cd7c58275e6ad8f2ed6d9bc374633db99e6bf50278fb137a7675af74759e9ecc885dc8450852e2561655b0d5ba6e2cf75
7
- data.tar.gz: fcf463c7d4e9721b4a94a470a6ee0b75673888cf0f0c9e87fa998f208e0a3a1a88d8338de4add5ae1205f1a643e0ae49b59f814bf28854c5cd78bb5a09b96b0e
6
+ metadata.gz: 33ace7f51a07a0c126ba03285cde6695bdb5b38a84b796ca1588a16695dac532f9222340ca683ed5b2b7ae5e61d1abc3704f444db15ee2ba73a60f6e2e95f6a4
7
+ data.tar.gz: f0c3821be4631d3a804a71f68df53a56b7788f7d56598361d540027b7118f79466ba8e82a082ddac1bd2c124c8e4002f37e5f5cb3aa8da62ffbe7a4da97ee842
data/README.md CHANGED
@@ -1,26 +1,80 @@
1
1
  # Discharger
2
- Code supporting tasks that discharge code for deployment.
3
2
 
4
- ## Usage
3
+ A Ruby gem that provides Rake tasks for managing code deployment workflows with automated versioning, changelog management, and Slack notifications.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem "discharger"
11
+ ```
12
+
13
+ And then execute:
14
+ ```bash
15
+ $ bundle install
16
+ ```
17
+
18
+ Then run the install generator:
19
+ ```bash
20
+ $ rails generate discharger:install
21
+ ```
5
22
 
6
- Add `require "discharger/task"` to your Rakefile.
23
+ Or install it yourself as:
24
+ ```bash
25
+ $ gem install discharger
26
+ ```
7
27
 
8
- Then build the discharger task
28
+ ## Usage
29
+
30
+ Add `require "discharger/task"` to your Rakefile, then configure the discharger task:
9
31
 
10
32
  ```ruby
11
33
  require "discharger/task"
12
34
 
13
35
  Discharger::Task.create do |task|
36
+ # Version management
14
37
  task.version_file = "config/application.rb"
15
- task.release_message_channel = "#some-slack-channel"
16
38
  task.version_constant = "MyApp::VERSION"
17
- task.app_name = "My App name"
39
+
40
+ # Slack integration
41
+ task.release_message_channel = "#some-slack-channel"
42
+ task.app_name = "My App Name"
43
+
44
+ # Git integration
18
45
  task.commit_identifier = -> { `git rev-parse HEAD`.strip }
19
46
  task.pull_request_url = "https://github.com/SOFware/some-app"
47
+
48
+ # Changelog management (optional)
49
+ task.fragment_directory = "changelog.d" # Directory for changelog fragments
20
50
  end
21
51
  ```
22
52
 
23
- It will make Rake tasks available to push code to branches and notify Slack channels.
53
+ ### Changelog Fragments
54
+
55
+ Discharger supports changelog fragment management through the `fragment_directory` setting. When set, Discharger will look for changelog fragments in the specified directory and automatically combine them into the main changelog during releases.
56
+
57
+ ```ruby
58
+ Discharger::Task.create do |task|
59
+ # ... other configuration ...
60
+ task.fragment_directory = "changelog.d" # Default: nil (disabled)
61
+ end
62
+ ```
63
+
64
+ With fragments enabled, you can create individual changelog files in the `changelog.d/` directory:
65
+
66
+ ```
67
+ changelog.d/
68
+ ├── 123-fix-login-bug.md
69
+ ├── 124-add-user-profile.md
70
+ └── 125-update-dependencies.md
71
+ ```
72
+
73
+ Each fragment file should contain the changelog entry for a specific change or feature.
74
+
75
+ ## Available Tasks
76
+
77
+ The gem creates several Rake tasks for managing your deployment workflow:
24
78
 
25
79
  ```bash
26
80
  $ rake -T release
@@ -32,27 +86,11 @@ rake release:slack[text,channel,emoji] # Send a message to Slack
32
86
  rake release:stage # ---------- STEP 2 ----------
33
87
  ```
34
88
 
35
- ## Installation
36
- Add this line to your application's Gemfile:
89
+ ### Workflow Steps
37
90
 
38
- ```ruby
39
- gem "discharger"
40
- ```
41
-
42
- And then execute:
43
- ```bash
44
- $ bundle
45
- ```
46
-
47
- Then run the install generator:
48
- ```bash
49
- $ rails generate discharger:install
50
- ```
51
-
52
- Or install it yourself as:
53
- ```bash
54
- $ gem install discharger
55
- ```
91
+ 1. **Prepare** (`rake release:prepare`): Create a new branch to prepare the release, update the changelog, and bump the version
92
+ 2. **Stage** (`rake release:stage`): Update the staging branch and create a PR to production
93
+ 3. **Release** (`rake release`): Release the current version to production by tagging and pushing to the production branch
56
94
 
57
95
  ## Contributing
58
96
 
@@ -71,4 +109,5 @@ Releases are automated via GitHub Actions:
71
109
  Bug reports and pull requests are welcome on GitHub.
72
110
 
73
111
  ## License
112
+
74
113
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -16,6 +16,7 @@ module Discharger
16
16
  reissue.updated_paths = task.updated_paths
17
17
  reissue.commit = task.commit
18
18
  reissue.commit_finalize = task.commit_finalize
19
+ reissue.fragment_directory = task.fragment_directory
19
20
  end
20
21
  task.define
21
22
  task
@@ -36,6 +37,7 @@ module Discharger
36
37
  attr_accessor :app_name
37
38
  attr_accessor :commit_identifier
38
39
  attr_accessor :pull_request_url
40
+ attr_accessor :fragment_directory
39
41
 
40
42
  attr_reader :last_message_ts
41
43
 
@@ -1,3 +1,3 @@
1
1
  module Discharger
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discharger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.6.9
164
+ rubygems_version: 3.6.7
165
165
  specification_version: 4
166
166
  summary: Tasks for discharging an application for deployment.
167
167
  test_files: []