Felix Niklas 2014-07-07 12:19:15 +02:00
parent 37ae82bd05
commit b5f3d35a94
3 changed files with 24 additions and 0 deletions

View file

@ -85,6 +85,12 @@ group :development, :test do
# rest client lib for unit tests # rest client lib for unit tests
gem 'faraday' gem 'faraday'
# livereload on template changes (html, js, css)
gem 'guard', '>= 2.2.2', :require => false
gem 'guard-livereload', :require => false
gem 'rack-livereload'
gem 'rb-fsevent', :require => false
# websocket unit tests # websocket unit tests
# gem 'em-websocket-client' # gem 'em-websocket-client'
end end

11
Guardfile Normal file
View file

@ -0,0 +1,11 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
end

View file

@ -30,4 +30,11 @@ Zammad::Application.configure do
# Expands the lines which load the assets # Expands the lines which load the assets
config.assets.debug = true config.assets.debug = true
# Automatically inject JavaScript needed for LiveReload
config.middleware.use(Rack::LiveReload,
:min_delay => 500, # default 1000
:max_delay => 10_000, # default 60_000
:live_reload_port => 67789, # default 35729
:source => :vendored
)
end end