Module: Linebook::Os::Ubuntu

Includes:
Linux
Defined in:
lib/linebook/os/ubuntu.rb

Instance Method Summary collapse

Methods included from Linux

#_login, #capture_script, #guess_target_name, #login

Methods included from Linux::Utilities

#_group?, #_groupadd, #_groupdel, #_groupmod, #_groups, #_gzip, #_hostname, #_install, #_md5sum, #_mktemp, #_su, #_tar, #_user?, #_useradd, #_userdel, #_usermod, #group?, #groupadd, #groupdel, #groupmod, #groups, #gzip, #hostname, #install, #md5sum, #mktemp, #su, #tar, #user?, #useradd, #userdel, #usermod

Methods included from Posix

#_append, #_break_, #_check_status, #_check_status_function, #_comment, #_continue_, #_elif_, #_else_, #_execute, #_exit_, #_from, #_heredoc, #_if_, #_redirect, #_return_, #_section, #_to, #_unless_, #_until_, #_variable, #_while_, #append, #break_, #check_status, #check_status_function, #command_str, #comment, #continue_, #elif_, #else_, #execute, #exit_, #from, #function, #function?, #functions, #heredoc, #if_, #option?, #option_quote, #options_str, #program_name, #quote, #quoted?, #redirect, #return_, #section, #signature, #to, #trailer, #unless_, #until_, #var, #variable, #while_

Methods included from Posix::Utilities

#_basename, #_cat, #_cd, #_chgrp, #_chmod, #_chown, #_cmp, #_comm, #_cp, #_cut, #_date, #_directory?, #_dirname, #_echo, #_executable?, #_exists?, #_expand, #_export, #_file?, #_fold, #_grep, #_has_content?, #_head, #_id, #_link?, #_ln, #_ls, #_mkdir, #_mv, #_paste, #_pathchk, #_pwd, #_read, #_readable?, #_rm, #_rmdir, #_sed, #_set, #_sort, #_split, #_tail, #_touch, #_tr, #_tsort, #_uname, #_unexpand, #_uniq, #_unset, #_wc, #_writable?, #basename, #cat, #cd, #chgrp, #chmod, #chown, #cmp, #comm, #cp, #cut, #date, #directory?, #dirname, #echo, #executable?, #exists?, #expand, #export, #file?, #fold, #grep, #has_content?, #head, #id, #link?, #ln, #ls, #mkdir, #mv, #paste, #pathchk, #pwd, #read, #readable?, #rm, #rmdir, #sed, #set, #sort, #split, #tail, #touch, #tr, #tsort, #uname, #unexpand, #uniq, #unset, #wc, #writable?

Instance Method Details

#_package(*args, &block) ⇒ Object

:nodoc:



16
17
18
19
20
# File 'lib/linebook/os/ubuntu.rb', line 16

def _package(*args, &block) # :nodoc:
  str = capture_str { package(*args, &block) }
  str.strip!
  str
end

#package(name, version = nil, options = {:q => true, :y => true}) ⇒ Object

Installs a package using apt-get.



10
11
12
13
14
# File 'lib/linebook/os/ubuntu.rb', line 10

def package(name, version=nil, options={:q => true, :y => true})
  name = "#{name}=#{version}" unless version.to_s.strip.empty?
  execute "apt-get install", name, options
  chain_proxy
end