Remove faker gem and sample_data:projects task

pull/11868/head
Christophe Bliard 2 years ago committed by Oliver Günther
parent 69f3e9a761
commit 844c7bfe5d
  1. 1
      Gemfile
  2. 3
      Gemfile.lock
  3. 48
      lib/tasks/sample_data.rake
  4. 11
      nix/gemset.nix

@ -259,7 +259,6 @@ end
group :development do
gem 'listen', '~> 3.7.0' # Use for event-based reloaders
gem 'faker', require: false
gem 'letter_opener'
gem 'spring'

@ -464,8 +464,6 @@ GEM
factory_bot_rails (6.2.0)
factory_bot (~> 6.2.0)
railties (>= 5.0.0)
faker (3.0.0)
i18n (>= 1.8.11, < 2)
faraday (1.10.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
@ -1035,7 +1033,6 @@ DEPENDENCIES
escape_utils (~> 1.3)
factory_bot (~> 6.2.0)
factory_bot_rails (~> 6.2.0)
faker
ffi (~> 1.15)
flamegraph
fog-aws

@ -1,48 +0,0 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
#++
namespace :sample_data do
desc 'Create the given number of fake projects'
task :projects, [:nr_of_projects] => :environment do |_task, args|
require 'faker'
puts "Creating #{args[:nr_of_projects]} fake projects"
args[:nr_of_projects].to_i.times do |i|
project = Project.create(name: Faker::Commerce.product_name,
identifier: "#{Faker::Code.isbn}-#{i}",
description: Faker::Lorem.paragraph(5),
types: Type.all,
is_public: true)
puts "created: #{project.name}"
end
puts "#{args[:nr_of_projects]} fake projects created"
end
end

@ -1132,17 +1132,6 @@
};
version = "6.1.0";
};
faker = {
dependencies = ["i18n"];
groups = ["development"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0z3d4y6xg8prn3zdjw1qpqrnziq1d3zigqil4sxjj0pbr46gc1d6";
type = "gem";
};
version = "2.17.0";
};
faraday = {
dependencies = ["faraday-net_http" "multipart-post" "ruby2_keywords"];
groups = ["default" "development" "sentry" "test"];

Loading…
Cancel
Save