From 844c7bfe5d2f9e4cee3d2aa57608bf9860fb4adf Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Thu, 29 Dec 2022 09:39:14 +0100 Subject: [PATCH] Remove faker gem and sample_data:projects task --- Gemfile | 1 - Gemfile.lock | 3 --- lib/tasks/sample_data.rake | 48 -------------------------------------- nix/gemset.nix | 11 --------- 4 files changed, 63 deletions(-) delete mode 100644 lib/tasks/sample_data.rake diff --git a/Gemfile b/Gemfile index 009e2b44f7..02e83f6f9c 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index 76426b262d..8193331716 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/lib/tasks/sample_data.rake b/lib/tasks/sample_data.rake deleted file mode 100644 index f5719062bc..0000000000 --- a/lib/tasks/sample_data.rake +++ /dev/null @@ -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 diff --git a/nix/gemset.nix b/nix/gemset.nix index 42eed32f42..e54e3ca3c4 100644 --- a/nix/gemset.nix +++ b/nix/gemset.nix @@ -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"];