Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
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
edx
cs_comments_service
Commits
fb59b727
Commit
fb59b727
authored
Jan 27, 2017
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better filtering for rake search:initialize behavior
parent
1235e147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
Rakefile
+2
-1
app.rb
+1
-1
No files found.
Rakefile
View file @
fb59b727
...
...
@@ -16,7 +16,8 @@ end
LOG
=
Logger
.
new
(
STDERR
)
RAKE_SEARCH_INITIALIZE
=
(
Rake
.
application
.
top_level_tasks
.
include?
'search:initialize'
)
# Indicates whether this is being run from within a 'search:' task in rake.
RAKE_SEARCH
=
(
Rake
.
application
.
top_level_tasks
.
select
{
|
task
|
task
.
include?
'search:'
}).
any?
desc
'Load the environment'
task
:environment
do
...
...
app.rb
View file @
fb59b727
...
...
@@ -72,7 +72,7 @@ Dir[File.dirname(__FILE__) + '/models/*.rb'].each { |file| require file }
Dir
[
File
.
dirname
(
__FILE__
)
+
'/presenters/*.rb'
].
each
{
|
file
|
require
file
}
$check_index_mapping_exists
=
defined?
(
RAKE_SEARCH
_INITIALIZE
)
===
nil
||
RAKE_SEARCH_INITIALIZE
===
false
$check_index_mapping_exists
=
defined?
(
RAKE_SEARCH
)
===
nil
||
RAKE_SEARCH
===
false
if
$check_index_mapping_exists
# Ensure Elasticsearch index mappings exist, unless we are creating it in the rake search initialize
Comment
.
put_search_index_mapping
...
...
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