Handle jammit by precaching in script/server.
This introduces some jammit warnings in 'rake spec'. These seem to be just warnings. To get rid of them, take steps as described in https://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora in the "Read-only Installation" (sic!) chapter.
This commit is contained in:
parent
194373ff70
commit
b6648cb9e2
3 changed files with 13 additions and 14 deletions
|
|
@ -1,3 +1,4 @@
|
|||
package: always
|
||||
javascripts:
|
||||
flash_socket:
|
||||
- public/javascripts/vendor/FABridge.js
|
||||
|
|
|
|||
|
|
@ -48,6 +48,16 @@ if [ ! -e public/source.tar.gz ]; then
|
|||
exit 65
|
||||
fi
|
||||
|
||||
# Precache jammit assets
|
||||
if [ -w public ]; then
|
||||
bundle exec jammit
|
||||
fi
|
||||
if [ ! -e 'public/assets/main.js.gz' ]; then
|
||||
echo 'Jammit precache error (now or at install)' >&2
|
||||
exit 66
|
||||
fi
|
||||
|
||||
|
||||
mkdir -p -v log/thin/
|
||||
bundle exec ruby ./script/websocket_server.rb&
|
||||
bundle exec magent start --log-path=log/ &
|
||||
|
|
|
|||
|
|
@ -41,20 +41,8 @@ def process_message
|
|||
end
|
||||
end
|
||||
|
||||
def package_js
|
||||
require 'jammit'
|
||||
|
||||
begin
|
||||
Jammit.package!
|
||||
rescue => e
|
||||
puts "Error minifying assets, but server will continue starting normally."
|
||||
puts e.inspect
|
||||
end
|
||||
end
|
||||
|
||||
begin
|
||||
EM.run {
|
||||
package_js
|
||||
Diaspora::WebSocket.initialize_channels
|
||||
|
||||
socket_params = { :host => APP_CONFIG[:socket_host],
|
||||
|
|
|
|||
Loading…
Reference in a new issue