factory_bot_rails 5.0.1 → 5.0.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 +55 -0
- data/README.md +1 -1
- data/lib/factory_bot_rails/definition_file_paths.rb +4 -0
- data/lib/factory_bot_rails/railtie.rb +1 -1
- data/lib/factory_bot_rails/reloader.rb +5 -4
- metadata +6 -6
- data/NEWS +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 466f6be061fddf98fe45e930a1f8e5a189a017b109c3223968bb4e2ddd43edeb
|
4
|
+
data.tar.gz: 1ab1fe5aadad14df70e8c4bc6b7619c42c35e7605f0f1d494cba0d092ce45a4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f9517a84f92413be3fe76ecd80397324d47abd850e1fa436c0d2f51b4b93e439d7dfc7c31880ada5b8389d2286162ef35b3f3d945d52ebf15166a58989b7f17
|
7
|
+
data.tar.gz: 7920fc8e7b62542f25c028ec64f2b9091c5128c38f2a7b596c182fd8a162d578872562f4cb1bed96e3c33989e4d5f3a1b737fc5de94eca06f3d6db030535f665
|
data/NEWS.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
factory_bot_rails versioning is synced with factory_bot releases. For this reason
|
2
|
+
there might not be any notable changes in new versions of this project.
|
3
|
+
|
4
|
+
# NEWS
|
5
|
+
|
6
|
+
## 5.0.2 (April 14, 2019)
|
7
|
+
* Bugfix: Reload factory\_bot whenever the application changes to avoid holding
|
8
|
+
onto stale object references
|
9
|
+
* Bugfix: Avoid watching project root when no factory definitions exist
|
10
|
+
|
11
|
+
## 5.0.1 (February 9, 2019)
|
12
|
+
* Bugfix: Avoid watching files and directories that don't exist (to avoid a
|
13
|
+
file watching bug in Rails https://github.com/rails/rails/issues/32700)
|
14
|
+
|
15
|
+
## 5.0.0 (February 1, 2019)
|
16
|
+
* Added: calling reload! in the Rails console will reload any factory definition files that have changed
|
17
|
+
* Added: support for custom generator templates
|
18
|
+
* Added: `definition_file_paths` configuration option, making it easier to place factories in custom locations
|
19
|
+
* Changed: namespaced models are now generated inside a directory matching the namespace
|
20
|
+
* Changed: added newline between factories generated into the same file
|
21
|
+
* Removed: support for EOL version of Ruby and Rails
|
22
|
+
|
23
|
+
## 4.11.1 (September 7, 2018)
|
24
|
+
* Update generator to use dynamic attributes instead of deprecated static attributes
|
25
|
+
|
26
|
+
## 4.11.0 (August 16, 2018)
|
27
|
+
* No notable changes
|
28
|
+
|
29
|
+
## 4.10.0 (May 25, 2018)
|
30
|
+
* No notable changes
|
31
|
+
|
32
|
+
## 4.8.2 (October 20, 2017)
|
33
|
+
* Rename factory\_girl\_rails to factory\_bot\_rails
|
34
|
+
|
35
|
+
## 4.7.0 (April 1, 2016)
|
36
|
+
* No notable changes
|
37
|
+
|
38
|
+
## 4.6.0 (February 1, 2016)
|
39
|
+
* No notable changes
|
40
|
+
|
41
|
+
## 4.5.0 (October 17, 2014)
|
42
|
+
* Improved README
|
43
|
+
|
44
|
+
## 4.4.1 (February 26, 2014)
|
45
|
+
* Support Spring
|
46
|
+
|
47
|
+
## 4.2.1 (February 8, 2013)
|
48
|
+
* Fix bug when configuring FG and RSpec fixture directory
|
49
|
+
* Remove debugging
|
50
|
+
* Require factory\_girl\_rails explicitly in generator
|
51
|
+
|
52
|
+
## 4.2.0 (January 25, 2013)
|
53
|
+
* Add appraisal and get test suite working reliably with turn gem
|
54
|
+
* Support MiniTest
|
55
|
+
* Allow a custom directory for factories to be specified
|
data/README.md
CHANGED
@@ -109,7 +109,7 @@ end
|
|
109
109
|
```
|
110
110
|
|
111
111
|
Note that factory\_bot\_rails will not automatically load files in custom
|
112
|
-
locations unless you add them to `config.factory_bot.
|
112
|
+
locations unless you add them to `config.factory_bot.definition_file_paths` as
|
113
113
|
well.
|
114
114
|
|
115
115
|
The suffix option allows you to customize the name of the generated file with a
|
@@ -7,9 +7,12 @@ module FactoryBotRails
|
|
7
7
|
def initialize(app, config)
|
8
8
|
@app = app
|
9
9
|
@config = config
|
10
|
+
@paths = DefinitionFilePaths.new(FactoryBot.definition_file_paths)
|
10
11
|
end
|
11
12
|
|
12
13
|
def run
|
14
|
+
return unless @paths.any?
|
15
|
+
|
13
16
|
register_reloader(build_reloader)
|
14
17
|
end
|
15
18
|
|
@@ -18,9 +21,7 @@ module FactoryBotRails
|
|
18
21
|
attr_reader :app, :config
|
19
22
|
|
20
23
|
def build_reloader
|
21
|
-
|
22
|
-
|
23
|
-
reloader_class.new(paths.files, paths.directories) do
|
24
|
+
reloader_class.new(@paths.files, @paths.directories) do
|
24
25
|
FactoryBot.reload
|
25
26
|
end
|
26
27
|
end
|
@@ -31,7 +32,7 @@ module FactoryBotRails
|
|
31
32
|
|
32
33
|
def register_reloader(reloader)
|
33
34
|
config.to_prepare do
|
34
|
-
reloader.
|
35
|
+
reloader.execute
|
35
36
|
end
|
36
37
|
|
37
38
|
app.reloaders << reloader
|
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: 5.0.
|
4
|
+
version: 5.0.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: 2019-
|
11
|
+
date: 2019-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: factory_bot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.
|
26
|
+
version: 5.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -47,7 +47,7 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- CONTRIBUTING.md
|
49
49
|
- LICENSE
|
50
|
-
- NEWS
|
50
|
+
- NEWS.md
|
51
51
|
- README.md
|
52
52
|
- lib/factory_bot_rails.rb
|
53
53
|
- lib/factory_bot_rails/definition_file_paths.rb
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
rubygems_version: 3.0.
|
82
|
+
rubygems_version: 3.0.3
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: factory_bot_rails provides integration between factory_bot and rails 4.2
|
data/NEWS
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
factory_bot_rails versioning is synced with factory_bot releases. For this reason
|
2
|
-
there might not be any notable changes in new versions of this project.
|
3
|
-
|
4
|
-
5.0.1
|
5
|
-
Bugfix: Avoid watching files and directories that don't exist (to avoid a
|
6
|
-
file watching bug in Rails https://github.com/rails/rails/issues/32700)
|
7
|
-
|
8
|
-
5.0.0
|
9
|
-
Added: calling reload! in the Rails console will reload any factory definition files that have changed
|
10
|
-
Added: support for custom generator templates
|
11
|
-
Added: definition_file_paths configuration option, making it easier to place factories in custom locations
|
12
|
-
Changed: namespaced models are now generated inside a directory matching the namespace
|
13
|
-
Changed: added newline between factories generated into the same file
|
14
|
-
Removed: support for EOL version of Ruby and Rails
|
15
|
-
|
16
|
-
4.11.1 (September 7, 2018)
|
17
|
-
Update generator to use dynamic attributes instead of deprecated static attributes
|
18
|
-
|
19
|
-
4.11.0 (August 16, 2018)
|
20
|
-
No notable changes
|
21
|
-
|
22
|
-
4.10.0 (May 25, 2018)
|
23
|
-
No notable changes
|
24
|
-
|
25
|
-
4.8.2 (October 20, 2017)
|
26
|
-
Rename factory_girl_rails to factory_bot_rails
|
27
|
-
|
28
|
-
4.7.0 (April 1, 2016)
|
29
|
-
No notable changes
|
30
|
-
|
31
|
-
4.6.0 (February 1, 2016)
|
32
|
-
No notable changes
|
33
|
-
|
34
|
-
4.5.0 (October 17, 2014)
|
35
|
-
Improved README
|
36
|
-
|
37
|
-
4.4.1 (February 26, 2014)
|
38
|
-
Support Spring
|
39
|
-
|
40
|
-
4.2.1 (February 8, 2013)
|
41
|
-
Fix bug when configuring FG and RSpec fixture directory
|
42
|
-
Remove debugging
|
43
|
-
Require factory_girl_rails explicitly in generator
|
44
|
-
|
45
|
-
4.2.0 (January 25, 2013)
|
46
|
-
Add appraisal and get test suite working reliably with turn gem
|
47
|
-
Support MiniTest
|
48
|
-
Allow a custom directory for factories to be specified
|