summaryrefslogtreecommitdiff
path: root/lib/tasks/services.rake
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-09-03 20:49:13 +0000
committerStan Hu <stanhu@gmail.com>2015-09-03 20:54:16 +0000
commita73044320f806c660a21992fdbf63deb161c615e (patch)
treec792a6886003ba4639b03112b3f469b42e16a865 /lib/tasks/services.rake
parent996f51559b428102b4c9540617ee9f0847246d74 (diff)
downloadgitlab-ce-a73044320f806c660a21992fdbf63deb161c615e.tar.gz
Fix `rake services:doc` generation
[ci skip]
Diffstat (limited to 'lib/tasks/services.rake')
-rw-r--r--lib/tasks/services.rake6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/services.rake b/lib/tasks/services.rake
index 53d912d2a7c..3f276a5e12e 100644
--- a/lib/tasks/services.rake
+++ b/lib/tasks/services.rake
@@ -44,11 +44,11 @@ DELETE /projects/:id/services/<%= service[:dashed_name] %>
ERB
namespace :services do
- task :doc do
+ task doc: :environment do
services = Service.available_services_names.map do |s|
service_start = Time.now
klass = "#{s}_service".classify.constantize
-
+
service = klass.new
service_hash = {}
@@ -62,7 +62,7 @@ namespace :services do
param_hash[:name] = p[:name]
param_hash[:description] = p[:placeholder] || p[:title]
- param_hash[:required] = klass.validators_on(p[:name].to_sym).any? do |v|
+ param_hash[:required] = klass.validators_on(p[:name].to_sym).any? do |v|
v.class == ActiveRecord::Validations::PresenceValidator
end