Browse Source

Maintenance: Update dependency faker to v2.23.0

renovatebot 2 years ago
parent
commit
91f2c4b0a2

+ 1 - 1
Gemfile.lock

@@ -188,7 +188,7 @@ GEM
     factory_bot_rails (6.2.0)
       factory_bot (~> 6.2.0)
       railties (>= 5.0.0)
-    faker (2.22.0)
+    faker (2.23.0)
       i18n (>= 1.8.11, < 2)
     faraday (1.10.2)
       faraday-em_http (~> 1.0)

+ 1 - 6
spec/factories/history/type.rb

@@ -5,12 +5,7 @@ FactoryBot.define do
     name do
       # The following line ensures that the name generated by Faker
       # does not conflict with any existing names in the DB.
-      # There's a special syntax for this
-      # (Faker::Verb.unique.exclude(:past_participle, [], History::Type.pluck(:name)),
-      # but it's not available yet in the current release of Faker (1.9.1).
-      Faker::Verb.unique
-                 .instance_variable_get(:@previous_results)[[:past_participle, []]]
-                 .merge(History::Type.pluck(:name))
+      Faker::Verb.unique.exclude(:past_participle, [], History::Type.pluck(:name))
 
       Faker::Verb.unique.past_participle
     end

+ 1 - 6
spec/factories/ticket/state.rb

@@ -5,12 +5,7 @@ FactoryBot.define do
     name do
       # The following line ensures that the name generated by Faker
       # does not conflict with any existing names in the DB.
-      # There's a special syntax for this
-      # (Faker::Verb.unique.exclude(:past_participle, [], Ticket::State.pluck(:name)),
-      # but it's not available yet in the current release of Faker (1.9.1).
-      Faker::Verb.unique
-                 .instance_variable_get(:@previous_results)[[:past_participle, []]]
-                 .merge(Ticket::State.pluck(:name))
+      Faker::Verb.unique.exclude(:past_participle, [], Ticket::State.pluck(:name))
 
       Faker::Verb.unique.past_participle
     end

+ 1 - 8
spec/factories/ticket/state_type.rb

@@ -5,14 +5,7 @@ FactoryBot.define do
     name do
       # The following line ensures that the name generated by Faker
       # does not conflict with any existing names in the DB.
-      # There's a special syntax for this
-      # (Faker::Verb.unique.exclude(:past_participle, [], Ticket::StateType.pluck(:name)),
-      # but it's not available yet in the current release of Faker (1.9.1).
-      Faker::Verb.unique
-                 .instance_variable_get(:@previous_results)[[:past_participle, []]]
-                 .merge(Ticket::StateType.pluck(:name))
-
-      Faker::Verb.unique.past_participle
+      Faker::Verb.unique.exclude(:past_participle, [], Ticket::StateType.pluck(:name))
     end
 
     updated_by_id { 1 }

+ 1 - 6
spec/factories/type_lookup.rb

@@ -5,12 +5,7 @@ FactoryBot.define do
     name do
       # The following line ensures that the name generated by Faker
       # does not conflict with any existing names in the DB.
-      # There's a special syntax for this
-      # (Faker::Verb.unique.exclude(:past_participle, [], Ticket::StateType.pluck(:name)),
-      # but it's not available yet in the current release of Faker (1.9.1).
-      Faker::Verb.unique
-                 .instance_variable_get(:@previous_results)[[:base, []]]
-                 .merge(TypeLookup.pluck(:name))
+      Faker::Verb.unique.exclude(:past_participle, [], TypeLookup.pluck(:name))
 
       Faker::Verb.unique.past_participle
     end