factory_bot_rails 4.11.1 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 542cc50fa6c84e06f69ce225f5a2ccdd9b00e51e9406c8d0924e4a1a1283012a
4
- data.tar.gz: 9f9282517549bceb7dfab46f6b46190c715fec59827080981e31d7cae167d00f
3
+ metadata.gz: 1b742728304ad03cf96bd0894d77fc2e692bedd7577dab1c7758a0e7cc49fc6e
4
+ data.tar.gz: fa05b3990a3a3d0a819e3afc79bcc7eb218a3b54a4aa071f9e23b3018b349ffd
5
5
  SHA512:
6
- metadata.gz: 72c7160bdcd59e1e76c19aba443cfbeca65343565aa6a811ae42586fd9ac40cc84d08b43f9666c7457861a84f04d6511ba94606d20573b40ccbf22004234bf3d
7
- data.tar.gz: 1b042672955ce17426a880cd3391fb21a43222478009bd4d0c35e83761c367c7f6fff538f24b047f985063f949d6c3f474bba32ab94c0af01007cac907609415
6
+ metadata.gz: b99d122d606f1ff76388d3d617d600f78870c4cace484b26ddf69782ee4db752c75b168e2920d00d9b077123fbdabeb82984dbf241aa2fc18555d32f313d9e85
7
+ data.tar.gz: afb2e89740609a4f49765a937f54b8c47f4d569ce8d89f9c6ee2490d76ded24b69b07de95a5924c6afe41a9890d2905d1bc0ce96bd79d1a5a20bb17cd7243adf
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2013 Joe Ferris and thoughtbot, inc.
1
+ Copyright (c) 2008-2020 Joe Ferris and thoughtbot, inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/NEWS.md ADDED
@@ -0,0 +1,96 @@
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
+ ## 6.2.0 (May 7, 2021)
7
+
8
+ * Changed: factory\_bot dependency to ~> 6.2.0
9
+
10
+ ## 6.1.0 (July 8, 2020)
11
+
12
+ * Changed: factory\_bot dependency to ~> 6.1.0
13
+
14
+ ## 6.0.0 (June 18, 2020)
15
+
16
+ * Fixed: generate a plural factory name when the --force-plural flag is provided
17
+ * Changed: factory\_bot dependency to ~> 6.0.0
18
+ * Removed: `"factory_bot.register_reloader"` initializer, now registering the
19
+ reloader after application initialization
20
+ * Removed: support for EOL versions of Ruby (2.3, 2.4) and Rails (4.2)
21
+
22
+ ## 5.2.0 (April 26, 2020)
23
+
24
+ * Changed: factory\_bot dependency to ~> 5.2.0
25
+
26
+ ## 5.1.1 (September 24, 2019)
27
+
28
+ * Fixed: Ensure definitions do not load before I18n is initialized
29
+
30
+ ## 5.1.0 (September 24, 2019)
31
+
32
+ * Changed: factory\_bot dependency to ~> 5.1.0
33
+
34
+ ## 5.0.2 (April 14, 2019)
35
+
36
+ * Bugfix: Reload factory\_bot whenever the application changes to avoid holding
37
+ onto stale object references
38
+ * Bugfix: Avoid watching project root when no factory definitions exist
39
+
40
+ ## 5.0.1 (February 9, 2019)
41
+
42
+ * Bugfix: Avoid watching files and directories that don't exist (to avoid a
43
+ file watching bug in Rails https://github.com/rails/rails/issues/32700)
44
+
45
+ ## 5.0.0 (February 1, 2019)
46
+
47
+ * Added: calling reload! in the Rails console will reload any factory definition files that have changed
48
+ * Added: support for custom generator templates
49
+ * Added: `definition_file_paths` configuration option, making it easier to place factories in custom locations
50
+ * Changed: namespaced models are now generated inside a directory matching the namespace
51
+ * Changed: added newline between factories generated into the same file
52
+ * Removed: support for EOL version of Ruby and Rails
53
+
54
+ ## 4.11.1 (September 7, 2018)
55
+
56
+ * Update generator to use dynamic attributes instead of deprecated static attributes
57
+
58
+ ## 4.11.0 (August 16, 2018)
59
+
60
+ * No notable changes
61
+
62
+ ## 4.10.0 (May 25, 2018)
63
+
64
+ * No notable changes
65
+
66
+ ## 4.8.2 (October 20, 2017)
67
+
68
+ * Rename factory\_girl\_rails to factory\_bot\_rails
69
+
70
+ ## 4.7.0 (April 1, 2016)
71
+
72
+ * No notable changes
73
+
74
+ ## 4.6.0 (February 1, 2016)
75
+
76
+ * No notable changes
77
+
78
+ ## 4.5.0 (October 17, 2014)
79
+
80
+ * Improved README
81
+
82
+ ## 4.4.1 (February 26, 2014)
83
+
84
+ * Support Spring
85
+
86
+ ## 4.2.1 (February 8, 2013)
87
+
88
+ * Fix bug when configuring FG and RSpec fixture directory
89
+ * Remove debugging
90
+ * Require factory\_girl\_rails explicitly in generator
91
+
92
+ ## 4.2.0 (January 25, 2013)
93
+
94
+ * Add appraisal and get test suite working reliably with turn gem
95
+ * Support MiniTest
96
+ * Allow a custom directory for factories to be specified
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # factory_bot_rails [![Build Status][ci-image]][ci] [![Code Climate][grade-image]][grade] [![Gem Version][version-image]][version] [![Reviewed by Hound][hound-image]][hound]
1
+ # factory_bot_rails [![Build Status][ci-image]][ci] [![Code Climate][grade-image]][grade] [![Gem Version][version-image]][version]
2
2
 
3
3
  [factory_bot][fb] is a fixtures replacement with a straightforward definition
4
4
  syntax, support for multiple build strategies (saved instances, unsaved
@@ -12,9 +12,7 @@ Check out the [guide](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stabl
12
12
 
13
13
  ## Rails
14
14
 
15
- factory_bot_rails provides Rails integration for [factory_bot][fb].
16
-
17
- Currently, automatic factory definition loading is the only Rails-specific feature.
15
+ factory\_bot\_rails provides Rails integration for [factory_bot][fb].
18
16
 
19
17
  Supported Rails versions are listed in [`Appraisals`](Appraisals). Supported
20
18
  Ruby versions are listed in [`.travis.yml`](.travis.yml).
@@ -29,7 +27,7 @@ Gem:
29
27
 
30
28
  ## Configuration
31
29
 
32
- Add `factory_bot_rails` to your Gemfile:
30
+ Add `factory_bot_rails` to your Gemfile in both the test and development groups:
33
31
 
34
32
  ```ruby
35
33
  group :development, :test do
@@ -37,9 +35,61 @@ group :development, :test do
37
35
  end
38
36
  ```
39
37
 
40
- Generators for factories will automatically substitute fixture (and maybe any other
41
- `fixture_replacement` you set). If you want to disable this feature, add the
42
- following to your application.rb file:
38
+ You may want to configure your test suite to include factory\_bot methods; see
39
+ [configuration](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#configure-your-test-suite).
40
+
41
+ ### Automatic Factory Definition Loading
42
+
43
+ By default, factory\_bot\_rails will automatically load factories
44
+ defined in the following locations,
45
+ relative to the root of the Rails project:
46
+
47
+ ```
48
+ factories.rb
49
+ test/factories.rb
50
+ spec/factories.rb
51
+ factories/*.rb
52
+ test/factories/*.rb
53
+ spec/factories/*.rb
54
+ ```
55
+
56
+ You can configure by adding the following to `config/application.rb` or the
57
+ appropriate environment configuration in `config/environments`:
58
+
59
+ ```ruby
60
+ config.factory_bot.definition_file_paths = ["custom/factories"]
61
+ ```
62
+
63
+ This will cause factory\_bot\_rails to automatically load factories in
64
+ `custom/factories.rb` and `custom/factories/*.rb`.
65
+
66
+ It is possible to use this setting to share factories from a gem:
67
+
68
+ ```rb
69
+ begin
70
+ require 'factory_bot_rails'
71
+ rescue LoadError
72
+ end
73
+
74
+ class MyEngine < ::Rails::Engine
75
+ config.factory_bot.definition_file_paths +=
76
+ [File.expand_path('../factories', __FILE__)] if defined?(FactoryBotRails)
77
+ end
78
+ ```
79
+
80
+ You can also disable automatic factory definition loading entirely by
81
+ using an empty array:
82
+
83
+ ```rb
84
+ config.factory_bot.definition_file_paths = []
85
+ ```
86
+
87
+ ### Generators
88
+
89
+ Including factory\_bot\_rails in the development group of your Gemfile
90
+ will cause Rails to generate factories instead of fixtures.
91
+ If you want to disable this feature, you can either move factory\_bot\_rails out
92
+ of the development group of your Gemfile, or add the following configuration:
43
93
 
44
94
  ```ruby
45
95
  config.generators do |g|
@@ -47,8 +97,15 @@ config.generators do |g|
47
97
  end
48
98
  ```
49
99
 
50
- Default factories directory is `test/factories`, or `spec/factories` if
51
- `test_framework` generator is set to `:rspec`; change this behavior with:
100
+ If fixture replacement is enabled and you already have a `test/factories.rb`
101
+ file (or `spec/factories.rb` if using rspec_rails), generated factories will be
102
+ inserted at the top of the existing file.
103
+ Otherwise, factories will be generated in the
104
+ `test/factories` directory (`spec/factories` if using rspec_rails),
105
+ in a file matching the name of the table (e.g. `test/factories/users.rb`).
106
+
107
+ To generate factories in a different directory, you can use the following
108
+ configuration:
52
109
 
53
110
  ```ruby
54
111
  config.generators do |g|
@@ -56,38 +113,55 @@ config.generators do |g|
56
113
  end
57
114
  ```
58
115
 
59
- If you use factory_bot for fixture replacement, ensure that
60
- factory_bot_rails is available in the development group. If it's not, Rails
61
- will generate standard .yml files instead of factory files.
116
+ Note that factory\_bot\_rails will not automatically load files in custom
117
+ locations unless you add them to `config.factory_bot.definition_file_paths` as
118
+ well.
119
+
120
+ The suffix option allows you to customize the name of the generated file with a
121
+ suffix:
122
+
123
+ ```ruby
124
+ config.generators do |g|
125
+ g.factory_bot suffix: "factory"
126
+ end
127
+ ```
128
+
129
+ This will generate `test/factories/users_factory.rb` instead of
130
+ `test/factories/users.rb`.
62
131
 
63
- factory_bot takes an option `suffix: 'some_suffix'` to generate factories as
64
- `modelname_some_suffix.rb`.
132
+ For even more customization, use the `filename_proc` option:
65
133
 
66
- If you use factory_bot for fixture replacement and already have a
67
- `factories.rb` file in the directory that contains your tests,
68
- factory_bot_rails will insert new factory definitions at the top of
69
- `factories.rb`.
134
+ ```ruby
135
+ config.generators do |g|
136
+ g.factory_bot filename_proc: ->(table_name) { "prefix_#{table_name}_suffix" }
137
+ end
138
+ ```
70
139
 
71
- You may need to configure your test suite to include factory_bot methods; see
72
- [configuration](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#configure-your-test-suite).
140
+ To override the [default factory template][], define your own template in
141
+ `lib/templates/factory_bot/model/factories.erb`. This template will have
142
+ access to any methods available in `FactoryBot::Generators::ModelGenerator`.
143
+ Note that factory\_bot\_rails will only use this custom template if you are
144
+ generating each factory in a separate file; it will have no effect if you are
145
+ generating all of your factories in `test/factories.rb` or `spec/factories.rb`.
146
+
147
+ [default factory template]: https://github.com/thoughtbot/factory_bot_rails/tree/master/lib/generators/factory_bot/model/templates/factories.erb
73
148
 
74
149
  ## Contributing
75
150
 
76
151
  Please see [CONTRIBUTING.md](CONTRIBUTING.md).
77
152
 
78
- factory_bot_rails was originally written by Joe Ferris and is now maintained by Josh
79
- Clayton. Many improvements and bugfixes were contributed by the [open source
153
+ factory_bot_rails was originally written by Joe Ferris and is maintained by thoughtbot. Many improvements and bugfixes were contributed by the [open source
80
154
  community](https://github.com/thoughtbot/factory_bot_rails/graphs/contributors).
81
155
 
82
156
  ## License
83
157
 
84
- factory_bot_rails is Copyright © 2008-2016 Joe Ferris and thoughtbot. It is free
158
+ factory_bot_rails is Copyright © 2008-2020 Joe Ferris and thoughtbot. It is free
85
159
  software, and may be redistributed under the terms specified in the
86
160
  [LICENSE](LICENSE) file.
87
161
 
88
162
  ## About thoughtbot
89
163
 
90
- ![thoughtbot](https://thoughtbot.com/logo.png)
164
+ ![thoughtbot](https://thoughtbot.com/brand_assets/93:44.svg)
91
165
 
92
166
  factory_bot_rails is maintained and funded by thoughtbot, inc.
93
167
  The names and logos for thoughtbot are trademarks of thoughtbot, inc.
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FactoryBotRails
4
+ class DefinitionFilePaths
5
+ def initialize(definition_file_paths)
6
+ @files = []
7
+ @directories = {}
8
+
9
+ definition_file_paths.each do |path|
10
+ @files << "#{path}.rb"
11
+ @directories[path.to_s] = [:rb]
12
+ end
13
+ end
14
+
15
+ def directories
16
+ @directories.select { |path| Dir.exist?(path) }
17
+ end
18
+
19
+ def files
20
+ @files.select { |file| File.exist?(file) }
21
+ end
22
+
23
+ def any?
24
+ directories.any? || files.any?
25
+ end
26
+ end
27
+ end
@@ -1,15 +1,11 @@
1
- require 'factory_bot_rails/generators/rspec_generator'
2
- require 'factory_bot_rails/generators/non_rspec_generator'
3
- require 'factory_bot_rails/generators/null_generator'
1
+ require "factory_bot_rails/generators/rspec_generator"
2
+ require "factory_bot_rails/generators/non_rspec_generator"
3
+ require "factory_bot_rails/generators/null_generator"
4
4
 
5
5
  module FactoryBotRails
6
6
  class Generator
7
7
  def initialize(config)
8
- @generators = if config.respond_to?(:app_generators)
9
- config.app_generators
10
- else
11
- config.generators
12
- end
8
+ @generators = config.app_generators
13
9
  end
14
10
 
15
11
  def run
@@ -17,14 +13,12 @@ module FactoryBotRails
17
13
  end
18
14
 
19
15
  def generator
20
- if factory_bot_disabled?
21
- Generators::NullGenerator
16
+ return Generators::NullGenerator if factory_bot_disabled?
17
+
18
+ if test_framework == :rspec
19
+ Generators::RSpecGenerator
22
20
  else
23
- if test_framework == :rspec
24
- Generators::RSpecGenerator
25
- else
26
- Generators::NonRSpecGenerator
27
- end
21
+ Generators::NonRSpecGenerator
28
22
  end
29
23
  end
30
24
 
@@ -6,7 +6,11 @@ module FactoryBotRails
6
6
  end
7
7
 
8
8
  def run
9
- @generators.test_framework test_framework, fixture: false, fixture_replacement: :factory_bot
9
+ @generators.test_framework(
10
+ test_framework,
11
+ fixture: false,
12
+ fixture_replacement: :factory_bot
13
+ )
10
14
  end
11
15
 
12
16
  private
@@ -6,7 +6,10 @@ module FactoryBotRails
6
6
  end
7
7
 
8
8
  def run
9
- @generators.fixture_replacement fixture_replacement_setting, dir: factory_bot_directory
9
+ @generators.fixture_replacement(
10
+ fixture_replacement_setting,
11
+ dir: factory_bot_directory
12
+ )
10
13
  end
11
14
 
12
15
  private
@@ -16,7 +19,11 @@ module FactoryBotRails
16
19
  end
17
20
 
18
21
  def factory_bot_directory
19
- @generators.options.fetch(:factory_bot, {}).fetch(:dir, 'spec/factories')
22
+ factory_bot_options.fetch(:dir, "spec/factories")
23
+ end
24
+
25
+ def factory_bot_options
26
+ @generators.options.fetch(:factory_bot, {})
20
27
  end
21
28
  end
22
29
  end
@@ -1,27 +1,33 @@
1
- require 'factory_bot'
2
- require 'factory_bot_rails/generator'
3
- require 'rails'
1
+ # frozen_string_literal: true
4
2
 
5
- module FactoryBot
3
+ require "factory_bot"
4
+ require "factory_bot_rails/generator"
5
+ require "factory_bot_rails/reloader"
6
+ require "rails"
7
+
8
+ module FactoryBotRails
6
9
  class Railtie < Rails::Railtie
10
+ config.factory_bot = ActiveSupport::OrderedOptions.new
11
+ config.factory_bot.definition_file_paths = FactoryBot.definition_file_paths
7
12
 
8
13
  initializer "factory_bot.set_fixture_replacement" do
9
- FactoryBotRails::Generator.new(config).run
14
+ Generator.new(config).run
10
15
  end
11
16
 
12
17
  initializer "factory_bot.set_factory_paths" do
13
- FactoryBot.definition_file_paths = [
14
- Rails.root.join('factories'),
15
- Rails.root.join('test', 'factories'),
16
- Rails.root.join('spec', 'factories')
17
- ]
18
+ FactoryBot.definition_file_paths = definition_file_paths
18
19
  end
19
20
 
20
- config.after_initialize do
21
+ config.after_initialize do |app|
21
22
  FactoryBot.find_definitions
23
+ Reloader.new(app).run
24
+ end
25
+
26
+ private
22
27
 
23
- if defined?(Spring)
24
- Spring.after_fork { FactoryBot.reload }
28
+ def definition_file_paths
29
+ config.factory_bot.definition_file_paths.map do |path|
30
+ Rails.root.join(path)
25
31
  end
26
32
  end
27
33
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "factory_bot_rails/definition_file_paths"
4
+
5
+ module FactoryBotRails
6
+ class Reloader
7
+ def initialize(app)
8
+ @app = app
9
+ @paths = DefinitionFilePaths.new(FactoryBot.definition_file_paths)
10
+ end
11
+
12
+ def run
13
+ return unless @paths.any?
14
+
15
+ register_reloader(build_reloader)
16
+ end
17
+
18
+ private
19
+
20
+ attr_reader :app
21
+
22
+ def build_reloader
23
+ reloader_class.new(@paths.files, @paths.directories) do
24
+ FactoryBot.reload
25
+ end
26
+ end
27
+
28
+ def reloader_class
29
+ app.config.file_watcher
30
+ end
31
+
32
+ def register_reloader(reloader)
33
+ app.reloader.to_prepare do
34
+ reloader.execute
35
+ end
36
+
37
+ app.reloaders << reloader
38
+ end
39
+ end
40
+ end
@@ -1,4 +1,4 @@
1
- require 'factory_bot_rails/railtie'
1
+ require "factory_bot_rails/railtie"
2
2
 
3
3
  module FactoryBotRails
4
4
  end
@@ -1,5 +1,5 @@
1
- require 'generators/factory_bot'
2
- require 'factory_bot_rails'
1
+ require "generators/factory_bot"
2
+ require "factory_bot_rails"
3
3
 
4
4
  module FactoryBot
5
5
  module Generators
@@ -49,36 +49,30 @@ module FactoryBot
49
49
 
50
50
  def create_factory_file
51
51
  file = File.join(options[:dir], "#{filename}.rb")
52
- create_file(file, single_file_factory_definition)
52
+ template "factories.erb", file
53
53
  end
54
54
 
55
55
  def factory_definition
56
- <<-RUBY
57
- factory :#{singular_table_name}#{explicit_class_option} do
58
- #{factory_attributes.gsub(/^/, " ")}
59
- end
60
- RUBY
61
- end
56
+ <<~RUBY
57
+ factory :#{factory_name}#{explicit_class_option} do
58
+ #{factory_attributes.gsub(/^/, " ")}
59
+ end
62
60
 
63
- def single_file_factory_definition
64
- <<-RUBY
65
- FactoryBot.define do
66
- #{factory_definition.chomp}
67
- end
68
- RUBY
61
+ RUBY
69
62
  end
70
63
 
71
64
  def factory_attributes
72
- attributes.map do |attribute|
65
+ attributes.map { |attribute|
73
66
  "#{attribute.name} { #{attribute.default.inspect} }"
74
- end.join("\n")
67
+ }.join("\n")
75
68
  end
76
69
 
77
70
  def filename
78
71
  if factory_bot_options[:filename_proc].present?
79
72
  factory_bot_options[:filename_proc].call(table_name)
80
73
  else
81
- [table_name, filename_suffix].compact.join('_')
74
+ name = File.join(class_path, plural_name)
75
+ [name, filename_suffix].compact.join("_")
82
76
  end
83
77
  end
84
78
 
@@ -91,8 +85,7 @@ RUBY
91
85
  end
92
86
 
93
87
  def generators
94
- config = FactoryBot::Railtie.config
95
- config.respond_to?(:app_generators) ? config.app_generators : config.generators
88
+ FactoryBotRails::Railtie.config.app_generators
96
89
  end
97
90
  end
98
91
  end
@@ -0,0 +1,3 @@
1
+ FactoryBot.define do
2
+ <%= factory_definition.rstrip %>
3
+ end
@@ -1,14 +1,27 @@
1
- require 'rails/generators/named_base'
1
+ require "rails/generators/named_base"
2
2
 
3
3
  module FactoryBot
4
4
  module Generators
5
5
  class Base < Rails::Generators::NamedBase #:nodoc:
6
6
  def self.source_root
7
- @_factory_bot_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'factory_bot', generator_name, 'templates'))
7
+ path = File.join(
8
+ File.dirname(__FILE__),
9
+ "factory_bot",
10
+ generator_name,
11
+ "templates"
12
+ )
13
+
14
+ File.expand_path(path)
15
+ end
16
+
17
+ def factory_name
18
+ class_name.gsub("::", "").underscore
8
19
  end
9
20
 
10
21
  def explicit_class_option
11
- ", class: '#{class_name}'" unless class_name == singular_table_name.camelize
22
+ return if class_name.underscore == factory_name
23
+
24
+ ", class: '#{class_name}'"
12
25
  end
13
26
  end
14
27
  end
metadata CHANGED
@@ -1,47 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_bot_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.1
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Ferris
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-07 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: railties
14
+ name: factory_bot
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.0
19
+ version: 6.2.0
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: 3.0.0
26
+ version: 6.2.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: factory_bot
28
+ name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 4.11.1
33
+ version: 5.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 4.11.1
41
- description: |-
42
- factory_bot_rails provides integration between
43
- factory_bot and rails 3 or newer (currently just automatic factory definition
44
- loading)
40
+ version: 5.0.0
41
+ description: factory_bot_rails provides integration between factory_bot and rails
42
+ 5.0 or newer
45
43
  email: jferris@thoughtbot.com
46
44
  executables: []
47
45
  extensions: []
@@ -49,21 +47,24 @@ extra_rdoc_files: []
49
47
  files:
50
48
  - CONTRIBUTING.md
51
49
  - LICENSE
52
- - NEWS
50
+ - NEWS.md
53
51
  - README.md
54
52
  - lib/factory_bot_rails.rb
53
+ - lib/factory_bot_rails/definition_file_paths.rb
55
54
  - lib/factory_bot_rails/generator.rb
56
55
  - lib/factory_bot_rails/generators/non_rspec_generator.rb
57
56
  - lib/factory_bot_rails/generators/null_generator.rb
58
57
  - lib/factory_bot_rails/generators/rspec_generator.rb
59
58
  - lib/factory_bot_rails/railtie.rb
59
+ - lib/factory_bot_rails/reloader.rb
60
60
  - lib/generators/factory_bot.rb
61
61
  - lib/generators/factory_bot/model/model_generator.rb
62
+ - lib/generators/factory_bot/model/templates/factories.erb
62
63
  homepage: https://github.com/thoughtbot/factory_bot_rails
63
64
  licenses:
64
65
  - MIT
65
66
  metadata: {}
66
- post_install_message:
67
+ post_install_message:
67
68
  rdoc_options: []
68
69
  require_paths:
69
70
  - lib
@@ -78,10 +79,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  - !ruby/object:Gem::Version
79
80
  version: '0'
80
81
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.7.7
83
- signing_key:
82
+ rubygems_version: 3.1.6
83
+ signing_key:
84
84
  specification_version: 4
85
- summary: factory_bot_rails provides integration between factory_bot and rails 3 or
86
- newer
85
+ summary: factory_bot_rails provides integration between factory_bot and rails 5.0
86
+ or newer
87
87
  test_files: []
data/NEWS DELETED
@@ -1,36 +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
- 4.11.1 (September 7, 2018)
5
- Update generator to use dynamic attributes instead of deprecated static attributes
6
-
7
- 4.11.0 (August 16, 2018)
8
- No notable changes
9
-
10
- 4.10.0 (May 25, 2018)
11
- No notable changes
12
-
13
- 4.8.2 (October 20, 2017)
14
- Rename factory_girl_rails to factory_bot_rails
15
-
16
- 4.7.0 (April 1, 2016)
17
- No notable changes
18
-
19
- 4.6.0 (February 1, 2016)
20
- No notable changes
21
-
22
- 4.5.0 (October 17, 2014)
23
- Improved README
24
-
25
- 4.4.1 (February 26, 2014)
26
- Support Spring
27
-
28
- 4.2.1 (February 8, 2013)
29
- Fix bug when configuring FG and RSpec fixture directory
30
- Remove debugging
31
- Require factory_girl_rails explicitly in generator
32
-
33
- 4.2.0 (January 25, 2013)
34
- Add appraisal and get test suite working reliably with turn gem
35
- Support MiniTest
36
- Allow a custom directory for factories to be specified