Class: Jammer::PackageInstaller
- Inherits:
-
Object
- Object
- Jammer::PackageInstaller
- Defined in:
- lib/jammer/package_installer.rb
Constant Summary collapse
- JAM_PACKAGE_REGEX =
/jam\s[\'\"](\w+)[\'\"](?:,\s['"](.*)['"])?/
Instance Method Summary collapse
Instance Method Details
#get_packages ⇒ Object
17 18 19 |
# File 'lib/jammer/package_installer.rb', line 17 def get_packages package_file.scan(JAM_PACKAGE_REGEX) end |
#install_packages ⇒ Object
6 7 8 9 10 11 |
# File 'lib/jammer/package_installer.rb', line 6 def install_packages packages.each do |package| puts "installing #{package}" `jam install #{package.first}#{"@" + package.last if package.last}` end end |
#package_file ⇒ Object
21 22 23 |
# File 'lib/jammer/package_installer.rb', line 21 def package_file @package_file ||= File.read('Jamfile') end |
#packages ⇒ Object
13 14 15 |
# File 'lib/jammer/package_installer.rb', line 13 def packages @packages ||= get_packages end |