Merge branch 'jammit'

This commit is contained in:
Alec Leamas 2010-11-20 18:35:45 +01:00
commit 0a3a787ffa
3 changed files with 13 additions and 14 deletions

View file

@ -1,3 +1,4 @@
package: always
javascripts:
flash_socket:
- public/javascripts/vendor/FABridge.js

View file

@ -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/ &

View file

@ -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],