depends "accounts"
depends "apache"
depends "git"
+depends "ruby"
include_recipe "accounts"
include_recipe "apache"
include_recipe "git"
-
-ruby_version = if node[:lsb][:release].to_f < 20.04
- "2.5"
- else
- "2.7"
- end
+include_recipe "ruby"
package %W[
- ruby#{ruby_version}
- ruby#{ruby_version}-dev
make
gcc
g++
libsqlite3-dev
]
-gem_package "bundler#{ruby_version}" do
- package_name "bundler"
- version "~> 2.1.4"
- gem_binary "gem#{ruby_version}"
- options "--format-executable"
-end
-
directory "/srv/blogs.openstreetmap.org" do
owner "blogs"
group "blogs"
depth 1
user "blogs"
group "blogs"
- notifies :run, "execute[/srv/blogs.openstreetmap.org/Gemfile]", :immediately
+ notifies :run, "bundle_install[/srv/blogs.openstreetmap.org]", :immediately
end
-execute "/srv/blogs.openstreetmap.org/Gemfile" do
+bundle_install "/srv/blogs.openstreetmap.org" do
action :nothing
- command "bundle#{ruby_version} install --deployment"
- cwd "/srv/blogs.openstreetmap.org"
+ options "--deployment"
user "blogs"
group "blogs"
- notifies :run, "execute[/srv/blogs.openstreetmap.org]", :immediately
+ notifies :run, "bundle_exec[/srv/blogs.openstreetmap.org]", :immediately
end
-execute "/srv/blogs.openstreetmap.org" do
+bundle_exec "/srv/blogs.openstreetmap.org" do
action :nothing
- command "bundle#{ruby_version} exec pluto build -t osm -o build"
- cwd "/srv/blogs.openstreetmap.org"
+ command "pluto build -t osm -o build"
user "blogs"
group "blogs"
end
owner "root"
group "root"
mode "0755"
- variables :ruby_version => ruby_version
end
cron_d "blogs" do
cd /srv/blogs.openstreetmap.org
-/usr/bin/bundle<%= @ruby_version %> exec pluto \
+<%= node[:ruby][:bundle] %> exec pluto \
--quieter \
--config=/srv/blogs.openstreetmap.org build \
--dbpath=/srv/blogs.openstreetmap.org \
depends "git"
depends "postgresql"
depends "python"
+depends "ruby"
depends "web"
include_recipe "git"
include_recipe "postgresql"
include_recipe "python"
+include_recipe "ruby"
passwords = data_bag_item("db", "passwords")
wal_secrets = data_bag_item("db", "wal-secrets")
-ruby_version = node[:passenger][:ruby_version]
-
postgresql_munin "openstreetmap" do
cluster node[:db][:cluster]
database "openstreetmap"
end
rails_port "www.openstreetmap.org" do
- ruby ruby_version
directory "/srv/www.openstreetmap.org/rails"
user "rails"
group "rails"
execute function_directory do
action :nothing
- command "make BUNDLE=bundle#{ruby_version} PG_CONFIG=#{pg_config} DESTDIR=#{function_directory}"
+ command "make BUNDLE=#{node[:ruby][:bundle]} PG_CONFIG=#{pg_config} DESTDIR=#{function_directory}"
cwd "/srv/www.openstreetmap.org/rails/db/functions"
user "rails"
group "rails"
depends "php"
depends "postgresql"
depends "python"
+depends "ruby"
depends "tools"
depends "web"
include_recipe "php::fpm"
include_recipe "postgresql"
include_recipe "python"
+include_recipe "ruby"
package %w[
php-cgi
mode "755"
end
- ruby_version = node[:passenger][:ruby_version]
-
systemd_service "rails-jobs@" do
description "Rails job queue runner"
type "simple"
user "apis"
working_directory "/srv/%i.apis.dev.openstreetmap.org/rails"
- exec_start "/usr/local/bin/bundle#{ruby_version} exec rake jobs:work"
+ exec_start "#{node[:ruby][:bundle]} exec rake jobs:work"
restart "on-failure"
private_tmp true
private_devices true
end
rails_port site_name do
- ruby ruby_version
directory rails_directory
user "apis"
group "apis"
depends "apache"
depends "git"
depends "mediawiki"
+depends "ruby"
include_recipe "apache"
include_recipe "git"
+include_recipe "ruby"
-package %w[
+package %W[
gcc
g++
make
- ruby2.7
- ruby2.7-dev
libssl-dev
zlib1g-dev
pkg-config
]
-gem_package "bundler" do
- package_name "bundler"
- version "~> 2.2.22"
- gem_binary "gem2.7"
- options "--format-executable"
-end
-
git "/srv/operations.osmfoundation.org" do
action :sync
repository "https://github.com/openstreetmap/owg-website.git"
depth 1
user "root"
group "root"
- notifies :run, "execute[/srv/operations.osmfoundation.org/Gemfile]"
+ notifies :run, "bundle_install[/srv/operations.osmfoundation.org]"
end
directory "/srv/operations.osmfoundation.org/_site" do
group "nogroup"
end
-execute "/srv/operations.osmfoundation.org/Gemfile" do
+bundle_install "/srv/operations.osmfoundation.org" do
action :nothing
- command "bundle2.7 install --deployment"
- cwd "/srv/operations.osmfoundation.org"
+ options "--deployment"
user "root"
group "root"
- notifies :run, "execute[/srv/operations.osmfoundation.org]"
+ notifies :run, "bundle_exec[/srv/operations.osmfoundation.org]"
end
-execute "/srv/operations.osmfoundation.org" do
- command "bundle2.7 exec jekyll build --trace"
- cwd "/srv/operations.osmfoundation.org"
+bundle_exec "/srv/operations.osmfoundation.org" do
+ action :nothing
+ command "jekyll build --trace"
user "nobody"
group "nogroup"
end
-default[:passenger][:ruby_version] = if node[:lsb][:release].to_f < 20.04
- "2.5"
- else
- "2.7"
- end
-
default[:passenger][:max_pool_size] = 6
default[:passenger][:pool_idle_time] = 300
default[:passenger][:instance_registry_dir] = "/run/passenger"
depends "apt"
depends "munin"
depends "prometheus"
+depends "ruby"
depends "systemd"
include_recipe "apt"
include_recipe "munin"
include_recipe "prometheus"
-
-package "ruby#{node[:passenger][:ruby_version]}"
-package "ruby#{node[:passenger][:ruby_version]}-dev"
-
-if node[:passenger][:ruby_version].to_f < 1.9
- package "rubygems#{node[:passenger][:ruby_version]}"
- package "irb#{node[:passenger][:ruby_version]}"
-end
+include_recipe "ruby"
template "/usr/local/bin/passenger-ruby" do
source "ruby.erb"
#!/bin/sh
-<% if node[:passenger][:ruby_version].to_f < 2.1 -%>
-export RUBY_HEAP_MIN_SLOTS=500000
-export RUBY_HEAP_FREE_MIN=100000
-<% else -%>
export RUBY_GC_HEAP_INIT_SLOTS=500000
export RUBY_GC_HEAP_FREE_SLOTS=100000
-<% end -%>
export RUBY_GC_MALLOC_LIMIT=50000000
-exec /usr/bin/ruby<%= node[:passenger][:ruby_version] %> "$@"
+exec /usr/bin/ruby<%= node[:ruby][:version] %> "$@"
--- /dev/null
+# Ruby Cookbook
+
+Installs and configures ruby.
--- /dev/null
+default[:ruby][:version] = if node[:lsb][:release].to_f < 20.04
+ "2.5"
+ else
+ "2.7"
+ end
+default[:ruby][:bundle] = "/usr/bin/bundle#{node[:ruby][:version]}"
--- /dev/null
+name "ruby"
+maintainer "OpenStreetMap Administrators"
+maintainer_email "admins@openstreetmap.org"
+license "Apache-2.0"
+description "Installs and configures ruby"
+
+version "1.0.0"
+supports "ubuntu"
--- /dev/null
+#
+# Cookbook:: ruby
+# Recipe:: default
+#
+# Copyright:: 2022, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ruby_version = node[:ruby][:version]
+
+package %W[
+ ruby
+ ruby#{ruby_version}
+ ruby
+ ruby#{ruby_version}-dev
+]
+
+gem_package "bundler#{ruby_version}-1" do
+ package_name "bundler"
+ version "~> 1.17.3"
+ gem_binary "gem#{ruby_version}"
+ options "--format-executable"
+end
+
+gem_package "bundler#{ruby_version}-2" do
+ package_name "bundler"
+ version "~> 2.3.16"
+ gem_binary "gem#{ruby_version}"
+ options "--format-executable"
+end
--- /dev/null
+#
+# Cookbook:: ruby
+# Resource:: bundle_exec
+#
+# Copyright:: 2022, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+resource_name :bundle_exec
+provides :bundle_exec
+
+unified_mode true
+
+default_action :run
+
+property :directory, :kind_of => String, :name_property => true
+property :command, :kind_of => String
+property :user, :kind_of => String
+property :group, :kind_of => String
+property :environment, :kind_of => Hash
+
+action :run do
+ execute "#{new_resource.directory}/Gemfile" do
+ command "#{bundle_command} exec #{new_resource.command}"
+ cwd new_resource.directory
+ user new_resource.user
+ group new_resource.group
+ environment new_resource.environment
+ end
+end
+
+action_class do
+ def bundle_command
+ node[:ruby][:bundle]
+ end
+end
--- /dev/null
+#
+# Cookbook:: ruby
+# Resource:: bundle_install
+#
+# Copyright:: 2022, OpenStreetMap Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+resource_name :bundle_install
+provides :bundle_install
+
+unified_mode true
+
+default_action :run
+
+property :directory, :kind_of => String, :name_property => true
+property :options, :kind_of => String
+property :user, :kind_of => String
+property :group, :kind_of => String
+property :environment, :kind_of => Hash
+
+action :run do
+ execute "#{new_resource.directory}/Gemfile" do
+ command "#{bundle_command} install #{new_resource.options}"
+ cwd new_resource.directory
+ user new_resource.user
+ group new_resource.group
+ environment new_resource.environment
+ end
+end
+
+action_class do
+ def bundle_command
+ node[:ruby][:bundle]
+ end
+end
+
+def after_created
+ subscribes :run, "gem_package[bundler#{node[:ruby][:version]}-1]"
+ subscribes :run, "gem_package[bundler#{node[:ruby][:version]}-2]"
+end
supports "ubuntu"
depends "apache"
depends "git"
+depends "ruby"
include_recipe "apache"
include_recipe "git"
+include_recipe "ruby"
package %w[
gcc
g++
make
- ruby
- ruby-dev
libssl-dev
zlib1g-dev
pkg-config
]
-gem_package "bundler" do
- version "1.17.3"
-end
-
git "/srv/hardware.openstreetmap.org" do
action :sync
repository "https://github.com/gravitystorm/osmf-server-info.git"
depth 1
user "root"
group "root"
- notifies :run, "execute[/srv/hardware.openstreetmap.org/Gemfile]"
+ notifies :run, "bundle_install[/srv/hardware.openstreetmap.org]"
end
nodes = { :rows => search(:node, "*:*") }
mode "644"
owner "root"
group "root"
- notifies :run, "execute[/srv/hardware.openstreetmap.org]"
+ notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
end
file "/srv/hardware.openstreetmap.org/_data/roles.json" do
mode "644"
owner "root"
group "root"
- notifies :run, "execute[/srv/hardware.openstreetmap.org]"
+ notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
end
directory "/srv/hardware.openstreetmap.org/_site" do
group "nogroup"
end
-execute "/srv/hardware.openstreetmap.org/Gemfile" do
+bundle_install "/srv/hardware.openstreetmap.org" do
action :nothing
- command "bundle install --deployment"
- cwd "/srv/hardware.openstreetmap.org"
+ options "--deployment"
user "root"
group "root"
- notifies :run, "execute[/srv/hardware.openstreetmap.org]"
+ notifies :run, "bundle_exec[/srv/hardware.openstreetmap.org]"
end
-execute "/srv/hardware.openstreetmap.org" do
+bundle_exec "/srv/hardware.openstreetmap.org" do
action :nothing
- command "bundle exec jekyll build --trace --baseurl=https://hardware.openstreetmap.org"
- cwd "/srv/hardware.openstreetmap.org"
+ command "jekyll build --trace --baseurl=https://hardware.openstreetmap.org"
user "nobody"
group "nogroup"
end
version "1.0.0"
supports "ubuntu"
+depends "ruby"
depends "wordpress"
# limitations under the License.
#
+include_recipe "ruby"
include_recipe "wordpress"
passwords = data_bag_item("stateofthemap", "passwords")
gcc
g++
make
- ruby
- ruby-dev
libssl-dev
zlib1g-dev
pkg-config
apache_module "expires"
apache_module "rewrite"
-gem_package "bundler" do
- version "1.17.3"
-end
-
-gem_package "bundler" do
- version "2.1.4"
-end
-
%w[2016 2017 2018 2019 2020 2021 2022].each do |year|
git "/srv/#{year}.stateofthemap.org" do
action :sync
depth 1
user "root"
group "root"
- notifies :run, "execute[/srv/#{year}.stateofthemap.org/Gemfile]"
+ notifies :run, "bundle_install[/srv/#{year}.stateofthemap.org]"
end
directory "/srv/#{year}.stateofthemap.org/_site" do
group "nogroup"
end
- execute "/srv/#{year}.stateofthemap.org/Gemfile" do
+ bundle_install "/srv/#{year}.stateofthemap.org" do
action :nothing
- command "bundle install --deployment --jobs #{node[:cpu][:total]}"
- cwd "/srv/#{year}.stateofthemap.org"
+ options "--deployment --jobs #{node[:cpu][:total]}"
user "root"
group "root"
- notifies :run, "execute[/srv/#{year}.stateofthemap.org]"
+ notifies :run, "bundle_exec[/srv/#{year}.stateofthemap.org]"
only_if { ::File.exist?("/srv/#{year}.stateofthemap.org/Gemfile") }
end
- execute "/srv/#{year}.stateofthemap.org" do
+ bundle_exec "/srv/#{year}.stateofthemap.org" do
action :nothing
- command "bundle exec jekyll build --trace --baseurl=https://#{year}.stateofthemap.org"
- cwd "/srv/#{year}.stateofthemap.org"
+ command "jekyll build --trace --baseurl=https://#{year}.stateofthemap.org"
user "nobody"
group "nogroup"
environment "LANG" => "C.UTF-8"
supports "ubuntu"
depends "apache"
depends "git"
+depends "ruby"
include_recipe "apache"
include_recipe "git"
+include_recipe "ruby"
package %w[
gcc
g++
make
- ruby
- ruby-dev
libssl-dev
zlib1g-dev
pkg-config
apache_module "expires"
apache_module "rewrite"
-gem_package "bundler" do
- version "1.17.3"
-end
-
git "/srv/switch2osm.org" do
action :sync
repository "https://github.com/switch2osm/switch2osm.github.io.git"
depth 1
user "root"
group "root"
- notifies :run, "execute[/srv/switch2osm.org/Gemfile]"
+ notifies :run, "bundle_install[/srv/switch2osm.org]"
end
directory "/srv/switch2osm.org/_site" do
group "nogroup"
end
-execute "/srv/switch2osm.org/Gemfile" do
+bundle_install "/srv/switch2osm.org" do
action :nothing
- command "bundle install --deployment"
- cwd "/srv/switch2osm.org"
+ options "--deployment"
user "root"
group "root"
- notifies :run, "execute[/srv/switch2osm.org]"
+ notifies :run, "bundle_exec[/srv/switch2osm.org]"
end
-execute "/srv/switch2osm.org" do
+bundle_exec "/srv/switch2osm.org" do
action :nothing
- command "bundle exec jekyll build --trace --config _config.yml,_config_osm.yml"
- cwd "/srv/switch2osm.org"
+ command "jekyll build --trace --config _config.yml,_config_osm.yml"
user "nobody"
group "nogroup"
end
supports "ubuntu"
depends "accounts"
depends "apache"
-depends "passenger"
depends "git"
+depends "passenger"
+depends "ruby"
include_recipe "accounts"
include_recipe "apache"
-include_recipe "passenger"
include_recipe "git"
+include_recipe "passenger"
+include_recipe "ruby"
package %w[
libsqlite3-dev
pbzip2
]
-ruby_version = node[:passenger][:ruby_version]
-
-package "ruby#{ruby_version}"
-
-gem_package "bundler#{ruby_version}" do
- package_name "bundler"
- version "~> 1.16.2"
- gem_binary "gem#{ruby_version}"
- options "--format-executable"
-end
-
apache_module "cache"
apache_module "cache_disk"
apache_module "headers"
notifies :restart, "service[apache2]"
end
- execute "#{directory}/taginfo/Gemfile" do
+ bundle_install "#{directory}/taginfo" do
action :nothing
- command "bundle#{ruby_version} install"
- cwd "#{directory}/taginfo"
user "root"
group "root"
- subscribes :run, "gem_package[bundler#{ruby_version}]"
subscribes :run, "git[#{directory}/taginfo]"
notifies :restart, "passenger_application[#{directory}/taginfo/web/public]"
end
depends "munin"
depends "nodejs"
depends "passenger"
+depends "ruby"
depends "systemd"
depends "tools"
include_recipe "web::base"
-ruby = "ruby#{node[:passenger][:ruby_version]}"
+ruby = "ruby#{node[:ruby][:version]}"
rails_directory = "#{node[:web][:base_directory]}/rails"
template "/etc/cron.daily/web-cleanup" do
include_recipe "munin"
include_recipe "nodejs"
include_recipe "passenger"
+include_recipe "ruby"
include_recipe "tools"
include_recipe "web::base"
mode "755"
end
-ruby_version = node[:passenger][:ruby_version]
rails_directory = "#{node[:web][:base_directory]}/rails"
piwik = data_bag_item("web", "piwik")
end
rails_port "www.openstreetmap.org" do
- ruby ruby_version
directory rails_directory
user "rails"
group "rails"
overpass_url "https://query.openstreetmap.org/query-features"
end
-gem_package "bundler#{ruby_version}" do
- package_name "bundler"
- gem_binary "gem#{ruby_version}"
- options "--format-executable"
-end
-
-bundle = if File.exist?("/usr/bin/bundle#{ruby_version}")
- "/usr/bin/bundle#{ruby_version}"
- else
- "/usr/local/bin/bundle#{ruby_version}"
- end
-
systemd_service "rails-jobs@" do
description "Rails job queue runner"
type "simple"
environment "RAILS_ENV" => "production", "QUEUE" => "%I"
user "rails"
working_directory rails_directory
- exec_start "#{bundle} exec rake jobs:work"
+ exec_start "#{node[:ruby][:bundle]} exec rake jobs:work"
restart "on-failure"
private_tmp true
private_devices true
include_recipe "web::base"
-ruby = "ruby#{node[:passenger][:ruby_version]}"
+ruby = "ruby#{node[:ruby][:version]}"
rails_directory = "#{node[:web][:base_directory]}/rails"
template "/usr/local/bin/statistics" do
default_action :create
property :site, String, :name_property => true
-property :ruby, String, :default => "2.3"
property :directory, String
property :user, String
property :group, String
action :create do
package %W[
- ruby#{new_resource.ruby}
- ruby#{new_resource.ruby}-dev
imagemagick
nodejs
tzdata
libjpeg-turbo-progs
]
- gem_package "bundler#{new_resource.ruby}" do
- package_name "bundler"
- version "2.1.4"
- gem_binary "gem#{new_resource.ruby}"
- options "--format-executable"
- end
-
- gem_package "bundler#{new_resource.ruby}" do
- package_name "pkg-config"
- gem_binary "gem#{new_resource.ruby}"
- end
-
declare_resource :directory, rails_directory do
owner new_resource.user
group new_resource.group
end
end
- execute "#{rails_directory}/Gemfile" do
+ bundle_install "#{rails_directory}" do
action :nothing
- command "bundle#{new_resource.ruby} install"
- cwd rails_directory
user "root"
group "root"
environment "NOKOGIRI_USE_SYSTEM_LIBRARIES" => "yes"
- subscribes :run, "gem_package[bundler#{new_resource.ruby}]"
subscribes :run, "git[#{rails_directory}]"
end
- execute "#{rails_directory}/db/migrate" do
+ bundle_exec "#{rails_directory}/db/migrate" do
action :nothing
- command "bundle#{new_resource.ruby} exec rake db:migrate"
- cwd rails_directory
+ directory rails_directory
+ command "rails db:migrate"
user new_resource.user
group new_resource.group
subscribes :run, "git[#{rails_directory}]"
only_if { new_resource.build_assets }
end
- execute "#{rails_directory}/package.json" do
+ bundle_exec "#{rails_directory}/package.json" do
action :nothing
- command "bundle#{new_resource.ruby} exec rake yarn:install"
+ directory rails_directory
+ command "rails yarn:install"
environment "HOME" => rails_directory,
"RAILS_ENV" => "production"
- cwd rails_directory
user new_resource.user
group new_resource.group
subscribes :run, "git[#{rails_directory}]"
only_if { new_resource.build_assets }
end
- execute "#{rails_directory}/app/assets/javascripts/i18n" do
+ bundle_exec "#{rails_directory}/app/assets/javascripts/i18n" do
action :nothing
- command "bundle#{new_resource.ruby} exec rake i18n:js:export"
+ directory rails_directory
+ command "rails i18n:js:export"
environment "HOME" => rails_directory,
"RAILS_ENV" => "production"
- cwd rails_directory
user new_resource.user
group new_resource.group
subscribes :run, "git[#{rails_directory}]"
only_if { new_resource.build_assets }
end
- execute "#{rails_directory}/public/assets" do
+ bundle_exec "#{rails_directory}/public/assets" do
action :nothing
- command "bundle#{new_resource.ruby} exec rake assets:precompile"
+ directory rails_directory
+ command "rails assets:precompile"
environment "HOME" => rails_directory,
"RAILS_ENV" => "production"
- cwd rails_directory
user new_resource.user
group new_resource.group
subscribes :run, "git[#{rails_directory}]"
subscribes :run, "file[#{rails_directory}/config/settings.local.yml]"
subscribes :run, "file[#{rails_directory}/config/storage.yml]"
subscribes :run, "file[#{rails_directory}/config/piwik.yml]"
- subscribes :run, "execute[#{rails_directory}/package.json]"
- subscribes :run, "execute[#{rails_directory}/app/assets/javascripts/i18n]"
+ subscribes :run, "bundle_exec[#{rails_directory}/package.json]"
+ subscribes :run, "bundle_exec[#{rails_directory}/app/assets/javascripts/i18n]"
only_if { new_resource.build_assets }
end
subscribes :restart, "file[#{rails_directory}/config/settings.local.yml]"
subscribes :restart, "file[#{rails_directory}/config/storage.yml]"
subscribes :restart, "file[#{rails_directory}/config/piwik.yml]"
- subscribes :restart, "execute[#{rails_directory}/Gemfile]"
- subscribes :restart, "execute[#{rails_directory}/db/migrate]"
- subscribes :restart, "execute[#{rails_directory}/package.json]"
- subscribes :restart, "execute[#{rails_directory}/app/assets/javascripts/i18n]"
- subscribes :restart, "execute[#{rails_directory}/public/assets]"
+ subscribes :restart, "bundle_installl[#{rails_directory}]"
+ subscribes :restart, "bundle_exec[#{rails_directory}/db/migrate]"
+ subscribes :restart, "bundle_exec[#{rails_directory}/package.json]"
+ subscribes :restart, "bundle_exec[#{rails_directory}/app/assets/javascripts/i18n]"
+ subscribes :restart, "bundle_exec[#{rails_directory}/public/assets]"
only_if { ::File.exist?("/usr/bin/passenger-config") }
end