Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
f11900a8
Commit
f11900a8
authored
Jun 20, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cale/singleton-watchers' into cale/stabilize-dev-env
Conflicts: CHANGELOG.rst
parents
cd57e281
64912a77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
CHANGELOG.rst
+3
-0
Gemfile
+1
-0
rakelib/assets.rake
+2
-2
rakelib/helpers.rb
+12
-0
No files found.
CHANGELOG.rst
View file @
f11900a8
...
@@ -11,6 +11,9 @@ XModule: Don't delete generated xmodule asset files when compiling (for
...
@@ -11,6 +11,9 @@ XModule: Don't delete generated xmodule asset files when compiling (for
instance, when XModule provides a coffeescript file, don't delete
instance, when XModule provides a coffeescript file, don't delete
the associated javascript)
the associated javascript)
Common: Make asset watchers run as singletons (so they won't start if the
watcher is already running in another shell).
Common: Make rake provide better error messages if packages are missing.
Common: Make rake provide better error messages if packages are missing.
Common: Repairs development documentation generation by sphinx.
Common: Repairs development documentation generation by sphinx.
...
...
Gemfile
View file @
f11900a8
...
@@ -4,3 +4,4 @@ gem 'sass', '3.1.15'
...
@@ -4,3 +4,4 @@ gem 'sass', '3.1.15'
gem
'
bourbon
'
,
'~> 1.3.6'
gem
'
bourbon
'
,
'~> 1.3.6'
gem
'
colorize
'
,
'~> 0.5.8'
gem
'
colorize
'
,
'~> 0.5.8'
gem
'
launchy
'
,
'~> 2.1.2'
gem
'
launchy
'
,
'~> 2.1.2'
gem
'
sys-proctable
'
,
'~> 0.9.3'
rakelib/assets.rake
View file @
f11900a8
...
@@ -114,9 +114,9 @@ namespace :assets do
...
@@ -114,9 +114,9 @@ namespace :assets do
task
:_watch
=>
(
prereq_tasks
+
[
"assets:
#{
asset_type
}
:debug"
])
do
task
:_watch
=>
(
prereq_tasks
+
[
"assets:
#{
asset_type
}
:debug"
])
do
cmd
=
send
(
asset_type
.
to_s
+
"_cmd"
,
watch
=
true
,
debug
=
true
)
cmd
=
send
(
asset_type
.
to_s
+
"_cmd"
,
watch
=
true
,
debug
=
true
)
if
cmd
.
kind_of?
(
Array
)
if
cmd
.
kind_of?
(
Array
)
cmd
.
each
{
|
c
|
background
_process
(
c
)}
cmd
.
each
{
|
c
|
singleton
_process
(
c
)}
else
else
background
_process
(
cmd
)
singleton
_process
(
cmd
)
end
end
end
end
end
end
...
...
rakelib/helpers.rb
View file @
f11900a8
require
'digest/md5'
require
'digest/md5'
require
'sys/proctable'
require
'colorize'
def
find_executable
(
exec
)
def
find_executable
(
exec
)
path
=
%x(which
#{
exec
}
)
.
strip
path
=
%x(which
#{
exec
}
)
.
strip
...
@@ -84,6 +86,16 @@ def background_process(*command)
...
@@ -84,6 +86,16 @@ def background_process(*command)
end
end
end
end
# Runs a command as a background process, as long as no other processes
# tagged with the same tag are running
def
singleton_process
(
*
command
)
if
Sys
::
ProcTable
.
ps
.
select
{
|
proc
|
proc
.
cmdline
.
include?
(
command
.
join
(
' '
))}.
empty?
background_process
(
*
command
)
else
puts
"Process '
#{
command
.
join
(
' '
)
}
already running, skipping"
.
blue
end
end
def
environments
(
system
)
def
environments
(
system
)
Dir
[
"
#{
system
}
/envs/**/*.py"
].
select
{
|
file
|
!
(
/__init__.py$/
=~
file
)}.
map
do
|
env_file
|
Dir
[
"
#{
system
}
/envs/**/*.py"
].
select
{
|
file
|
!
(
/__init__.py$/
=~
file
)}.
map
do
|
env_file
|
env_file
.
gsub
(
"
#{
system
}
/envs/"
,
''
).
gsub
(
/\.py/
,
''
).
gsub
(
'/'
,
'.'
)
env_file
.
gsub
(
"
#{
system
}
/envs/"
,
''
).
gsub
(
/\.py/
,
''
).
gsub
(
'/'
,
'.'
)
...
...
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