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 +4 -4
- data/lib/factory_trace/processors/find_unused.rb +4 -4
- data/lib/factory_trace/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f95db98efa095b201cb0fa1c817a734718891e738aede8e753fe83abd907bf2b
|
4
|
+
data.tar.gz: edfb1714865b6de3e2b722be198d1e5ac57b4053c9ce0ed8ba8c36b2067530cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
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:
|
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.
|
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
|