Skip to content

Commit bd4f60d

Browse files
committed
chore: add coss.toml
1 parent a0a6c5f commit bd4f60d

File tree

3 files changed

+193
-0
lines changed

3 files changed

+193
-0
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,23 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: googleapis/release-please-action@v4
19+
id: release
20+
21+
- name: Checkout
22+
if: ${{ steps.release.outputs.release_created }}
23+
uses: actions/checkout@v4
24+
25+
- name: Update COSS version
26+
if: ${{ steps.release.outputs.release_created }}
27+
run: |
28+
VERSION=$(grep "VERSION = " lib/state_machines/integrations/active_model/version.rb | sed "s/.*'\(.*\)'.*/\1/")
29+
sed -i "s/^version = .*/version = \"$VERSION\"/" coss.toml
30+
31+
git config --local user.email "[email protected]"
32+
git config --local user.name "GitHub Action"
33+
git add coss.toml
34+
if ! git diff --cached --quiet; then
35+
git commit -m "chore: update COSS version to $VERSION"
36+
git push
37+
fi
1938

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ platforms :mri do
99
gem 'debug'
1010
end
1111

12+
gem 'rubocop'

coss.toml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# COSS Metadata Template v0.0.2
2+
# This is the official COSS (Contriboss Open Source Standard) specification template
3+
# Copy this file to your project root as coss.toml and customize for your project
4+
5+
##########################################################
6+
# 1. Basic Project Information
7+
name = "state_machines-activemodel"
8+
version = "0.9.0"
9+
description = "Adds support for creating state machines for attributes on ActiveModel models"
10+
licenses = ["MIT"]
11+
ai_contributions = true
12+
coss_compliant = true
13+
homepage = "https://github.com/state-machines/state_machines-activemodel"
14+
keywords = [
15+
"ruby",
16+
"state-machine",
17+
"activemodel",
18+
"rails",
19+
"validations",
20+
"callbacks",
21+
]
22+
23+
##########################################################
24+
# 2. Repository and Issue Tracking
25+
repository = "https://github.com/state-machines/state_machines-activemodel"
26+
issue_tracker = "https://github.com/state-machines/state_machines-activemodel/issues"
27+
documentation = "https://github.com/state-machines/state_machines-activemodel/blob/master/README.md"
28+
security_policy = ""
29+
30+
##########################################################
31+
# 3. Languages, Frameworks, and Platforms
32+
languages = ["ruby"]
33+
34+
[frameworks]
35+
rails = "7.1+"
36+
activemodel = "7.1+"
37+
38+
supported_platforms = ["linux", "darwin", "windows"]
39+
40+
##########################################################
41+
# 4. Dependency Lock Files
42+
[dependency_locks]
43+
ruby = "Gemfile.lock"
44+
appraisal = "gemfiles/*.gemfile.lock"
45+
46+
[packaging]
47+
ruby = "gem build state_machines-activemodel.gemspec"
48+
49+
##########################################################
50+
# 5. Maintainers and Governance
51+
maintainers = ["[email protected]"]
52+
governance = { type = "informal" }
53+
54+
##########################################################
55+
# 6. Linting, Formatting, and Static Analysis
56+
lint = "bundle exec rubocop"
57+
format = "bundle exec rubocop -a"
58+
static_analysis = ["bundle exec rubocop"]
59+
60+
##########################################################
61+
# 7. CI and Build Commands
62+
build = "bundle install"
63+
test = "rake test"
64+
test_all = "appraisal rake test"
65+
coverage = ""
66+
67+
##########################################################
68+
# 8. Tests and Quality Metrics
69+
[test_frameworks]
70+
ruby = "minitest"
71+
appraisal = true # Tests against multiple Rails versions
72+
73+
test_report_format = "minitest"
74+
coverage_threshold = 0
75+
76+
##########################################################
77+
# 9. Commit Guidelines and Formats
78+
commit_message_format = ""
79+
80+
##########################################################
81+
# 10. Release and Changelog
82+
changelog = "CHANGELOG.md"
83+
release_tag_pattern = "v{version}"
84+
85+
##########################################################
86+
# 11. Badges and Integrations (Optional)
87+
[badges]
88+
ci = "https://github.com/state-machines/state_machines-activemodel/actions/workflows/ruby.yml/badge.svg"
89+
coverage = ""
90+
license_badge = ""
91+
92+
##########################################################
93+
# 12. Optional Miscellaneous Fields
94+
chat = ""
95+
support = { type = "github", contact = "https://github.com/state-machines/state_machines-activemodel/issues" }
96+
apidocs = ""
97+
98+
##########################################################
99+
# 13. Environment and Runtime Info
100+
[environments]
101+
ruby = "3.1+"
102+
rails = "7.1+"
103+
104+
##########################################################
105+
# 15. Project Classification
106+
project_type = "library"
107+
maturity = "stable"
108+
audience = ["developers", "ruby-developers", "rails-developers"]
109+
110+
##########################################################
111+
# 16. Localization / Internationalization
112+
[i18n]
113+
default_locale = "en"
114+
supported_locales = ["en"]
115+
translation_files = "lib/state_machines/integrations/active_model/locale.rb"
116+
117+
##########################################################
118+
# 17. Contribution Automation
119+
[contribution_tooling]
120+
dependabot = false
121+
precommit_hooks = false
122+
ai_review = "disabled"
123+
codeowners = ""
124+
125+
##########################################################
126+
# 18. Security Scanning and SBOM
127+
[security]
128+
sbom = ""
129+
vulnerability_scanner = ""
130+
license_compliance_tool = ""
131+
132+
##########################################################
133+
# 19. Documentation Quality Flags
134+
[docs]
135+
coverage = 0
136+
style = ""
137+
ai_summary_enabled = false
138+
139+
##########################################################
140+
# 20. Submodules and Component References
141+
[dependencies]
142+
# Core dependency
143+
state_machines = ">= 0.31.0"
144+
activemodel = ">= 7.1"
145+
146+
[related_projects]
147+
# Other gems in the state_machines ecosystem
148+
state_machines = "https://github.com/state-machines/state_machines"
149+
state_machines-activerecord = "https://github.com/state-machines/state_machines-activerecord"
150+
state_machines-audit_trail = "https://github.com/state-machines/state_machines-audit_trail"
151+
state_machines-graphviz = "https://github.com/state-machines/state_machines-graphviz"
152+
state_machines-yard = "https://github.com/state-machines/state_machines-yard"
153+
154+
##########################################################
155+
# 21. Integration-Specific Information
156+
[activemodel_integration]
157+
features = [
158+
"state validations",
159+
"transition callbacks",
160+
"dirty attribute tracking",
161+
"i18n support",
162+
"mass assignment protection",
163+
"validation errors on invalid transitions",
164+
]
165+
tested_versions = ["7.1", "7.2", "8.0", "edge"]
166+
167+
##########################################################
168+
# 22. Testing Commands
169+
[testing]
170+
specific_file = "ruby -Itest test/path/to/test.rb"
171+
specific_test = "ruby -Itest test/path/to/test.rb:line_number"
172+
appraisal_setup = "appraisal install"
173+
rails_version_test = "appraisal rails-7-1 rake test"

0 commit comments

Comments
 (0)