user new_resource.user
group new_resource.group
notifies :run, "execute[#{rails_directory}/Gemfile]"
+ notifies :run, "execute[#{rails_directory}/app/assets/javascripts/i18n]"
notifies :run, "execute[#{rails_directory}/public/assets]"
notifies :delete, "file[#{rails_directory}/public/export/embed.html]"
notifies :restart, "passenger_application[#{rails_directory}]"
only_if { new_resource.run_migrations }
end
+ execute "#{rails_directory}/app/assets/javascripts/i18n" do
+ action :nothing
+ command "bundle#{new_resource.ruby} exec rake i18n:js:export"
+ environment "RAILS_ENV" => "production"
+ cwd rails_directory
+ user new_resource.user
+ group new_resource.group
+ notifies :run, "execute[#{rails_directory}/public/assets]"
+ end
+
execute "#{rails_directory}/public/assets" do
action :nothing
command "bundle#{new_resource.ruby} exec rake assets:precompile"
action :nothing
end
- passenger_application rails_directory
+ passenger_application rails_directory do
+ only_if { ::File.exist?("/usr/bin/passenger-config") }
+ end
template "/etc/cron.daily/rails-#{new_resource.site.tr('.', '-')}" do
cookbook "web"