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
b857c773
Commit
b857c773
authored
Sep 03, 2012
by
David Ormsbee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure Rakefile uses of application.yml also get run through pre-processing
parent
3c3074e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Rakefile
+5
-3
No files found.
Rakefile
View file @
b857c773
...
@@ -4,8 +4,10 @@ require 'bundler'
...
@@ -4,8 +4,10 @@ require 'bundler'
Bundler
.
setup
Bundler
.
setup
Bundler
.
require
Bundler
.
require
application_yaml
=
ERB
.
new
(
File
.
read
(
"config/application.yml"
)).
result
()
Tire
.
configure
do
Tire
.
configure
do
url
YAML
.
load
_file
(
"config/application.yml"
)[
'elasticsearch_server'
]
url
YAML
.
load
(
application_yaml
)[
'elasticsearch_server'
]
end
end
desc
"Load the environment"
desc
"Load the environment"
...
@@ -18,7 +20,7 @@ task :environment do
...
@@ -18,7 +20,7 @@ task :environment do
class
<<
self
;
attr_accessor
:config
;
end
class
<<
self
;
attr_accessor
:config
;
end
end
end
CommentService
.
config
=
YAML
.
load
_file
(
"config/application.yml"
)
CommentService
.
config
=
YAML
.
load
(
application_yaml
)
Dir
[
File
.
dirname
(
__FILE__
)
+
'/lib/**/*.rb'
].
each
{
|
file
|
require
file
}
Dir
[
File
.
dirname
(
__FILE__
)
+
'/lib/**/*.rb'
].
each
{
|
file
|
require
file
}
Dir
[
File
.
dirname
(
__FILE__
)
+
'/models/*.rb'
].
each
{
|
file
|
require
file
}
Dir
[
File
.
dirname
(
__FILE__
)
+
'/models/*.rb'
].
each
{
|
file
|
require
file
}
...
@@ -62,7 +64,7 @@ namespace :db do
...
@@ -62,7 +64,7 @@ namespace :db do
COURSE_ID
=
"MITx/6.002x/2012_Fall"
COURSE_ID
=
"MITx/6.002x/2012_Fall"
def
generate_comments_for
(
commentable_id
)
def
generate_comments_for
(
commentable_id
)
level_limit
=
YAML
.
load
_file
(
"config/application.yml"
)[
"level_limit"
]
level_limit
=
YAML
.
load
(
application_yaml
)[
"level_limit"
]
tag_seeds
=
[
tag_seeds
=
[
"artificial-intelligence"
,
"artificial-intelligence"
,
...
...
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