Class: PoolParty::Plugin::Ruby

Inherits:
PoolParty::Plugin show all
Defined in:
lib/poolparty/plugins/ruby.rb

Instance Method Summary collapse

Methods included from PoolParty::Plugin

available

Instance Method Details

#enableObject



5
6
7
# File 'lib/poolparty/plugins/ruby.rb', line 5

def enable
  install_base_packages
end

#enable_irbObject



32
33
34
# File 'lib/poolparty/plugins/ruby.rb', line 32

def enable_irb
  has_package(:name => "irb1.8")
end

#enable_rdocObject



36
37
38
# File 'lib/poolparty/plugins/ruby.rb', line 36

def enable_rdoc
  has_package(:name => "rdoc1.8")
end

#enable_riObject



28
29
30
# File 'lib/poolparty/plugins/ruby.rb', line 28

def enable_ri
  has_package(:name => "ri1.8")
end

#install_base_packagesObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/poolparty/plugins/ruby.rb', line 9

def install_base_packages
  has_package(:name => "libreadline-ruby1.8")
  has_package(:name => "libruby1.8")
  has_package(:name => "ruby1.8-dev")
  has_package(:name => "ruby1.8")
  
  has_line_in_file(:line => "export PATH=$PATH:/var/lib/gems/1.8/bin", :file => "/etc/profile")
  
  # exec(:name => "update-rubygems") do
  #   command "gem update --system"
  #   onlyif "gem -v | grep 1."
  #   notify 'Exec["fix-updated-rubygems"]'
  # end
  # exec(:name => "fix-updated-rubygems") do
  #   command "awk \'{print} NR == 9 {print \"require \"rubygems/gem_runner\"\"}\' /usr/bin/gem"
  #   ifnot "awk \"/gem_runner/\" /usr/bin/gem"
  # end
end