factory_bot 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ae3cef3f2df889e63bd9eb74cd8cff214994748287c73c2ada84e7983d4fe3f
4
- data.tar.gz: 3b5f5e43645af018b65fe78e9ede19544976daac161272310c865b2d6d7df365
3
+ metadata.gz: c8a85e57f19a64402fd04363e3860ece58e6d1b5196cde075cf47973a15cda8a
4
+ data.tar.gz: 4fb7243c9259094b83de12be38b27bd58d5cdaaec3d13796d07593c0f3846084
5
5
  SHA512:
6
- metadata.gz: b7c1c0dfeadb5bab62335f4fdf4ac3db1bc968fc6c24a26402f63f670fb3b1f90249dd7d31122509cc867f8354c3c326ded4790a7dcdb5b178b0e7f5a8e359d5
7
- data.tar.gz: 5059c10e6cb958fd5875f8196e3187dde9d9bca62ab05bd85a4c5d5208c57bdd7d404cb096e2654fcbf599fb3d22064cbf46f97139ac4f04eac2be8cb62a3230
6
+ metadata.gz: 2e2fe25c47b767790269c438cf426c55dfc648e4f120eab1bc006fd5c38106deae1db27ae8107ae1aff5c310edf6f8f27116a4c36dd0e296b92feaf30cc8f291
7
+ data.tar.gz: f7e369608d2a547c2a1fcf57b2f69645b8ea94ff6fb06c5fa71002a0024c2e3ca3e28738379324796f04648e969576ca42b49e181f8c7495b39444079acbaaea
data/NEWS.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 5.0.2 (February 22, 2019)
4
+ * Bugfix: raise "Trait not registered" error when passing invalid trait arguments
5
+
3
6
  ## 5.0.1 (February 15, 2019)
4
7
  * Bugfix: Do not raise error when two sequences have the same name
5
8
  in two traits that have the same name
6
9
 
7
- ## 5.0.0
10
+ ## 5.0.0 (February 1, 2019)
8
11
  * Added: Verbose option to include full backtraces in the linting output
9
12
  * Changed: use_parent_strategy now defaults to true, so by default the
10
13
  build strategy will build, rather than create associations
@@ -115,7 +115,7 @@ module FactoryBot
115
115
  end
116
116
 
117
117
  def trait_for(name)
118
- defined_traits.detect { |trait| trait.name == name }
118
+ defined_traits.detect { |trait| trait.name == name.to_s }
119
119
  end
120
120
 
121
121
  def initialize_copy(source)
@@ -5,7 +5,7 @@ module FactoryBot
5
5
  @strategy = strategy
6
6
 
7
7
  @overrides = traits_and_overrides.extract_options!
8
- @traits = traits_and_overrides.map(&:to_sym)
8
+ @traits = traits_and_overrides
9
9
  end
10
10
 
11
11
  def run(runner_strategy = @strategy, &block)
@@ -4,7 +4,7 @@ module FactoryBot
4
4
  attr_reader :name, :definition
5
5
 
6
6
  def initialize(name, &block)
7
- @name = name.to_sym
7
+ @name = name.to_s
8
8
  @block = block
9
9
  @definition = Definition.new(@name)
10
10
 
@@ -1,3 +1,3 @@
1
1
  module FactoryBot
2
- VERSION = "5.0.1".freeze
2
+ VERSION = "5.0.2".freeze
3
3
  end
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.0.1
4
+ version: 5.0.2
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-02-15 00:00:00.000000000 Z
12
+ date: 2019-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -279,8 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubyforge_project:
283
- rubygems_version: 2.7.7
282
+ rubygems_version: 3.0.1
284
283
  signing_key:
285
284
  specification_version: 4
286
285
  summary: factory_bot provides a framework and DSL for defining and using model instance