bake-changes 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 604d97c8757fba0b0608600c55729985014777c3a5923955fa59f1fc984f4ab5
4
+ data.tar.gz: 92af2f31a4b431db955bd1b23762485d90d52b1c544bf61996f2ecd89653cc0d
5
+ SHA512:
6
+ metadata.gz: 735e13009436cf325099c7501a1f7cc0f959e3d7ceecc41ed6acb74a2fab5128207077747a266dc63aae2838774991398424469f7f45bd0b04d0b7d1727c9cc4
7
+ data.tar.gz: aa35d9806acd5104618c4217f3e2c6a920d7f4d78a191057474d72f4e17f22357518168ce564f63b0577f4a7fe6544f547b5e32df3b94abaee795beefcdc49bb
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ �b�( I�y�����p�������W�+��ܟb���/�O�C�'�|�Z��z���A�Z+��砤�x�xk����k�3�W�D�if2��d4+�G81G���eK��d����`[Ƹ��+�QO��L��Xv%q��>��.�/����;S�̸_L����� v���Й
2
+ ��N�#�y茔R� D�CR\�$��&YF��?b-[���}^�&����E�؉�j�Bpm?y��n����(��'�q�}J�����A�܌�{!6 y�1�0-��+��7��ș��:n����u��lJ�{�0@i^glϜ�Q_�Ζ=$�`�пpGmҶ���?��S�!j SGV&bp�=D���ŗu�$���\�}}N��[Y�
data/bake/changes.rb ADDED
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ # Update the 'Unreleased' section of the changes document with the given version number, if it exists.
7
+ #
8
+ # @parameter version [String] The version number to release.
9
+ def release(version)
10
+ self.update_document do |document|
11
+ unless version.start_with?('v')
12
+ version = "v#{version}"
13
+ end
14
+
15
+ if node = document.find_header('Unreleased')
16
+ # Create a new text node with the version number:
17
+ child = Markly::Node.new(:text)
18
+ child.string_content = version
19
+
20
+ # Delete all current children, and replace it with the version number:
21
+ node.extract_children
22
+ node.append_child(child)
23
+ end
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def changes_path(root = context.root)
30
+ File.join(root, 'changes.md')
31
+ end
32
+
33
+ def update_document(path = self.changes_path)
34
+ require 'markly'
35
+
36
+ if File.exist?(path)
37
+ document = Markly.parse(File.read(path))
38
+
39
+ yield document
40
+
41
+ File.write(path, document.to_markdown)
42
+ end
43
+ end
data/changes.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changes
2
+
3
+ ## 0.1.0
4
+
5
+ ## v0.0.0
6
+
7
+ - Foo
8
+ - Bar
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024, by Samuel Williams.
5
+
6
+ module Bake
7
+ module Changes
8
+ VERSION = "0.1.0"
9
+ end
10
+ end
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright, 2024, by Samuel Williams.
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,35 @@
1
+ # Bake::Changes
2
+
3
+ A tool for managing a `changes.md` document.
4
+
5
+ [![Development Status](https://github.com/ioquatix/bake-changes/workflows/Test/badge.svg)](https://github.com/ioquatix/bake-changes/actions?workflow=Test)
6
+
7
+ ## Usage
8
+
9
+ ### Combining with `Bake::Gem`
10
+
11
+ ``` ruby
12
+ # bake.rb
13
+
14
+ def after_gem_release_version_increment(version)
15
+ context['changes:update'].call(version)
16
+ end
17
+ ```
18
+
19
+ ## Contributing
20
+
21
+ We welcome contributions to this project.
22
+
23
+ 1. Fork it.
24
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
25
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
26
+ 4. Push to the branch (`git push origin my-new-feature`).
27
+ 5. Create new Pull Request.
28
+
29
+ ### Developer Certificate of Origin
30
+
31
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
32
+
33
+ ### Community Guidelines
34
+
35
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bake-changes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Samuel Williams
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
14
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
15
+ CZImiZPyLGQBGRYCY28xEjAQBgoJ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4IBgQB5sxkE
31
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
32
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
33
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
34
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
35
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
36
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
37
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
+ -----END CERTIFICATE-----
40
+ date: 2024-08-22 00:00:00.000000000 Z
41
+ dependencies:
42
+ - !ruby/object:Gem::Dependency
43
+ name: bake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '0.21'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '0.21'
56
+ - !ruby/object:Gem::Dependency
57
+ name: markly
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.8'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.8'
70
+ description:
71
+ email:
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - bake/changes.rb
77
+ - changes.md
78
+ - lib/bake/changes/version.rb
79
+ - license.md
80
+ - readme.md
81
+ homepage: https://github.com/ioquatix/bake-changes
82
+ licenses:
83
+ - MIT
84
+ metadata:
85
+ documentation_uri: https://ioquatix.github.io/bake-changes/
86
+ funding_uri: https://github.com/sponsors/ioquatix/
87
+ source_code_uri: https://github.com/ioquatix/bake-changes.git
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '3.1'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubygems_version: 3.5.11
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Changes document management.
107
+ test_files: []
metadata.gz.sig ADDED
Binary file