Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
a7304432
Commit
a7304432
authored
Sep 03, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `rake services:doc` generation
[ci skip]
parent
996f5155
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
doc/development/rake_tasks.md
doc/development/rake_tasks.md
+6
-0
lib/tasks/services.rake
lib/tasks/services.rake
+3
-3
No files found.
doc/development/rake_tasks.md
View file @
a7304432
...
...
@@ -27,3 +27,9 @@ You can find results under the `doc/code` directory.
```
bundle exec rake gitlab:generate_docs
```
## Generate API documentation for project services (e.g. Slack)
```
bundle exec rake services:doc
```
lib/tasks/services.rake
View file @
a7304432
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment