factory_bot 6.4.6 → 6.5.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: 3a7ebed6c784cdfb3ea79c03d84a65a36727a1410365921f559f342810c3302d
4
- data.tar.gz: 5b3c7a8d107633fa5025cbd3c1d5e3fceac5ba53a820a17328be22ca1aa80f8c
3
+ metadata.gz: 44611a193b219b270cd43b7a8587718ff190b3c63162c17f02288afc362a37e9
4
+ data.tar.gz: a1a3d3ce45776e1d8d228f113af1c101a64090fde8f19a46321d40bec3df0e48
5
5
  SHA512:
6
- metadata.gz: 0d067eb0c20f31211b496b34c6470df84d31a3db63d7e6b9f7f051ed890669c8220224dfb5451d13397c0b24a395ff032cb2e1be05b15f0ef13fd034293878cd
7
- data.tar.gz: 988911756ac353fb3db10d73280b1acdb07618166e7fdec256601dd1051c2a15200c47ecbd18490253d76abc2bf46b3652c9c7f8aee47816210e3c3ee2d93b30
6
+ metadata.gz: 2e65a906e197e8e9f268440ba3ffbc0a717b211420419f0ce0f9ff0a5b5e90413d4a76b829f45fe4746541aae91869afdee8975b3171841c4655d6627979aa2b
7
+ data.tar.gz: 400e0cb1dab0994f26a46674a5d7f0cb6dc89a95815faab5da8838f732c9e6ac92fac6af17270ce4aaba3f84cdcbfcf96361021a7671a37e33a9d27e77cb652b
data/NEWS.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # News
2
2
 
3
+ ## 6.5.0 (September 6, 2024)
4
+
5
+ * fix: issue 1621 broken links in ref/factory.md by @elasticspoon in https://github.com/thoughtbot/factory_bot/pull/1623
6
+ * Add standard settings by @ydah in https://github.com/thoughtbot/factory_bot/pull/1625
7
+ * Call dynamic-readme reusable workflow by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1628
8
+ * Update README again by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1630
9
+ * Only run this workflow if the README has been updated by @stefannibrasil in https://github.com/thoughtbot/factory_bot/pull/1635
10
+ * Automatically Generated: Update Dynamic Section in README by @github-actions in https://github.com/thoughtbot/factory_bot/pull/1637
11
+ * Added a case for build_class to handle class names with underscores passed as a string by @m-gizzi in https://github.com/thoughtbot/factory_bot/pull/1642
12
+ * Add Ruby 3.3 to CI by @berkos in https://github.com/thoughtbot/factory_bot/pull/1615
13
+ * Update Dependabot configuration by @smaboshe in https://github.com/thoughtbot/factory_bot/pull/1655
14
+ * Add new maintainers to CODEOWNERS by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1651
15
+ * Improve docs formatting and fix filename conflicts by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1666
16
+ * Add a dynamic security workflow and a SECURITY.md file by @sarahraqueld in https://github.com/thoughtbot/factory_bot/pull/1677
17
+ * Automatically Generated: Update Dynamic Section in SECURITY by @github-actions in https://github.com/thoughtbot/factory_bot/pull/1678
18
+ * Ensure rails 7.2 compatibility by @Earlopain in https://github.com/thoughtbot/factory_bot/pull/1686
19
+ * Fix the factory definition in traits documentation by @ddieulivol in https://github.com/thoughtbot/factory_bot/pull/1688
20
+
3
21
  ## 6.4.6 (January 30, 2023)
4
22
 
5
23
  * Fix: Bump minimum required Ruby in gemspec (Earlopain).
data/README.md CHANGED
@@ -75,27 +75,30 @@ community](https://github.com/thoughtbot/factory_bot/graphs/contributors).
75
75
  License
76
76
  -------
77
77
 
78
- factory_bot is Copyright © 2008-2022 Joe Ferris and thoughtbot. It is free
78
+ factory_bot is Copyright © 2008 Joe Ferris and thoughtbot. It is free
79
79
  software, and may be redistributed under the terms specified in the
80
80
  [LICENSE] file.
81
81
 
82
82
  [LICENSE]: https://github.com/thoughtbot/factory_bot/blob/main/LICENSE
83
83
 
84
+ <!-- START /templates/footer.md -->
85
+ ## About thoughtbot
84
86
 
85
- About thoughtbot
86
- ----------------
87
-
88
- ![thoughtbot](https://thoughtbot.com/brand_assets/93:44.svg)
87
+ ![thoughtbot](https://thoughtbot.com/thoughtbot-logo-for-readmes.svg)
89
88
 
90
- factory_bot is maintained and funded by thoughtbot, inc.
89
+ This repo is maintained and funded by thoughtbot, inc.
91
90
  The names and logos for thoughtbot are trademarks of thoughtbot, inc.
92
91
 
93
92
  We love open source software!
94
- See [our other projects][community] or
95
- [hire us][hire] to design, develop, and grow your product.
93
+ See [our other projects][community].
94
+ We are [available for hire][hire].
96
95
 
97
96
  [community]: https://thoughtbot.com/community?utm_source=github
98
97
  [hire]: https://thoughtbot.com/hire-us?utm_source=github
98
+
99
+
100
+ <!-- END /templates/footer.md -->
101
+
99
102
  [ci-image]: https://github.com/thoughtbot/factory_bot/actions/workflows/build.yml/badge.svg?branch=main
100
103
  [ci]: https://github.com/thoughtbot/factory_bot/actions?query=workflow%3ABuild+branch%3Amain
101
104
  [grade-image]: https://codeclimate.com/github/thoughtbot/factory_bot/badges/gpa.svg
@@ -13,7 +13,7 @@ module FactoryBot
13
13
  @evaluator.instance = build_class_instance
14
14
  build_class_instance.tap do |instance|
15
15
  attributes_to_set_on_instance.each do |attribute|
16
- instance.public_send("#{attribute}=", get(attribute))
16
+ instance.public_send(:"#{attribute}=", get(attribute))
17
17
  @attribute_names_assigned << attribute
18
18
  end
19
19
  end
@@ -22,6 +22,8 @@ module FactoryBot
22
22
  def build_class
23
23
  @build_class ||= if class_name.is_a? Class
24
24
  class_name
25
+ elsif class_name.to_s.safe_constantize
26
+ class_name.to_s.safe_constantize
25
27
  else
26
28
  class_name.to_s.camelize.constantize
27
29
  end
@@ -1,3 +1,3 @@
1
1
  module FactoryBot
2
- VERSION = "6.4.6".freeze
2
+ VERSION = "6.5.0".freeze
3
3
  end
data/lib/factory_bot.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "set"
2
+ require "active_support"
2
3
  require "active_support/core_ext/module/delegation"
3
4
  require "active_support/core_ext/module/attribute_accessors"
4
5
  require "active_support/deprecation"
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: 6.4.6
4
+ version: 6.5.0
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: 2024-01-30 00:00:00.000000000 Z
12
+ date: 2024-09-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -253,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
253
  - !ruby/object:Gem::Version
254
254
  version: '0'
255
255
  requirements: []
256
- rubygems_version: 3.4.10
256
+ rubygems_version: 3.5.18
257
257
  signing_key:
258
258
  specification_version: 4
259
259
  summary: factory_bot provides a framework and DSL for defining and using model instance