summaryrefslogtreecommitdiff
path: root/lib/tasks/plugins.rake
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-23 15:58:57 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-02-26 16:06:49 +0200
commit645dceb0a233fc523ac16611fa3fec317d29a7e1 (patch)
tree4bfc439d7720d8e7f715c749d5837088641418f2 /lib/tasks/plugins.rake
parenteff5746b5e7cf4075edd6d1c76fdcd24c1603bb4 (diff)
downloadgitlab-ce-645dceb0a233fc523ac16611fa3fec317d29a7e1.tar.gz
Run plugins as separate process and pass data via STDIN
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/tasks/plugins.rake')
-rw-r--r--lib/tasks/plugins.rake24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/tasks/plugins.rake b/lib/tasks/plugins.rake
index 9c9f1fece85..f4d7edb2eb2 100644
--- a/lib/tasks/plugins.rake
+++ b/lib/tasks/plugins.rake
@@ -1,28 +1,4 @@
namespace :plugins do
- desc 'Generate skeleton for new plugin'
- task generate: :environment do
- ARGV.each { |a| task a.to_sym { } }
- name = ARGV[1]
-
- unless name.present?
- puts 'Error. You need to specify a name for the plugin'
- exit 1
- end
-
- class_name = name.classify
- param = name.underscore
- file_path = Rails.root.join('plugins', param + '_plugin.rb')
- template = File.read(Rails.root.join('generator_templates', 'plugins', 'template.rb'))
- template.gsub!('$NAME', class_name)
-
- if File.write(file_path, template)
- puts "Done. Your plugin saved under #{file_path}."
- puts 'Feel free to edit it.'
- else
- puts "Failed to save #{file_path}."
- end
- end
-
desc 'Validate existing plugins'
task validate: :environment do
puts 'Validating plugins from /plugins directory'