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
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-09-03 23:49:13 +0300
committerStan Hu <stanhu@gmail.com>2015-09-03 23:54:16 +0300
commita73044320f806c660a21992fdbf63deb161c615e (patch)
treec792a6886003ba4639b03112b3f469b42e16a865 /lib
parent996f51559b428102b4c9540617ee9f0847246d74 (diff)
Fix `rake services:doc` generation
[ci skip]
Diffstat (limited to 'lib')
-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