factory_trace 1.0.1 → 1.1.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: 47392b8b4b5bd8c329e7068531793ea4773d086fcc44cc1a700e58f9b67c658d
4
- data.tar.gz: 17043ec1bbd6684fc8f0d9259439b3c767ec9748535168c37733c983094dd9da
3
+ metadata.gz: f95db98efa095b201cb0fa1c817a734718891e738aede8e753fe83abd907bf2b
4
+ data.tar.gz: edfb1714865b6de3e2b722be198d1e5ac57b4053c9ce0ed8ba8c36b2067530cc
5
5
  SHA512:
6
- metadata.gz: 90c73bd445d000bb676337b831829b5cfa83e46690676e4af6635e85d1536475d4b742b75ed09216a564b452318a2c86a3548849bded0f328002577ebba32c3f
7
- data.tar.gz: 174df9d321cde04ddb59892e389b9aa80b76f4a601c0ecefac48f350384bfa42cdd59815812096e7bb73fb13ad567513cf03de834de230780a0af0155ea4e698
6
+ metadata.gz: 85ea33f275970010d3fc52dfd7bf0411b679a4b0c407adeb931020a5173e7fb7fccca0ddf727559c446ade7ee32d73ef1fae46152f12578bab5741ea8f57bbf4
7
+ data.tar.gz: 7cc392da590401b0b3d1a2a6f9837353bd017cf4394f49aadd38662a5600b3ceff5d178d80aec76063af1ed5e95a67812c321d8940824c950dfe0311c0882ed3
@@ -69,11 +69,11 @@ module FactoryTrace
69
69
  [nil, defined.find_trait_by_name(trait_name)]
70
70
  end
71
71
 
72
- # @param [FactoryTrace::Structures::Factory] factory
72
+ # @param [FactoryTrace::Structures::Factory, nil] factory
73
73
  # @param [FactoryTrace::Structures::Collection] collection
74
74
  # @param [Symbol] status
75
75
  def mark_factory(factory, collection, status:)
76
- return if factory.has_prioritized_status?(status)
76
+ return if factory.nil? || factory.has_prioritized_status?(status)
77
77
 
78
78
  factory.status = status
79
79
  if (parent = collection.find_factory_by_names([factory.parent_name]))
@@ -82,12 +82,12 @@ module FactoryTrace
82
82
  mark_declarations(factory.declaration_names, factory, collection, status: :indirectly_used)
83
83
  end
84
84
 
85
- # @param [FactoryTrace::Structures::Trait] trait
85
+ # @param [FactoryTrace::Structures::Trait, nil] trait
86
86
  # @param [FactoryTrace::Structures::Factory|nil] factory which trait belongs to
87
87
  # @param [FactoryTrace::Structures::Collection] collection
88
88
  # @param [Symbol] status
89
89
  def mark_trait(trait, factory, collection, status:)
90
- return if trait.has_prioritized_status?(status)
90
+ return if trait.nil? || trait.has_prioritized_status?(status)
91
91
 
92
92
  trait.status = status
93
93
  mark_declarations(trait.declaration_names, factory, collection, status: :indirectly_used)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FactoryTrace
4
- VERSION = "1.0.1"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - djezzzl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-23 00:00:00.000000000 Z
11
+ date: 2023-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: factory_bot
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.2.33
135
+ rubygems_version: 3.1.6
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Provide an easy way to maintain factories and traits from FactoryBot