factory_bot 5.1.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +4 -0
- data/lib/factory_bot/definition.rb +3 -1
- data/lib/factory_bot/internal.rb +1 -1
- data/lib/factory_bot/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d19c695ef0088d163b82c6b32066d4385d4be7fb8c0dc0b29c350d2e2187f2d
|
4
|
+
data.tar.gz: 55270eb96b553aa9b0c186bc7eeaf9d084fc79252b7fb8443d6276b1865168cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d61c40f944ae69e27a32e0992d8c289e9d0d9d5a48efe2998b8c53eca17be8a3591f886762866155032662e0eb32a4d52f342cfc1c88b22e637cab3d6e999f81
|
7
|
+
data.tar.gz: 2aa21a35633016a9e9871c9e56782af137a209ad1c155d51d768ba129d5dea016c54f9d1186191d2ed24e616f5d6516b78698488b8ee536fd929e28c7055ff1f
|
data/NEWS.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 5.1.1 (October 2, 2019)
|
4
|
+
* Improved: performance of traits
|
5
|
+
* Fixed: registering strategies on JRuby
|
6
|
+
|
3
7
|
## 5.1.0 (September 21, 2019)
|
4
8
|
* Added: "Did you mean?" style error message to help with typos in association declarations
|
5
9
|
* Changed: `NoMethodError` for static attributes now offers a "Did you mean?" style message
|
@@ -115,13 +115,15 @@ module FactoryBot
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def trait_for(name)
|
118
|
-
defined_traits.
|
118
|
+
@defined_traits_by_name ||= defined_traits.each_with_object({}) { |t, memo| memo[t.name] ||= t }
|
119
|
+
@defined_traits_by_name[name.to_s]
|
119
120
|
end
|
120
121
|
|
121
122
|
def initialize_copy(source)
|
122
123
|
super
|
123
124
|
@attributes = nil
|
124
125
|
@compiled = false
|
126
|
+
@defined_traits_by_name = nil
|
125
127
|
end
|
126
128
|
|
127
129
|
def aggregate_from_traits_and_self(method_name, &block)
|
data/lib/factory_bot/internal.rb
CHANGED
data/lib/factory_bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Clayton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -151,20 +151,6 @@ dependencies:
|
|
151
151
|
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
|
-
- !ruby/object:Gem::Dependency
|
155
|
-
name: sqlite3
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
157
|
-
requirements:
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: '0'
|
161
|
-
type: :development
|
162
|
-
prerelease: false
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
164
|
-
requirements:
|
165
|
-
- - ">="
|
166
|
-
- !ruby/object:Gem::Version
|
167
|
-
version: '0'
|
168
154
|
- !ruby/object:Gem::Dependency
|
169
155
|
name: yard
|
170
156
|
requirement: !ruby/object:Gem::Requirement
|