-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathchangelog.yml
140 lines (130 loc) · 4.92 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
- version: 0.13.0
date: 2025-01-21
added:
- |
Support for unique options in `fake` DSL (via #94) (@sean-dickinson)
```ruby
Factory.define(:user) do |f|
f.name { fake(:name, unique: true) }
end
```
Be advised there's `Faker::UniqueGenerator.clear` to clear the cache of unique values.
- |
Support for setting traits with a keyword argument for associations (via #84) (@parndt)
```ruby
Factory.define :category do |f|
f.association :image, traits: [:fancy]
end
```
- |
Aliases for factory methods (via #92) (@cflipse)
`Factory.create` is aliased to `Factory.[]`
`Factory.build` is aliased to `Factory.structs[]`
changed:
- Minimum Ruby version is now 3.1 (@flash-gordon)
- version: 0.12.0
date: 2024-01-19
added:
- "Support for many-to-many and one-to-one-through associations (via #86) (@solnic)"
- "Support for UUID as PKs in associations (via #87) (@solnic)"
fixed:
- "Relations without PKs should work too (via #87) (@solnic)"
- "Relations with PK values generated on the Ruby side should work in SQlite too (via #87) (@solnic)"
- version: 0.11.0
date: 2022-11-11
added:
- "Support for one-to-one associations (@ianks)"
- "[internal] cache for Faker constants (@flash-gordon)"
changed:
- |
[BREAKING] attributes are always passed as keywords (@alassek)
This may affect your code in places where attributes are passed as hashes.
Places like
```ruby
user_attributes = { name: 'Jane' }
Factory[:user, user_attributes]
```
must be updated to
```ruby
user_attributes = { name: 'Jane' }
Factory[:user, **user_attributes]
```
- "Upgraded to the latest versions of dry-rb dependencies, compatible with rom 5.3 (@flash-gordon)"
- Support for Faker 1.x was dropped (@alassek)
fixed:
- Support for plural Faker generators (@wuarmin)
- version: 0.10.2
date: "2020-04-05"
fixed:
- Fix more keyword warnings (@flash-gordon)
- version: 0.10.1
date: '2019-12-28'
added:
- 'Support for faker 2 (@ianks)'
fixed:
- Keyword warnings reported by Ruby 2.7 (@flash-gordon)
- version: 0.10.0
date: '2019-12-11'
added:
- |-
`struct_namespace` option is supported by factory builders (@graceful-potato)
``` ruby
factories.define(:user, struct_namespace: MyApp::Entities) do |f|
# ...
end
```
fixed:
- Support building structs when child assoc does not define parent (@psparrow)
- 'Fixed `TupleEvaluator#struct_attrs` for non-standard output schema (@AMHOL)'
- version: 0.9.1
date: '2019-10-23'
fixed:
- Attributes of a struct are no longer accidentally passed to their associations (@psparrow)
- version: 0.9.0
date: '2019-08-12'
added:
- 'When attributes hash includes unknown attributes, a `ROM::Factory::UnknownAttributeError` will be raised (@rawburt)'
- version: 0.8.0
date: '2019-04-24'
fixed:
- 'Loaded association structs are no longer rejected by output schemas (issue #34) (flash-gordon + solnic)'
- version: 0.7.0
date: '2018-11-17'
added:
- Support for traits (v-kolesnikov)
- Support building structs with associations (@ianks)
fixed:
- Overwritten attributes with dependencies (JanaVPetrova)
- version: 0.6.0
date: '2018-01-31'
added:
- Support for factories with custom struct namespaces (solnic)
changed:
- 'Accessing a factory which is not defined will result in `FactoryNotDefinedError` exception (GustavoCaso + solnic)'
fixed:
- 'Using dependent attributes with sequences works correctly, ie `f.sequence(:login) { |i, name| "name-#{i}"}` (solnic)'
- version: 0.5.0
date: '2017-10-24'
added:
- Updated to rom 4.0 (solnic)
- 'Support for `has_many` and `has_one` associations (solnic)'
- Support for attributes depending on values from other attributes (solnic)
- 'Support for `rand` inside the generator block (flash-gordon)'
changed:
- 'Depends on `rom-core` now (solnic)'
- version: 0.4.0
date: '2017-03-03'
summary: improves internals.
added:
- 'Support for defining multiple factories via `MyFactory = ROM::Factory.configure { |c| ... }` (solnic)'
- 'Support for builder inheritence via `define(admin: :user) { |f| ... }` (solnic)'
- 'Support for generating in-memory structs via `MyFactory.structs[:user]` that are not persisted (solnic)'
- 'Support for `belongs_to` associations via `f.association(:user)` (solnic)'
- 'New DSL for defining builders `MyFactory.define(:user) { |f| ... }` which infers default relation name (solnic)'
- 'New factory method `MyFactory#[]` ie `MyFactory[:user, name: "Jane"]` (solnic)'
- 'New `fake` helper which uses faker gem under the hood ie `f.email { fake(:internet, :email) }` (solnic)'
changed:
- "`Rom::Factory::Config.configure` was replaced with `ROM::Factory.configure` (solnic)"
- Global factory config and builders are gone (solnic)
- Structs are now based on dry-struct (solnic)