way_of_working-versioning-semver 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: a356c33dde1bc66edbe8c0a996095175cc53ad7777a19acd4b014e979b106aed
4
+ data.tar.gz: 661609e4881d13f50ea3279249a82f8b4b57f2453c5b85f770f0d63d2e47bd70
5
+ SHA512:
6
+ metadata.gz: a180ad4fc37ad53cce42ab21140b184f2bff2313525aa3e76fb81da08dbdfcdda4e9fb8d4b58da3fbcf0c9ed569d477ec90ba532d89bfb826e59785ef80e17fb
7
+ data.tar.gz: 42fd1e20ad06801d636219251e1890d1aeced6b36b93c3a2b583c35f111aa8651236efebca7c915bdfa265f9831fa26ae4dc47df961551d8b2df8abc1c6af822
data/.alexrc ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "profanitySureness": 1
3
+ }
data/.mega-linter.yml ADDED
@@ -0,0 +1,145 @@
1
+ ---
2
+ # Configuration file for MegaLinter
3
+ # See all available variables at https://megalinter.io/configuration/
4
+ # and in linters documentation
5
+
6
+ APPLY_FIXES: none # all, none, or list of linter keys
7
+ ENABLE_LINTERS: # All other linters will be disabled by default
8
+ ### Languages
9
+ - BASH_EXEC # in Super-Linter
10
+ - BASH_SHELLCHECK # in Super-Linter
11
+ - BASH_SHFMT # in Super-Linter
12
+ - C_CLANG_FORMAT
13
+ - C_CPPLINT
14
+ # - CLOJURE_CLJ_KONDO # in Super-Linter
15
+ # - CLOJURE_CLJSTYLE
16
+ - COFFEE_COFFEELINT # in Super-Linter
17
+ - CPP_CLANG_FORMAT
18
+ - CPP_CPPLINT # in Super-Linter
19
+ - CSHARP_CSHARPIER
20
+ - CSHARP_DOTNET_FORMAT # in Super-Linter
21
+ - CSHARP_ROSLYNATOR
22
+ - DART_DARTANALYZER # in Super-Linter
23
+ - GO_GOLANGCI_LINT # in Super-Linter
24
+ - GO_REVIVE
25
+ # - GROOVY_NPM_GROOVY_LINT # in Super-Linter
26
+ - JAVA_CHECKSTYLE # in Super-Linter
27
+ - JAVA_PMD
28
+ - JAVASCRIPT_ES # in Super-Linter
29
+ # - JAVASCRIPT_PRETTIER
30
+ - JAVASCRIPT_STANDARD # in Super-Linter
31
+ - JSX_ESLINT
32
+ - KOTLIN_DETEKT
33
+ - KOTLIN_KTLINT # in Super-Linter
34
+ # - LUA_LUACHECK # in Super-Linter
35
+ # - LUA_SELENE
36
+ # - LUA_STYLUA
37
+ - MAKEFILE_CHECKMAKE
38
+ # - PERL_PERLCRITIC # in Super-Linter
39
+ # - PHP_BUILTIN
40
+ # - PHP_PHPCS # in Super-Linter
41
+ # - PHP_PHPCSFIXER
42
+ # - PHP_PHPLINT # in Super-Linter
43
+ # - PHP_PHPSTAN # in Super-Linter
44
+ # - PHP_PSALM # in Super-Linter
45
+ # - POWERSHELL_POWERSHELL
46
+ # - POWERSHELL_POWERSHELL_FORMATTER
47
+ - PYTHON_BANDIT
48
+ - PYTHON_BLACK # in Super-Linter
49
+ - PYTHON_FLAKE8 # in Super-Linter
50
+ - PYTHON_ISORT # in Super-Linter
51
+ - PYTHON_MYPY
52
+ - PYTHON_PYLINT # in Super-Linter
53
+ - PYTHON_PYRIGHT
54
+ - PYTHON_RUFF
55
+ - R_LINTR # in Super-Linter
56
+ # - RAKU_RAKU # in Super-Linter
57
+ # - RUBY_RUBOCOP # in Super-Linter
58
+ - RUST_CLIPPY # in Super-Linter
59
+ # - SALESFORCE_LIGHTNING_FLOW_SCANNER
60
+ # - SALESFORCE_SFDX_SCANNER_APEX
61
+ # - SALESFORCE_SFDX_SCANNER_AURA
62
+ # - SALESFORCE_SFDX_SCANNER_LWC
63
+ - SCALA_SCALAFIX
64
+ - SQL_SQLFLUFF # in Super-Linter
65
+ - SQL_TSQLLINT
66
+ - SWIFT_SWIFTLINT
67
+ - TSX_ESLINT
68
+ - TYPESCRIPT_ES # in Super-Linter
69
+ # - TYPESCRIPT_PRETTIER
70
+ - TYPESCRIPT_STANDARD # in Super-Linter
71
+ # - VBDOTNET_DOTNET_FORMAT
72
+
73
+ ### Formats
74
+ - CSS_STYLELINT # in Super-Linter
75
+ - ENV_DOTENV_LINTER # in Super-Linter
76
+ # - GRAPHQL_GRAPHQL_SCHEMA_LINTER
77
+ # - HTML_DJLINT # Refuses to see config file
78
+ - HTML_HTMLHINT # in Super-Linter
79
+ - JSON_ESLINT_PLUGIN_JSONC # in Super-Linter
80
+ - JSON_JSONLINT
81
+ - JSON_NPM_PACKAGE_JSON_LINT
82
+ # - JSON_PRETTIER
83
+ - JSON_V8R
84
+ # - LATEX_CHKTEX # in Super-Linter
85
+ - MARKDOWN_MARKDOWNLINT # in Super-Linter
86
+ - MARKDOWN_MARKDOWN_LINK_CHECK
87
+ - MARKDOWN_MARKDOWN_TABLE_FORMATTER
88
+ - MARKDOWN_REMARK_LINT
89
+ # - PROTOBUF_PROTOLINT # in Super-Linter
90
+ # - RST_RSTCHECK
91
+ # - RST_RSTFMT
92
+ # - RST_RST_LINT
93
+ - XML_XMLLINT # in Super-Linter
94
+ # - YAML_PRETTIER
95
+ - YAML_V8R
96
+ - YAML_YAMLLINT # in Super-Linter
97
+
98
+ ### Tooling
99
+ - ACTION_ACTIONLINT # in Super-Linter
100
+ - ANSIBLE_ANSIBLE_LINT # in Super-Linter
101
+ - API_SPECTRAL
102
+ - ARM_ARM_TTK # in Super-Linter
103
+ # - BICEP_BICEP_LINTER
104
+ - CLOUDFORMATION_CFN_LINT # in Super-Linter
105
+ - DOCKERFILE_HADOLINT # in Super-Linter
106
+ - EDITORCONFIG_EDITORCONFIG_CHECKER # in Super-Linter
107
+ # - GHERKIN_GHERKIN_LINT # in Super-Linter
108
+ - KUBERNETES_HELM
109
+ - KUBERNETES_KUBECONFORM
110
+ - KUBERNETES_KUBESCAPE
111
+ - PUPPET_PUPPET_LINT
112
+ # - SNAKEMAKE_LINT # in Super-Linter
113
+ # - SNAKEMAKE_SNAKEFMT # in Super-Linter
114
+ # - TEKTON_TEKTON_LINT # in Super-Linter
115
+ - TERRAFORM_TERRAFORM_FMT # in Super-Linter
116
+ - TERRAFORM_TERRAGRUNT # in Super-Linter
117
+ - TERRAFORM_TERRASCAN # in Super-Linter
118
+ - TERRAFORM_TFLINT # in Super-Linter
119
+
120
+ ### Code quality checkers
121
+ - COPYPASTE_JSCPD # in Super-Linter
122
+ - REPOSITORY_CHECKOV
123
+ - REPOSITORY_DEVSKIM
124
+ - REPOSITORY_DUSTILOCK
125
+ - REPOSITORY_GIT_DIFF
126
+ - REPOSITORY_GITLEAKS # in Super-Linter
127
+ - REPOSITORY_GRYPE
128
+ - REPOSITORY_KICS
129
+ - REPOSITORY_LS_LINT
130
+ - REPOSITORY_SECRETLINT
131
+ - REPOSITORY_SEMGREP
132
+ - REPOSITORY_SYFT
133
+ - REPOSITORY_TRIVY
134
+ - REPOSITORY_TRIVY_SBOM
135
+ - REPOSITORY_TRUFFLEHOG
136
+ # - SPELL_CSPELL
137
+ - SPELL_LYCHEE
138
+ - SPELL_PROSELINT
139
+ - SPELL_VALE
140
+
141
+ SHOW_ELAPSED_TIME: false
142
+ FILEIO_REPORTER: false
143
+ FAIL_IF_MISSING_LINTER_IN_FLAVOR: true
144
+ # DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect
145
+ # errors but not block CI to pass
data/.rubocop ADDED
@@ -0,0 +1 @@
1
+ --config .github/linters/rubocop_defaults.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2025-11-28
11
+
12
+ ### Added
13
+
14
+ - Added Way of Working documentation and GithubAuditRule
15
+
16
+ [Unreleased]: https://github.com/HealthDataInsight/way_of_working-versioning-semver/compare/v1.0.0...HEAD
17
+ [1.0.0]: https://github.com/HealthDataInsight/way_of_working-versioning-semver/releases/tag/v1.0.0
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Health Data Insight CIC
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,48 @@
1
+ # WayOfWorking::Versioning::Semver
2
+
3
+ <!-- Way of Working: Main Badge Holder Start -->
4
+ ![Way of Working Badge](https://img.shields.io/badge/Way_of_Working-v2.0.1-%238169e3?labelColor=black)
5
+ <!-- Way of Working: Additional Badge Holder Start -->
6
+ <!-- Way of Working: Badge Holder End -->
7
+
8
+ TODO: Delete this and the text below, and describe your gem
9
+
10
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/way_of_working-versioning-semver`. To experiment with that code, run `bin/console` for an interactive prompt.
11
+
12
+ ## Installation
13
+
14
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
15
+
16
+ Install the gem and add to the application's Gemfile by executing:
17
+
18
+ ```bash
19
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
20
+ ```
21
+
22
+ If bundler is not being used to manage dependencies, install the gem by executing:
23
+
24
+ ```bash
25
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ TODO: Write usage instructions here
31
+
32
+ ## Development
33
+
34
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
35
+
36
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
+
38
+ ## Contributing
39
+
40
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/HealthDataInsight/way_of_working-versioning-semver>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/HealthDataInsight/way_of_working-versioning-semver/blob/main/CODE_OF_CONDUCT.md).
41
+
42
+ ## License
43
+
44
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
45
+
46
+ ## Code of Conduct
47
+
48
+ Everyone interacting in the way_of_working-versioning-semver project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/HealthDataInsight/way_of_working-versioning-semver/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
+ require 'way_of_working/tasks'
6
+
7
+ Rake::TestTask.new(:test) do |t|
8
+ t.libs << 'lib'
9
+ t.libs << 'test'
10
+ t.test_files = FileList['test/**/*_test.rb']
11
+ t.verbose = false
12
+ t.warning = false
13
+ end
14
+
15
+ desc 'Run tests'
16
+ task default: :test
data/code_safety.yml ADDED
@@ -0,0 +1,130 @@
1
+ ---
2
+ file safety:
3
+ ".alexrc":
4
+ comments:
5
+ reviewed_by: shilpigoeldev
6
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
7
+ ".github/linters/.markdown-link-check.json":
8
+ comments:
9
+ reviewed_by: shilpigoeldev
10
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
11
+ ".github/linters/rubocop_defaults.yml":
12
+ comments:
13
+ reviewed_by: shilpigoeldev
14
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
15
+ ".github/workflows/inclusive-language.yml":
16
+ comments:
17
+ reviewed_by: shilpigoeldev
18
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
19
+ ".github/workflows/main.yml":
20
+ comments:
21
+ reviewed_by: shilpigoeldev
22
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
23
+ ".github/workflows/mega-linter.yml":
24
+ comments:
25
+ reviewed_by: shilpigoeldev
26
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
27
+ ".gitignore":
28
+ comments:
29
+ reviewed_by: shilpigoeldev
30
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
31
+ ".mega-linter.yml":
32
+ comments:
33
+ reviewed_by: shilpigoeldev
34
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
35
+ ".rubocop":
36
+ comments:
37
+ reviewed_by: shilpigoeldev
38
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
39
+ CHANGELOG.md:
40
+ comments:
41
+ reviewed_by: shilpigoeldev
42
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
43
+ Gemfile:
44
+ comments:
45
+ reviewed_by: shilpigoeldev
46
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
47
+ Gemfile.lock:
48
+ comments:
49
+ reviewed_by: shilpigoeldev
50
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
51
+ LICENSE.txt:
52
+ comments:
53
+ reviewed_by: shilpigoeldev
54
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
55
+ README.md:
56
+ comments:
57
+ reviewed_by: shilpigoeldev
58
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
59
+ Rakefile:
60
+ comments:
61
+ reviewed_by: shilpigoeldev
62
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
63
+ bin/console:
64
+ comments:
65
+ reviewed_by: shilpigoeldev
66
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
67
+ bin/setup:
68
+ comments:
69
+ reviewed_by: shilpigoeldev
70
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
71
+ docs/way_of_working/versioning.md:
72
+ comments:
73
+ reviewed_by: shilpigoeldev
74
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
75
+ lib/way_of_working/versioning/semver.rb:
76
+ comments:
77
+ reviewed_by: shilpigoeldev
78
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
79
+ lib/way_of_working/versioning/semver/generators/init.rb:
80
+ comments:
81
+ reviewed_by: shilpigoeldev
82
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
83
+ lib/way_of_working/versioning/semver/github_audit_rule.rb:
84
+ comments:
85
+ reviewed_by: shilpigoeldev
86
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
87
+ lib/way_of_working/versioning/semver/paths.rb:
88
+ comments:
89
+ reviewed_by: shilpigoeldev
90
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
91
+ lib/way_of_working/versioning/semver/plugin.rb:
92
+ comments:
93
+ reviewed_by: shilpigoeldev
94
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
95
+ lib/way_of_working/versioning/semver/templates/docs/way_of_working/versioning.md:
96
+ comments:
97
+ reviewed_by: shilpigoeldev
98
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
99
+ lib/way_of_working/versioning/semver/version.rb:
100
+ comments:
101
+ reviewed_by: shilpigoeldev
102
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
103
+ test/test_helper.rb:
104
+ comments:
105
+ reviewed_by: shilpigoeldev
106
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
107
+ test/way_of_working/audit_github_stub_classes.rb:
108
+ comments:
109
+ reviewed_by: shilpigoeldev
110
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
111
+ test/way_of_working/versioning/semver/generators/init_test.rb:
112
+ comments:
113
+ reviewed_by: shilpigoeldev
114
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
115
+ test/way_of_working/versioning/semver/github_audit_rule_test.rb:
116
+ comments:
117
+ reviewed_by: shilpigoeldev
118
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
119
+ test/way_of_working/versioning/semver/zeitwerk_loader_test.rb:
120
+ comments:
121
+ reviewed_by: shilpigoeldev
122
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
123
+ test/way_of_working/versioning/semver_test.rb:
124
+ comments:
125
+ reviewed_by: shilpigoeldev
126
+ safe_revision: 0a9453ef71b1926d6be0105d3814f99e9027b55f
127
+ way_of_working-versioning-semver.gemspec:
128
+ comments:
129
+ reviewed_by: shilpigoeldev
130
+ safe_revision: ffc45545cd82db554cbee17125f2ed5c2c70ea2e
@@ -0,0 +1,71 @@
1
+ ---
2
+ layout: page
3
+ status: REQUIRED
4
+ enforcement: manual
5
+ ---
6
+
7
+ # Versioning
8
+
9
+ ## Purpose
10
+
11
+ Define the versioning standard for communicating software changes and managing releases across projects.
12
+
13
+ ## Scope
14
+
15
+ Applies to all software projects requiring version identification.
16
+
17
+ ## Requirements
18
+
19
+ Use [Semantic Versioning](https://semver.org) (semver) with format `MAJOR.MINOR.PATCH`:
20
+
21
+ 1. **MAJOR**: Increment for incompatible API changes
22
+ 2. **MINOR**: Increment for backwards-compatible functionality additions
23
+ 3. **PATCH**: Increment for backwards-compatible bug fixes
24
+
25
+ Pre-release and build metadata labels available as extensions.
26
+
27
+ ## Setup
28
+
29
+ No specific tooling required. Apply version numbers to:
30
+
31
+ - Git tags
32
+ - Package manifests (`package.json`, `Cargo.toml`, etc.)
33
+ - Release notes
34
+ - Documentation
35
+
36
+ ## Usage
37
+
38
+ **When to increment:**
39
+
40
+ - Breaking changes → increment MAJOR (e.g., 1.2.3 → 2.0.0)
41
+ - New features (backwards-compatible) → increment MINOR (e.g., 1.2.3 → 1.3.0)
42
+ - Bug fixes (backwards-compatible) → increment PATCH (e.g., 1.2.3 → 1.2.4)
43
+
44
+ **Pre-release versions:** Append hyphen and identifiers (e.g., 1.0.0-alpha, 1.0.0-beta.1)
45
+
46
+ **Build metadata:** Append plus sign and identifiers (e.g., 1.0.0+20240115)
47
+
48
+ ## Enforcement
49
+
50
+ Manual enforcement through:
51
+
52
+ - Code review verification
53
+ - Release checklist validation
54
+ - Automated CI checks (where configured)
55
+
56
+ ## Examples
57
+
58
+ ```text
59
+ 0.1.0 → Initial development
60
+ 1.0.0 → First stable release
61
+ 1.1.0 → Added new feature
62
+ 1.1.1 → Fixed bug
63
+ 2.0.0 → Breaking API change
64
+ 2.0.0-rc.1 → Release candidate
65
+ 1.2.3+build.456 → With build metadata
66
+ ```
67
+
68
+ ## Resources
69
+
70
+ - [Semantic Versioning Specification](https://semver.org)
71
+ - [Semver Calculator](https://semver.npmjs.com) - Determine version impact
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WayOfWorking
4
+ module Versioning
5
+ module Semver
6
+ module Generators
7
+ # This generator add the Semver files to the doc/decisions folder
8
+ class Init < Thor::Group
9
+ include Thor::Actions
10
+
11
+ source_root ::WayOfWorking::Versioning::Semver.source_root
12
+
13
+ def copy_way_of_working_file
14
+ copy_file 'docs/way_of_working/versioning.md'
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'way_of_working/audit/github/rules/base'
4
+
5
+ module WayOfWorking
6
+ module Versioning
7
+ # The namespace for this plugin
8
+ module Semver
9
+ # This rule checks for the versioning documentation
10
+ class GithubAuditRule < ::WayOfWorking::Audit::Github::Rules::Base
11
+ source_root WayOfWorking::Versioning::Semver.source_root
12
+
13
+ def validate
14
+ validate_repo_file_contains_source_file(
15
+ 'docs/way_of_working/versioning.md'
16
+ )
17
+ end
18
+
19
+ private
20
+
21
+ def repo_file_contains_source_file?(path)
22
+ repo_file_contains?(path, File.read(self.class.source_root.join(path)))
23
+ end
24
+
25
+ def repo_file_contains?(path, text)
26
+ remote_content = repo_file_contents(path)
27
+ return false if remote_content.nil?
28
+
29
+ remote_content.include?(text)
30
+ end
31
+
32
+ def validate_repo_file_contains_source_file(*paths)
33
+ paths.each do |path|
34
+ if repo_file_contents(path).nil?
35
+ @errors << "#{path} missing"
36
+ next
37
+ end
38
+
39
+ @errors << "#{path} does not match the source template" unless repo_file_contains_source_file?(path)
40
+ end
41
+ end
42
+ end
43
+
44
+ ::WayOfWorking::Audit::Github::Rules::Registry.register(
45
+ GithubAuditRule, 'Semantic Versioning'
46
+ )
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ module WayOfWorking
6
+ module Versioning
7
+ # Mixin that provides a couple of pathname convenience methods
8
+ module Semver
9
+ class << self
10
+ def root
11
+ Pathname.new(File.expand_path('../../../..', __dir__))
12
+ end
13
+
14
+ def source_root
15
+ root.join('lib', 'way_of_working', 'versioning', 'semver', 'templates')
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,13 @@
1
+ require 'way_of_working/versioning/semver'
2
+
3
+ # Add any plug specific code here
4
+
5
+ module WayOfWorking
6
+ module Versioning
7
+ module Semver
8
+ # This makes zeitwerk happy, which makes us happy too
9
+ module Plugin
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,71 @@
1
+ ---
2
+ layout: page
3
+ status: REQUIRED
4
+ enforcement: manual
5
+ ---
6
+
7
+ # Versioning
8
+
9
+ ## Purpose
10
+
11
+ Define the versioning standard for communicating software changes and managing releases across projects.
12
+
13
+ ## Scope
14
+
15
+ Applies to all software projects requiring version identification.
16
+
17
+ ## Requirements
18
+
19
+ Use [Semantic Versioning](https://semver.org) (semver) with format `MAJOR.MINOR.PATCH`:
20
+
21
+ 1. **MAJOR**: Increment for incompatible API changes
22
+ 2. **MINOR**: Increment for backwards-compatible functionality additions
23
+ 3. **PATCH**: Increment for backwards-compatible bug fixes
24
+
25
+ Pre-release and build metadata labels available as extensions.
26
+
27
+ ## Setup
28
+
29
+ No specific tooling required. Apply version numbers to:
30
+
31
+ - Git tags
32
+ - Package manifests (`package.json`, `Cargo.toml`, etc.)
33
+ - Release notes
34
+ - Documentation
35
+
36
+ ## Usage
37
+
38
+ **When to increment:**
39
+
40
+ - Breaking changes → increment MAJOR (e.g., 1.2.3 → 2.0.0)
41
+ - New features (backwards-compatible) → increment MINOR (e.g., 1.2.3 → 1.3.0)
42
+ - Bug fixes (backwards-compatible) → increment PATCH (e.g., 1.2.3 → 1.2.4)
43
+
44
+ **Pre-release versions:** Append hyphen and identifiers (e.g., 1.0.0-alpha, 1.0.0-beta.1)
45
+
46
+ **Build metadata:** Append plus sign and identifiers (e.g., 1.0.0+20240115)
47
+
48
+ ## Enforcement
49
+
50
+ Manual enforcement through:
51
+
52
+ - Code review verification
53
+ - Release checklist validation
54
+ - Automated CI checks (where configured)
55
+
56
+ ## Examples
57
+
58
+ ```text
59
+ 0.1.0 → Initial development
60
+ 1.0.0 → First stable release
61
+ 1.1.0 → Added new feature
62
+ 1.1.1 → Fixed bug
63
+ 2.0.0 → Breaking API change
64
+ 2.0.0-rc.1 → Release candidate
65
+ 1.2.3+build.456 → With build metadata
66
+ ```
67
+
68
+ ## Resources
69
+
70
+ - [Semantic Versioning Specification](https://semver.org)
71
+ - [Semver Calculator](https://semver.npmjs.com) - Determine version impact
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WayOfWorking
4
+ module Versioning
5
+ module Semver
6
+ VERSION = '1.0.0'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'way_of_working'
4
+ require_relative 'semver/paths'
5
+ require 'zeitwerk'
6
+
7
+ # If way_of_working-audit-github is used we can add a rule
8
+ begin
9
+ require 'way_of_working/audit/github/rules/registry'
10
+ require_relative 'semver/github_audit_rule'
11
+ rescue LoadError # rubocop:disable Lint/SuppressedException
12
+ end
13
+
14
+ loader = Zeitwerk::Loader.for_gem_extension(WayOfWorking::Versioning)
15
+ loader.setup
16
+
17
+ module WayOfWorking
18
+ module Versioning
19
+ module Semver
20
+ class Error < StandardError; end
21
+ end
22
+ end
23
+
24
+ module SubCommands
25
+ # This reopens the "way_of_working init" sub command
26
+ class Init
27
+ register(Versioning::Semver::Generators::Init, 'versioning', 'versioning',
28
+ <<~LONGDESC)
29
+ Description:
30
+ This generator adds Semantic Versioning to your project
31
+
32
+ Example:
33
+ way_of_working init versioning
34
+
35
+ This will create:
36
+ docs/way_of_working/versioning.md
37
+ LONGDESC
38
+ end
39
+ end
40
+ end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: way_of_working-versioning-semver
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Tim Gentry
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-12-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: way_of_working
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: zeitwerk
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.6.18
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.6.18
41
+ description:
42
+ email:
43
+ - 52189+timgentry@users.noreply.github.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".alexrc"
49
+ - ".mega-linter.yml"
50
+ - ".rubocop"
51
+ - CHANGELOG.md
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - code_safety.yml
56
+ - docs/way_of_working/versioning.md
57
+ - lib/way_of_working/versioning/semver.rb
58
+ - lib/way_of_working/versioning/semver/generators/init.rb
59
+ - lib/way_of_working/versioning/semver/github_audit_rule.rb
60
+ - lib/way_of_working/versioning/semver/paths.rb
61
+ - lib/way_of_working/versioning/semver/plugin.rb
62
+ - lib/way_of_working/versioning/semver/templates/docs/way_of_working/versioning.md
63
+ - lib/way_of_working/versioning/semver/version.rb
64
+ homepage: https://github.com/HealthDataInsight/way_of_working-versioning-semver
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ allowed_push_host: https://rubygems.org
69
+ rubygems_mfa_required: 'true'
70
+ homepage_uri: https://github.com/HealthDataInsight/way_of_working-versioning-semver
71
+ source_code_uri: https://github.com/HealthDataInsight/way_of_working-versioning-semver
72
+ changelog_uri: https://github.com/HealthDataInsight/way_of_working-versioning-semver/blob/main/CHANGELOG.md
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 3.1.0
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubygems_version: 3.3.26
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: Way of Working plugin for Semantic Versioning
92
+ test_files: []