Class: Registry::Checkout

Inherits:
Installer show all
Defined in:
lib/radiant/extension/script.rb

Direct Known Subclasses

Git, Subversion

Instance Attribute Summary

Attributes inherited from Installer

#name, #path, #url

Instance Method Summary collapse

Methods inherited from Installer

#copy_to_vendor_extensions, #migrate, #update

Methods inherited from Action

#file_utils, #rake, #tasks_include?

Constructor Details

#initialize(extension) ⇒ Checkout

Returns a new instance of Checkout.



106
107
108
# File 'lib/radiant/extension/script.rb', line 106

def initialize(extension)
  super(extension.repository_url, extension.name)
end

Instance Method Details

#checkoutObject



119
120
121
122
# File 'lib/radiant/extension/script.rb', line 119

def checkout
  self.path = File.join(Dir.tmpdir, name)
  cd(Dir.tmpdir) { system "#{checkout_command}" }
end

#checkout_commandObject



110
111
112
# File 'lib/radiant/extension/script.rb', line 110

def checkout_command
  raise "Not Implemented!"
end

#installObject



114
115
116
117
# File 'lib/radiant/extension/script.rb', line 114

def install
  checkout
  super
end