Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/dev.rake')
-rw-r--r--lib/tasks/dev.rake15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake
index 48bf49ff284..129f4c0ff0e 100644
--- a/lib/tasks/dev.rake
+++ b/lib/tasks/dev.rake
@@ -27,6 +27,21 @@ namespace :dev do
Rails.application.eager_load!
end
+ desc "GitLab | Dev | Load specific fixture"
+ task 'fixtures:load', [:fixture_name] => :environment do |_, args|
+ fixture_name = args.fixture_name
+
+ if fixture_name.nil?
+ puts "No fixture name was provided"
+ next
+ end
+
+ ENV['FIXTURE_PATH'] = 'db/fixtures/development/'
+ ENV['FILTER'] = args.fixture_name
+
+ Rake::Task['db:seed_fu'].invoke
+ end
+
# If there are any clients connected to the DB, PostgreSQL won't let
# you drop the database. It's possible that Sidekiq, Puma, or
# some other client will be hanging onto a connection, preventing