Class: Registry::Gem
- Defined in:
- lib/radiant/extension/script.rb
Instance Attribute Summary
Attributes inherited from Installer
Instance Method Summary collapse
Methods inherited from Download
#filename, #initialize, #install
Methods inherited from Installer
#copy_to_vendor_extensions, #initialize, #install, #migrate, #update
Methods inherited from Action
Constructor Details
This class inherits a constructor from Registry::Download
Instance Method Details
#download ⇒ Object
158 159 160 161 162 163 164 165 166 |
# File 'lib/radiant/extension/script.rb', line 158 def download # Don't download the gem if it's already installed begin gem filename.split('-').first rescue ::Gem::LoadError super `gem install #{filename}` end end |
#unpack ⇒ Object
168 169 170 171 |
# File 'lib/radiant/extension/script.rb', line 168 def unpack output = `cd #{Dir.tmpdir}; gem unpack #{filename.split('-').first}` self.path = output.match(/'(.*)'/)[1] end |