Skip to content

Commit

Permalink
Merge branch 'thoughtbot:main' into update-docs-for-specifying-namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpitchko authored Sep 21, 2024
2 parents 8926d33 + 59b7188 commit fbf0c92
Show file tree
Hide file tree
Showing 19 changed files with 739 additions and 457 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@ jobs:
- "6.1"
- "7.0"
- "7.1"
- "7.2"
- main
exclude:
- ruby: jruby-9.4
rails: "7.1"
- ruby: jruby-9.4
rails: "7.2"
- ruby: jruby-9.4
rails: main
# Rails >= 7.2 requires Ruby 3.1
- ruby: "3.0"
rails: "7.2"
- ruby: "3.0"
rails: "main"

runs-on: 'ubuntu-latest'

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/dynamic-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: update-security

on:
push:
paths:
- SECURITY.md
branches:
- main
workflow_dispatch:

jobs:
update-security:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-security.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 10 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
appraise "6.1" do
gem "activerecord", "~> 6.1.0"
gem "activerecord-jdbcsqlite3-adapter", "~> 61.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
gem "sqlite3", "~> 1.4", platforms: [:ruby]
end

appraise "7.0" do
gem "activerecord", "~> 7.0.0"
gem "activerecord-jdbcsqlite3-adapter", "~> 70.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
gem "sqlite3", "~> 1.4", platforms: [:ruby]
end

appraise "7.1" do
gem "activerecord", "~> 7.1.0"
# When version 71 is released, uncomment this and also allow it in the GitHub
# Action build workflow.
# gem "activerecord-jdbcsqlite3-adapter", "~> 71.0", platforms: [:jruby]
gem "sqlite3", "~> 1.4", platforms: [:ruby]
end

appraise "7.2" do
gem "activerecord", "~> 7.2.0"
# When version 71 is released, uncomment this and also allow it in the GitHub
# Action build workflow.
# gem "activerecord-jdbcsqlite3-adapter", "~> 71.0", platforms: [:jruby]
gem "sqlite3", platforms: [:ruby]
end

Expand Down
207 changes: 105 additions & 102 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,155 +1,158 @@
PATH
remote: .
specs:
factory_bot (6.4.6)
factory_bot (6.5.0)
activesupport (>= 5.0.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (6.1.3)
activesupport (= 6.1.3)
activerecord (6.1.3)
activemodel (= 6.1.3)
activesupport (= 6.1.3)
activesupport (6.1.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
activemodel (7.2.0)
activesupport (= 7.2.0)
activerecord (7.2.0)
activemodel (= 7.2.0)
activesupport (= 7.2.0)
timeout (>= 0.4.0)
activesupport (7.2.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
appraisal (2.3.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
aruba (1.0.4)
childprocess (>= 2.0, < 5.0)
contracts (~> 0.16.0)
cucumber (>= 2.4, < 6.0)
aruba (2.2.0)
bundler (>= 1.17, < 3.0)
contracts (>= 0.16.0, < 0.18.0)
cucumber (>= 8.0, < 10.0)
rspec-expectations (~> 3.4)
thor (~> 1.0)
ast (2.4.2)
builder (3.2.4)
childprocess (4.0.0)
concurrent-ruby (1.1.8)
contracts (0.16.0)
cucumber (5.3.0)
builder (~> 3.2, >= 3.2.4)
cucumber-core (~> 8.0, >= 8.0.1)
cucumber-create-meta (~> 2.0, >= 2.0.2)
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
cucumber-gherkin (~> 15.0, >= 15.0.2)
cucumber-html-formatter (~> 9.0, >= 9.0.0)
cucumber-messages (~> 13.1, >= 13.1.0)
cucumber-wire (~> 4.0, >= 4.0.1)
diff-lcs (~> 1.4, >= 1.4.4)
multi_test (~> 0.1, >= 0.1.2)
sys-uname (~> 1.2, >= 1.2.1)
cucumber-core (8.0.1)
cucumber-gherkin (~> 15.0, >= 15.0.2)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
cucumber-create-meta (2.0.4)
cucumber-messages (~> 13.1, >= 13.1.0)
sys-uname (~> 1.2, >= 1.2.1)
cucumber-cucumber-expressions (10.3.0)
cucumber-gherkin (15.0.2)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-html-formatter (9.0.0)
cucumber-messages (~> 13.0, >= 13.0.1)
cucumber-messages (13.2.1)
protobuf-cucumber (~> 3.10, >= 3.10.8)
cucumber-tag-expressions (2.0.4)
cucumber-wire (4.0.1)
cucumber-core (~> 8.0, >= 8.0.1)
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
cucumber-messages (~> 13.0, >= 13.0.1)
diff-lcs (1.4.4)
docile (1.3.5)
ffi (1.14.2)
i18n (1.8.9)
base64 (0.2.0)
bigdecimal (3.1.8)
builder (3.3.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
contracts (0.17)
cucumber (9.2.0)
builder (~> 3.2)
cucumber-ci-environment (> 9, < 11)
cucumber-core (> 13, < 14)
cucumber-cucumber-expressions (~> 17.0)
cucumber-gherkin (> 24, < 28)
cucumber-html-formatter (> 20.3, < 22)
cucumber-messages (> 19, < 25)
diff-lcs (~> 1.5)
mini_mime (~> 1.1)
multi_test (~> 1.1)
sys-uname (~> 1.2)
cucumber-ci-environment (10.0.1)
cucumber-core (13.0.3)
cucumber-gherkin (>= 27, < 28)
cucumber-messages (>= 20, < 23)
cucumber-tag-expressions (> 5, < 7)
cucumber-cucumber-expressions (17.1.0)
bigdecimal
cucumber-gherkin (27.0.0)
cucumber-messages (>= 19.1.4, < 23)
cucumber-html-formatter (21.7.0)
cucumber-messages (> 19, < 27)
cucumber-messages (22.0.0)
cucumber-tag-expressions (6.1.0)
diff-lcs (1.5.1)
docile (1.4.1)
drb (2.2.1)
ffi (1.17.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
json (2.7.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
middleware (0.1.0)
minitest (5.14.3)
multi_test (0.1.2)
parallel (1.24.0)
parser (3.3.0.5)
logger (1.6.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
multi_test (1.1.0)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
protobuf-cucumber (3.10.8)
activesupport (>= 3.2)
middleware
thor
thread_safe
racc (1.7.3)
racc (1.8.1)
rainbow (3.1.1)
rake (13.0.3)
regexp_parser (2.9.0)
rexml (3.2.6)
rspec (3.10.0)
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.6)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (~> 3.13.0)
rspec-its (1.3.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.10.2)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rubocop (1.60.2)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.65.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-performance (1.20.2)
rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
simplecov (0.21.2)
securerandom (0.3.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
sqlite3 (1.4.2)
standard (1.34.0)
simplecov_json_formatter (0.1.4)
sqlite3 (2.0.3)
mini_portile2 (~> 2.8.0)
standard (1.40.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.60)
rubocop (~> 1.65.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.3)
standard-performance (~> 1.4)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.3.1)
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.20.2)
sys-uname (1.2.2)
rubocop-performance (~> 1.21.0)
strscan (3.1.0)
sys-uname (1.3.0)
ffi (~> 1.1)
thor (1.1.0)
thread_safe (0.3.6)
tzinfo (2.0.4)
thor (1.3.1)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
yard (0.9.26)
zeitwerk (2.4.2)
yard (0.9.36)

PLATFORMS
ruby
Expand All @@ -170,4 +173,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.3.25
2.5.18
18 changes: 18 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# News

## 6.5.0 (September 6, 2024)

* fix: issue 1621 broken links in ref/factory.md by @elasticspoon in https://github.com/thoughtbot/factory_bot/pull/1623
* Add standard settings by @ydah in https://github.com/thoughtbot/factory_bot/pull/1625
* Call dynamic-readme reusable workflow by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1628
* Update README again by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1630
* Only run this workflow if the README has been updated by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1635
* Automatically Generated: Update Dynamic Section in README by @github-actions in https://github.com/thoughtbot/factory_bot/pull/1637
* Added a case for build_class to handle class names with underscores passed as a string by @m-gizzi in https://github.com/thoughtbot/factory_bot/pull/1642
* Add Ruby 3.3 to CI by @berkos in https://github.com/thoughtbot/factory_bot/pull/1615
* Update Dependabot configuration by @smaboshe in https://github.com/thoughtbot/factory_bot/pull/1655
* Add new maintainers to CODEOWNERS by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1651
* Improve docs formatting and fix filename conflicts by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1666
* Add a dynamic security workflow and a SECURITY.md file by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1677
* Automatically Generated: Update Dynamic Section in SECURITY by @github-actions in https://github.com/thoughtbot/factory_bot/pull/1678
* Ensure rails 7.2 compatibility by @Earlopain in https://github.com/thoughtbot/factory_bot/pull/1686
* Fix the factory definition in traits documentation by @ddieulivol in https://github.com/thoughtbot/factory_bot/pull/1688

## 6.4.6 (January 30, 2023)

* Fix: Bump minimum required Ruby in gemspec (Earlopain).
Expand Down
19 changes: 19 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- START /templates/security.md -->
# Security Policy

## Supported Versions

Only the the latest version of this project is supported at a given time. If
you find a security issue with an older version, please try updating to the
latest version first.

If for some reason you can't update to the latest version, please let us know
your reasons so that we can have a better understanding of your situation.

## Reporting a Vulnerability

For security inquiries or vulnerability reports, visit
<https://thoughtbot.com/security>.

If you have any suggestions to improve this policy, visit <https://thoughtbot.com/security>.
<!-- END /templates/security.md -->
5 changes: 5 additions & 0 deletions docs/src/traits/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ the "Building or Creating Multiple Records" section of this file.
factory :user do
name { "Friendly User" }

trait :active do
name { "John Doe" }
status { :active }
end

trait :admin do
admin { true }
end
Expand Down
Loading

0 comments on commit fbf0c92

Please sign in to comment.