]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/ruby/recipes/default.rb
Use system ruby for tile servers
[chef.git] / cookbooks / ruby / recipes / default.rb
index cbf2c53f3e40a6a6e390d05fe46ae0da8db41032..7301e372c351b88bcf1d56e6b189c10cd680d421 100644 (file)
 # limitations under the License.
 #
 
-include_recipe "apt::fullstaq-ruby"
-
 ruby_version = node[:ruby][:version]
 
-package %W[
-  fullstaq-ruby-common
-  fullstaq-ruby-#{ruby_version}-jemalloc
-]
+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"
+  %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
+
+else
+
+  package %W[
+    ruby
+    ruby-dev
+    ruby-bundler
+  ]
+
 end