flag_shih_tzu 0.3.23 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73b78e54263e309fa419f5f889f07c9c9facae95452a46af2fffbccfba1184e7
4
- data.tar.gz: 0455055c99358352e6815729f0db5333f5d576cdb9171c5b4f2dd99aa43a0597
3
+ metadata.gz: 3b4edc96aec33d81ab8377dbe51fd66cb7e0633dd2611a10f1b079b9d2d6c653
4
+ data.tar.gz: 1300a2a2dcc8a3e436920124052d43ae1f6265f0c3c111229388fd0defbe25c3
5
5
  SHA512:
6
- metadata.gz: e5d7d736d8e0b40393a9950b3e21e8d24528ed8317fed223aa812475e2caee2192c03b125ecb02c2c99a5a5782b953e32100bcac445b62cb21cb6a1c76339ab0
7
- data.tar.gz: 4a755282353388f95875bea8208879fe8961cab100204437b0054de955c84379dcd856226f317bf1945cdf9cc7930752d8f9bd68f040194d8d128faeb915315d
6
+ metadata.gz: 93a2062e91ea1fcefca35970f02d4c5073969b1dc61d2cfe66bf7f66875b1592c56fae42f0274f56747c6815a35ef0fa0d987e12fbacccbb968d3f43b3ebf110
7
+ data.tar.gz: 61fb37f77d574600b55873b103ab5ddc2bb6427711096936b83040be4380c47b250af35811ba31b4b1f8b33d11cc34895bfcd9bc68ab21c2525821739c515ed7
checksums.yaml.gz.sig ADDED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,6 +1,111 @@
1
- # HEAD - UNRELEASED
2
-
3
- * Work merged into master branch goes here until it is released.
1
+ # Changelog
2
+
3
+ [![SemVer 2.0.0][📌semver-img]][📌semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog]
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ The format is based on [Keep a Changelog][📗keep-changelog],
8
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
9
+ and [yes][📌major-versions-not-sacred], platform and engine support are part of the [public API][📌semver-breaking].
10
+ Please file a bug if you notice a violation of semantic versioning.
11
+
12
+ [📌semver]: https://semver.org/spec/v2.0.0.html
13
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
14
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
15
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
16
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
17
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
18
+
19
+ ## [Unreleased]
20
+
21
+ ### Added
22
+
23
+ ### Changed
24
+
25
+ ### Deprecated
26
+
27
+ ### Removed
28
+
29
+ ### Fixed
30
+
31
+ ### Security
32
+
33
+ ## [1.0.0] - 2026-05-26
34
+
35
+ - TAG: [v1.0.0][1.0.0t]
36
+ - COVERAGE: 90.95% -- 412/453 lines in 3 files
37
+ - BRANCH COVERAGE: 76.76% -- 142/185 branches in 3 files
38
+ - 27.78% documented
39
+
40
+ ### Added
41
+
42
+ - Added `table_alias:` support to generated `not_<flag>_condition` SQL helper
43
+ methods, matching the existing alias support for positive flag conditions.
44
+ - Added documentation for safely deprecating or removing flags without
45
+ corrupting the meaning of existing bit values.
46
+ - Added `flags_as_attributes`, `attributes_with_flags`, and generated
47
+ `<column>_as_attributes` helpers for reading flag bits as boolean attributes.
48
+ - Added first-class project metadata, documentation links, funding links, and
49
+ gem signing metadata to the gemspec.
50
+ - Added array and hash assignment support to flag column writers, so calls like
51
+ `record.update!(flags: [:warpdrive, :shields])` can set multiple flags
52
+ without magic bit-field integers.
53
+ - Added `value_mode:`, `bit_width:`, and `encoder:` options to `has_flags`,
54
+ including built-in `value_mode: :tri_state` storage for flags that can be
55
+ `true`, `false`, or `nil`. This feature was inspired by PR #56 from Shivang
56
+ Yadav.
57
+ - Added the `:allow_overwrite` option to `has_flags` for callers that
58
+ intentionally want generated flag methods to replace existing instance
59
+ methods.
60
+
61
+ ### Changed
62
+
63
+ - **BREAKING**: Changed the default `flag_query_mode` from `:in_list` to
64
+ `:bit_operator` so generated flag SQL remains correct during rolling deploys
65
+ that add and set new flags. Applications that need the legacy query shape can
66
+ set `FlagShihTzu.default_flag_query_mode = :in_list` or pass
67
+ `flag_query_mode: :in_list` to `has_flags`.
68
+ - **BREAKING**: Changed flag column validation from opt-out to opt-in at model
69
+ load time. `has_flags` no longer checks the database by default, avoiding
70
+ failures and warnings during setup, migration, seed, asset, and test boot
71
+ tasks. Applications that want the legacy guardrail can set
72
+ `FlagShihTzu.default_check_for_column = true` or pass
73
+ `check_for_column: true` to `has_flags`.
74
+ - **BREAKING**: Changed custom FlagShihTzu error classes to inherit from
75
+ `StandardError` instead of `Exception`, so normal `rescue` blocks can handle
76
+ them.
77
+ - **BREAKING**: Changed flag column writers to interpret Array values as the
78
+ complete selected flag set and Hash values as partial boolean flag updates.
79
+ Raw integer assignment remains supported.
80
+ - Updated project ownership and documentation links from `pboling` to
81
+ `galtzo-floss`.
82
+ - Raised the effective minimum installable Ruby version to Ruby 2.2 through
83
+ the new `version_gem` runtime dependency.
84
+ - Expanded the maintained compatibility matrix to cover modern Ruby,
85
+ JRuby, TruffleRuby, and ActiveRecord releases through ActiveRecord 8.0.
86
+ - Modernized `validates_presence_of_flags` integration for current
87
+ ActiveModel error APIs.
88
+
89
+ ### Removed
90
+
91
+ - Removed the obsolete Travis CI setup and legacy appraisal files for
92
+ ActiveRecord 2.3 through 5.1.
93
+ - Removed Ruby 2.3 and JRuby 9.1 from the tested release matrix.
94
+
95
+ ### Fixed
96
+
97
+ - Restored project-specific README sections lost during templating, including
98
+ the Alternatives section and the updated RailsBling URL from PR #104.
99
+ - Avoided checking out an Active Record connection while quoting generated flag
100
+ SQL identifiers.
101
+ - Avoided repeated method redefinition warnings when flags are declared across
102
+ multiple columns.
103
+ - Fixed generated negative readers for flag names that are Ruby keywords, such
104
+ as `:end`.
105
+ - Normalized generated SQL condition behavior across supported ActiveRecord
106
+ versions, including ActiveRecord 6.0 where-clause AST differences.
107
+
108
+ ### Security
4
109
 
5
110
  # Version 0.3.23 - NOV.30.2018
6
111
 
@@ -28,10 +133,12 @@
28
133
  * Added Rails 5.1 to travis.
29
134
 
30
135
  # Version 0.3.18 - APR.30.2017
136
+
31
137
  * Switched from Fixnum to Integer for Ruby 2.4 happiness
32
138
  * Fixed build for all supported Ruby and Rails versions in supported matrix
33
139
 
34
140
  # Version 0.3.17 - APR.29.2017
141
+
35
142
  * Improved compatibility with Rails 5.0
36
143
  * Fixed warnings about Fixnums
37
144
  * Fixed compatibility with SQLlite
@@ -174,3 +281,7 @@
174
281
  * Complete Ruby 1.9(\.[^1]) and Rails 3.2.X compatibility
175
282
 
176
283
  # Version 0.2.3 - last version maintained by XING AG
284
+
285
+ [Unreleased]: https://github.com/galtzo-floss/flag_shih_tzu/compare/v1.0.0...HEAD
286
+ [1.0.0]: https://github.com/galtzo-floss/flag_shih_tzu/compare/baaff102ad48e6c5b4bfb3efb088cec82fa1ddb4...v1.0.0
287
+ [1.0.0t]: https://github.com/galtzo-floss/flag_shih_tzu/releases/tag/v1.0.0
data/CITATION.cff ADDED
@@ -0,0 +1,20 @@
1
+ cff-version: 1.2.0
2
+ title: "flag_shih_tzu"
3
+ message: >-
4
+ If you use this work and you want to cite it,
5
+ then you can use the metadata from this file.
6
+ type: software
7
+ authors:
8
+ - given-names: "Peter H."
9
+ family-names: "Boling"
10
+ email: "floss@galtzo.com"
11
+ affiliation: "galtzo.com"
12
+ orcid: 'https://orcid.org/0009-0008-8519-441X'
13
+ identifiers:
14
+ - type: url
15
+ value: 'https://github.com/pboling/flag_shih_tzu/tree/main/gems/flag_shih_tzu'
16
+ description: "flag_shih_tzu"
17
+ repository-code: 'https://github.com/pboling/flag_shih_tzu/tree/main/gems/flag_shih_tzu'
18
+ abstract: >-
19
+ flag_shih_tzu
20
+ license: See license file
@@ -0,0 +1,134 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
133
+ [🚂maint-contact]: http://www.railsbling.com/contact
134
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,256 @@
1
+ # Contributing
2
+
3
+ Bug reports and pull requests are welcome on [CodeBerg][📜src-cb], [GitLab][📜src-gl], or [GitHub][📜src-gh].
4
+ This project should be a safe, welcoming space for collaboration, so contributors agree to adhere to
5
+ the [code of conduct][🤝conduct].
6
+
7
+ To submit a patch, please fork the project, create a patch with tests, and send a pull request.
8
+
9
+ Remember to [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] if you make changes.
10
+
11
+ ## Developer Certificate of Origin
12
+
13
+ In order to protect users of this project, we require all contributors to comply with the
14
+ [Developer Certificate of Origin](https://developercertificate.org/).
15
+ This ensures that all contributions are properly licensed and attributed.
16
+
17
+ ## Help out!
18
+
19
+ Take a look at the open issues and pull requests, or use the gem and find something to improve.
20
+
21
+ Follow these instructions:
22
+
23
+ 1. Join the Discord: [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
24
+ 2. Fork the repository
25
+ 3. Create your feature branch (`git checkout -b my-new-feature`)
26
+ 4. Make some fixes.
27
+ 5. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 6. Push to the branch (`git push origin my-new-feature`)
29
+ 7. Make sure to add tests for it. This is important, so it doesn't break in a future release.
30
+ 8. Create new Pull Request.
31
+ 9. Announce it in the channel for this org in the [Discord][✉️discord-invite]!
32
+
33
+ ## Executables vs Rake tasks
34
+
35
+ Executables shipped by dependencies, such as kettle-dev, and stone_checksums, are available
36
+ after running `bin/setup`. These include:
37
+
38
+ - gem_checksums
39
+ - kettle-changelog
40
+ - kettle-commit-msg
41
+ - kettle-dev-setup
42
+ - kettle-dvcs
43
+ - kettle-pre-release
44
+ - kettle-readme-backers
45
+ - kettle-release
46
+
47
+ There are many Rake tasks available as well. You can see them by running:
48
+
49
+ ```shell
50
+ bin/rake -T
51
+ ```
52
+
53
+ ## Code quality checks
54
+
55
+ Run the Reek task when you want a smell check that fails on current findings:
56
+
57
+ ```shell
58
+ bin/rake reek
59
+ ```
60
+
61
+ Refresh the checked-in `REEK` backlog through the rake task, not by redirecting
62
+ the raw `reek` executable output. The rake task uses the project bundle and
63
+ avoids stale generated binstubs shadowing the Reek gem executable:
64
+
65
+ ```shell
66
+ bin/rake reek:update
67
+ ```
68
+
69
+ ## Environment Variables for Local Development
70
+
71
+ Below are the primary environment variables recognized by stone_checksums (and its integrated tools). Unless otherwise noted, set boolean values to the string "true" to enable.
72
+
73
+ General/runtime
74
+ - DEBUG: Enable extra internal logging for this library (default: false)
75
+ - REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
76
+ - CI: When set to true, adjusts default rake tasks toward CI behavior
77
+
78
+ Coverage (kettle-soup-cover / SimpleCov)
79
+ - K_SOUP_COV_DO: Enable coverage collection (default: true in `mise.toml`)
80
+ - K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
81
+ - K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
82
+ - K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
83
+ - K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
84
+ - K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
85
+ - K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
86
+ - MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
87
+ Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.
88
+
89
+ GitHub API and CI helpers
90
+ - GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits
91
+
92
+ Releasing and signing
93
+ - SKIP_GEM_SIGNING: If set, skip gem signing during build/release
94
+ - GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
95
+ - SOURCE_DATE_EPOCH: Reproducible build timestamp.
96
+ - `kettle-release` will set this automatically for the session.
97
+ - Not needed on bundler >= 2.7.0, as reproducible builds have become the default.
98
+
99
+ Git hooks and commit message helpers (exe/kettle-commit-msg)
100
+ - GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
101
+ - GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
102
+ - GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
103
+ - GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)
104
+
105
+ For a quick starting point, this repository’s `mise.toml` defines the shared defaults, and `.env.local` can override them locally. Copy `.env.local.example` to `.env.local`, use `KEY=value` lines, and either activate `mise` in your shell or run commands through `mise exec -C /path/to/project -- ...`.
106
+
107
+ ## Appraisals
108
+
109
+ From time to time the [appraisal2][🚎appraisal2] gemfiles in `gemfiles/` will need to be updated.
110
+ Generated appraisal and CI workflow floors are controlled by `ruby.test_minimum`
111
+ in `.kettle-jem.yml`; this project was templated with `ruby.test_minimum: 2.4`.
112
+ That value describes the lowest Ruby version expected to run the test/development
113
+ toolchain, and it may be higher than the gemspec runtime floor.
114
+
115
+ They are created and updated with the commands:
116
+
117
+ ```console
118
+ bin/rake appraisal:update
119
+ ```
120
+
121
+ If you need to reset all gemfiles/*.gemfile.lock files:
122
+
123
+ ```console
124
+ bin/rake appraisal:reset
125
+ ```
126
+
127
+ When adding an appraisal to CI, check the [runner tool cache][🏃‍♂️runner-tool-cache] to see which runner to use.
128
+
129
+ ## Run Tests
130
+
131
+ Run tests via `kettle-test` (provided by `kettle-test`). It runs RSpec, writes the full log to
132
+ `tmp/kettle-test/rspec-TIMESTAMP.log`, and prints a compact highlight block with timing, seed,
133
+ pass/fail count, failing example list, and SimpleCov coverage percentages.
134
+
135
+ ```console
136
+ bundle exec kettle-test
137
+ ```
138
+
139
+ For targeted runs, disable the hard coverage threshold to avoid false failures:
140
+
141
+ ```console
142
+ K_SOUP_COV_MIN_HARD=false bundle exec kettle-test spec/path/to/spec.rb
143
+ ```
144
+
145
+ ### Spec organization (required)
146
+
147
+ - One spec file per class/module. For each class or module under `lib/`, keep all of its unit tests in a single spec file under `spec/` that mirrors the path and file name exactly: `lib/flag_shih_tzu/my_class.rb` -> `spec/flag_shih_tzu/my_class_spec.rb`.
148
+ - Exception: Integration specs that intentionally span multiple classes. Place these under `spec/integration/` (or a clearly named integration folder), and do not directly mirror a single class. Name them after the scenario, not a class.
149
+
150
+ ## Lint It
151
+
152
+ Run all the default tasks, which includes running the gradually autocorrecting linter, `rubocop-gradual`.
153
+
154
+ ```console
155
+ bundle exec rake
156
+ ```
157
+
158
+ Or just run the linter.
159
+
160
+ ```console
161
+ bundle exec rake rubocop_gradual:autocorrect
162
+ ```
163
+
164
+ For more detailed information about using RuboCop in this project, please see the [RUBOCOP.md](RUBOCOP.md) guide. This project uses `rubocop_gradual` instead of vanilla RuboCop, which requires specific commands for checking violations.
165
+
166
+ ### Important: Do not add inline RuboCop disables
167
+
168
+ Never add `# rubocop:disable ...` / `# rubocop:enable ...` comments to code or specs (except when following the few existing `rubocop:disable` patterns for a rule already being disabled elsewhere in the code). Instead:
169
+
170
+ - Prefer configuration-based exclusions when a rule should not apply to certain paths or files (e.g., via `.rubocop.yml`).
171
+ - When a violation is temporary, and you plan to fix it later, record it in `.rubocop_gradual.lock` using the gradual workflow:
172
+ - `bundle exec rake rubocop_gradual:autocorrect` (preferred)
173
+ - `bundle exec rake rubocop_gradual:force_update` (only when you cannot fix the violations immediately)
174
+
175
+ As a general rule, fix style issues rather than ignoring them. For example, our specs should follow RSpec conventions like using `described_class` for the class under test.
176
+
177
+ ## Contributors
178
+
179
+ Your picture could be here!
180
+
181
+ [![Contributors][🖐contributors-img]][🖐contributors]
182
+
183
+ Made with [contributors-img][🖐contrib-rocks].
184
+
185
+ Also see GitLab Contributors: [https://gitlab.com/galtzo-floss/flag_shih_tzu/-/graphs/main][🚎contributors-gl]
186
+
187
+ ## For Maintainers
188
+
189
+ ### One-time, Per-maintainer, Setup
190
+
191
+ **IMPORTANT**: To sign a build,
192
+ a public key for signing gems will need to be picked up by the line in the
193
+ `gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there).
194
+ All releases are signed releases.
195
+ See: [RubyGems Security Guide][🔒️rubygems-security-guide]
196
+
197
+ NOTE: To build without signing the gem set `SKIP_GEM_SIGNING` to any value in the environment.
198
+
199
+ ### To release a new version:
200
+
201
+ #### Automated process
202
+
203
+ 1. Update version.rb to contain the correct version-to-be-released.
204
+ 2. Run `bundle exec kettle-changelog`.
205
+ 3. Run `bundle exec kettle-release`.
206
+ 4. Stay awake and monitor the release process for any errors, and answer any prompts.
207
+
208
+ #### Manual process
209
+
210
+ 1. Run `bin/setup && bin/rake` as a "test, coverage, & linting" sanity check
211
+ 2. Update the version number in `version.rb`, and ensure `CHANGELOG.md` reflects changes
212
+ 3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
213
+ 4. Run `bin/rake yard` to regenerate the docs site using the canonical docs task
214
+ 5. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
215
+ 6. Run `git push` to trigger the final CI pipeline before release, and merge PRs
216
+ - NOTE: Remember to [check the build][🧪build].
217
+ 7. Run `export GIT_TRUNK_BRANCH_NAME="$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)" && echo $GIT_TRUNK_BRANCH_NAME`
218
+ 8. Run `git checkout $GIT_TRUNK_BRANCH_NAME`
219
+ 9. Run `git pull origin $GIT_TRUNK_BRANCH_NAME` to ensure latest trunk code
220
+ 10. Optional for older Bundler (< 2.7.0): Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use the same timestamp and generate the same checksums
221
+ - If your Bundler is >= 2.7.0, you can skip this; builds are reproducible by default.
222
+ - Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH`
223
+ - If the echo above has no output, then it didn't work.
224
+ - Note: `zsh/datetime` module is needed, if running `zsh`.
225
+ - In older versions of `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH`
226
+ 11. Run `bundle exec rake build`
227
+ 12. Run `bin/gem_checksums` (more context [1][🔒️rubygems-checksums-pr], [2][🔒️rubygems-guides-pr])
228
+ to create SHA-256 and SHA-512 checksums. This functionality is provided by the `stone_checksums`
229
+ [gem][💎stone_checksums].
230
+ - The script automatically commits but does not push the checksums
231
+ 13. Sanity check the SHA256, comparing with the output from the `bin/gem_checksums` command:
232
+ - `sha256sum pkg/<gem name>-<version>.gem`
233
+ 14. Run `bundle exec rake release` which will create a git tag for the version,
234
+ push git commits and tags, and push the `.gem` file to the gem host configured in the gemspec.
235
+
236
+ [📜src-gl]: https://gitlab.com/galtzo-floss/flag_shih_tzu
237
+ [📜src-cb]: https://codeberg.org/galtzo-floss/flag_shih_tzu
238
+ [📜src-gh]: https://github.com/galtzo-floss/flag_shih_tzu
239
+ [🧪build]: https://github.com/galtzo-floss/flag_shih_tzu/actions
240
+ [🤝conduct]: https://github.com/galtzo-floss/flag_shih_tzu/blob/main/CODE_OF_CONDUCT.md
241
+ [🖐contrib-rocks]: https://contrib.rocks
242
+ [🖐contributors]: https://github.com/galtzo-floss/flag_shih_tzu/graphs/contributors
243
+ [🚎contributors-gl]: https://gitlab.com/galtzo-floss/flag_shih_tzu/-/graphs/main
244
+ [🖐contributors-img]: https://contrib.rocks/image?repo=galtzo-floss/flag_shih_tzu
245
+ [💎gem-coop]: https://gem.coop
246
+ [🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
247
+ [🔒️rubygems-checksums-pr]: https://github.com/rubygems/rubygems/pull/6022
248
+ [🔒️rubygems-guides-pr]: https://github.com/rubygems/guides/pull/325
249
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
250
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
251
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
252
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
253
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
254
+ [🚎appraisal2]: https://github.com/appraisal-rb/appraisal2
255
+ [🏃‍♂️runner-tool-cache]: https://github.com/ruby/ruby-builder/releases/tag/toolcache
256
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
data/FUNDING.md ADDED
@@ -0,0 +1,74 @@
1
+ <!-- RELEASE-NOTES-FOOTER-START -->
2
+
3
+ Official Discord 👉️ [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
4
+
5
+ Many paths lead to being a sponsor or a backer of this project. Are you on such a path?
6
+
7
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal]
8
+
9
+ [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon]
10
+
11
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
12
+ [⛳liberapay]: https://liberapay.com/pboling/donate
13
+ [🖇osc-backers]: https://opencollective.com/#backer
14
+ [🖇osc-backers-i]: https://opencollective.com//backers/badge.svg?style=flat
15
+ [🖇osc-sponsors]: https://opencollective.com/#sponsor
16
+ [🖇osc-sponsors-i]: https://opencollective.com//sponsors/badge.svg?style=flat
17
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
18
+ [🖇sponsor]: https://github.com/sponsors/pboling
19
+ [🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
20
+ [🖇polar]: https://polar.sh/pboling
21
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
22
+ [🖇kofi]: https://ko-fi.com/pboling
23
+ [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
24
+ [🖇patreon]: https://patreon.com/galtzo
25
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
26
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
27
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
28
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
29
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
30
+ [✉️discord-invite-img]: https://img.shields.io/discord/1373797679469170758?style=flat
31
+
32
+ <!-- RELEASE-NOTES-FOOTER-END -->
33
+
34
+ # 🤑 A request for help
35
+
36
+ Maintainers have teeth and need to pay their dentists.
37
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
38
+ I began spending most of my time building open source tools.
39
+ I'm hoping to be able to pay for my kids' health insurance this month,
40
+ so if you value the work I am doing, I need your support.
41
+ Please consider sponsoring me or the project.
42
+
43
+ To join the community or get help 👇️ Join the Discord.
44
+
45
+ [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
46
+
47
+ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
48
+
49
+ [![Sponsor galtzo-floss/flag_shih_tzu on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
50
+
51
+ # Another Way to Support Open Source Software
52
+
53
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
54
+
55
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
56
+
57
+ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
58
+
59
+ **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
60
+
61
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
62
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/
63
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/
64
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/
65
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/?style=for-the-badge
66
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/?style=for-the-badge
67
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/?style=for-the-badge
68
+ [🖇osc]: https://opencollective.com/
69
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
70
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
71
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
72
+ [🖇floss-funding.dev]: https://floss-funding.dev
73
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
74
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge