factory_bot_rails 6.4.0 → 6.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +7 -0
- data/README.md +2 -2
- data/lib/factory_bot_rails/railtie.rb +7 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4a9a114b3d5f63d0083ef6990ac113e593ff67c19866fce133ecfc0423dd653
|
4
|
+
data.tar.gz: 3e8a9c7450996d67fa4f45b7ee949348c261319c7195e01a3a08aaa9ae3bcdfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c0a4cfe2745a02a9b2b1f8192286db492fc6e0bf850478c456f0b3863cdaecc9901dafc200201e75bc5dbb9bab429fdf3f9705ceb0d4ed7bd5a6758b4805f3f
|
7
|
+
data.tar.gz: 957f01135a351596d8221148bca75b61500518fc71f734454cf3051933ccd1f08f1b361de768bc73dd77105e09b747283617bc02f04e33944e02c97415f7beb3
|
data/NEWS.md
CHANGED
@@ -3,6 +3,13 @@ there might not be any notable changes in new versions of this project.
|
|
3
3
|
|
4
4
|
# NEWS
|
5
5
|
|
6
|
+
## 6.4.2 (November 23, 2023)
|
7
|
+
* Fixed: Fix Rails 7.1.2 + monkey-patched ActiveRecord compatibility (Adif
|
8
|
+
Sgaid, Benoit Tigeot)
|
9
|
+
* Internal: Test against Rails 7.1 (y-yagi)
|
10
|
+
* Internal: Fix links to old files after renaming the main branch to `main`
|
11
|
+
(y-yagi)
|
12
|
+
|
6
13
|
## 6.4.0 (November 17, 2023)
|
7
14
|
|
8
15
|
* Releasing this for consistency with the factory\_bot dependency.
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ end
|
|
36
36
|
```
|
37
37
|
|
38
38
|
You may want to configure your test suite to include factory\_bot methods; see
|
39
|
-
[configuration](https://github.com/thoughtbot/factory_bot/blob/
|
39
|
+
[configuration](https://github.com/thoughtbot/factory_bot/blob/main/GETTING_STARTED.md#configure-your-test-suite).
|
40
40
|
|
41
41
|
### Automatic Factory Definition Loading
|
42
42
|
|
@@ -150,7 +150,7 @@ Factory\_bot\_rails will add a custom generator:
|
|
150
150
|
rails generate factory_bot:model NAME [field:type field:type] [options]
|
151
151
|
```
|
152
152
|
|
153
|
-
[default factory template]: https://github.com/thoughtbot/factory_bot_rails/tree/
|
153
|
+
[default factory template]: https://github.com/thoughtbot/factory_bot_rails/tree/main/lib/generators/factory_bot/model/templates/factories.erb
|
154
154
|
|
155
155
|
### Active Record Configuration
|
156
156
|
|
@@ -21,13 +21,15 @@ module FactoryBotRails
|
|
21
21
|
FactoryBot.definition_file_paths = definition_file_paths
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
initializer "factory_bot.reject_primary_key_attributes" do
|
25
|
+
ActiveSupport.on_load :active_record do
|
26
|
+
config = Rails.configuration.factory_bot
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
if config.reject_primary_key_attributes
|
29
|
+
require "factory_bot_rails/factory_validator/active_record_validator"
|
29
30
|
|
30
|
-
|
31
|
+
config.validator.add_validator FactoryValidator::ActiveRecordValidator.new
|
32
|
+
end
|
31
33
|
end
|
32
34
|
end
|
33
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_bot_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.4.
|
4
|
+
version: 6.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Ferris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: factory_bot
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
|
-
rubygems_version: 3.4.
|
113
|
+
rubygems_version: 3.4.13
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: factory_bot_rails provides integration between factory_bot and rails 5.0
|