Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
cd239007
Commit
cd239007
authored
6 years ago
by
Artem Rashev
Committed by
Cuong Tran
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try "app:" task prefix on migration annotaiton (#596)
Since Rails full engines run as non-namespaced applications but all their app-related tasks still prefixed with `app:`
parent
dc827279
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
annotate_models_migrate.rake
lib/tasks/annotate_models_migrate.rake
+8
-1
No files found.
lib/tasks/annotate_models_migrate.rake
View file @
cd239007
...
@@ -7,7 +7,12 @@
...
@@ -7,7 +7,12 @@
%w(db:migrate db:migrate:up db:migrate:down db:migrate:reset db:migrate:redo db:rollback)
.
each
do
|
task
|
%w(db:migrate db:migrate:up db:migrate:down db:migrate:reset db:migrate:redo db:rollback)
.
each
do
|
task
|
Rake
::
Task
[
task
].
enhance
do
Rake
::
Task
[
task
].
enhance
do
Rake
::
Task
[
Rake
.
application
.
top_level_tasks
.
last
].
enhance
do
Rake
::
Task
[
Rake
.
application
.
top_level_tasks
.
last
].
enhance
do
Rake
::
Task
[
'set_annotation_options'
].
invoke
annotation_options_task
=
if
Rake
::
Task
.
task_defined?
(
'app:set_annotation_options'
)
'app:set_annotation_options'
else
'set_annotation_options'
end
Rake
::
Task
[
annotation_options_task
].
invoke
Annotate
::
Migration
.
update_annotations
Annotate
::
Migration
.
update_annotations
end
end
end
end
...
@@ -37,6 +42,8 @@ module Annotate
...
@@ -37,6 +42,8 @@ module Annotate
def
self
.
update_routes
def
self
.
update_routes
if
Rake
::
Task
.
task_defined?
(
"annotate_routes"
)
if
Rake
::
Task
.
task_defined?
(
"annotate_routes"
)
Rake
::
Task
[
"annotate_routes"
].
invoke
Rake
::
Task
[
"annotate_routes"
].
invoke
elsif
Rake
::
Task
.
task_defined?
(
"app:annotate_routes"
)
Rake
::
Task
[
"app:annotate_routes"
].
invoke
end
end
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
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