-default[:ruby][:fullstaq] = false
-
-if node[:ruby][:fullstaq]
-
- default[:ruby][:version] = "3.4"
- default[:ruby][:interpreter] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/ruby"
- default[:ruby][:gem] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/gem"
- default[:ruby][:bundle] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/bundle"
-
-else
-
- default[:ruby][:version] = if platform?("debian")
- "3.1"
- elsif node[:lsb][:release].to_f < 22.04
- "2.7"
- else
- "3.0"
- end
- default[:ruby][:interpreter] = "/usr/bin/ruby#{node[:ruby][:version]}"
- default[:ruby][:gem] = "/usr/bin/gem#{node[:ruby][:version]}"
- default[:ruby][:bundle] = "/usr/bin/bundle#{node[:ruby][:version]}"
-
-end
+default[:ruby][:version] = "3.4"
+default[:ruby][:interpreter] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/ruby"
+default[:ruby][:gem] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/gem"
+default[:ruby][:bundle] = "/usr/lib/fullstaq-ruby/versions/#{node[:ruby][:version]}-jemalloc/bin/bundle"
# limitations under the License.
#
-ruby_version = node[:ruby][:version]
-
-if node[:ruby][:fullstaq]
-
- include_recipe "apt::fullstaq-ruby"
-
- package %W[
- fullstaq-ruby-common
- fullstaq-ruby-#{ruby_version}-jemalloc
- ]
-
- %w[bundle bundler erb gem irb racc rake rbs rdbg rdoc ri ruby syntax_suggest typeproc].each do |command|
- link "/usr/local/bin/#{command}" do
- to "/usr/lib/fullstaq-ruby/versions/#{ruby_version}-jemalloc/bin/#{command}"
- owner "root"
- group "root"
- end
- end
+include_recipe "apt::fullstaq-ruby"
-else
+ruby_version = node[:ruby][:version]
- package %W[
- ruby
- ruby#{ruby_version}
- ruby-dev
- ruby#{ruby_version}-dev
- ]
+package %W[
+ fullstaq-ruby-common
+ fullstaq-ruby-#{ruby_version}-jemalloc
+]
- gem_package "bundler#{ruby_version}-1" do
- package_name "bundler"
- version "~> 1.17.3"
- gem_binary node[:ruby][:gem]
- options "--format-executable"
+%w[bundle bundler erb gem irb racc rake rbs rdbg rdoc ri ruby syntax_suggest typeproc].each do |command|
+ link "/usr/local/bin/#{command}" do
+ to "/usr/lib/fullstaq-ruby/versions/#{ruby_version}-jemalloc/bin/#{command}"
+ owner "root"
+ group "root"
end
-
- gem_package "bundler#{ruby_version}-2" do
- package_name "bundler"
- version "~> 2.3.16"
- gem_binary node[:ruby][:gem]
- options "--format-executable"
- end
-
end
end
def after_created
- subscribes :run, "gem_package[bundler#{node[:ruby][:version]}-1]"
- subscribes :run, "gem_package[bundler#{node[:ruby][:version]}-2]"
+ subscribes :run, "package[fullstaq-ruby-#{node[:ruby][:version]}-jemalloc]"
end
}
}
},
- :ruby => {
- :fullstaq => true
- },
:sysctl => {
:postgres => {
:comment => "Increase shared memory for postgres",
:passenger => {
:max_pool_size => 50
},
- :ruby => {
- :fullstaq => true
- },
:exim => {
:local_domains => ["messages.openstreetmap.org"],
:routes => {