Class: Registry::Installer
- Defined in:
- lib/radiant/extension/script.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #copy_to_vendor_extensions ⇒ Object
-
#initialize(url, name) ⇒ Installer
constructor
A new instance of Installer.
- #install ⇒ Object
- #migrate ⇒ Object
- #update ⇒ Object
Methods inherited from Action
#file_utils, #rake, #tasks_include?
Constructor Details
#initialize(url, name) ⇒ Installer
Returns a new instance of Installer.
61 62 63 |
# File 'lib/radiant/extension/script.rb', line 61 def initialize(url, name) self.url, self.name = url, name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
60 61 62 |
# File 'lib/radiant/extension/script.rb', line 60 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
60 61 62 |
# File 'lib/radiant/extension/script.rb', line 60 def path @path end |
#url ⇒ Object
Returns the value of attribute url.
60 61 62 |
# File 'lib/radiant/extension/script.rb', line 60 def url @url end |
Instance Method Details
#copy_to_vendor_extensions ⇒ Object
71 72 73 74 |
# File 'lib/radiant/extension/script.rb', line 71 def copy_to_vendor_extensions cp_r(self.path, File.(File.join(RAILS_ROOT, 'vendor', 'extensions', name))) rm_r(self.path) end |
#install ⇒ Object
65 66 67 68 69 |
# File 'lib/radiant/extension/script.rb', line 65 def install copy_to_vendor_extensions migrate update end |
#migrate ⇒ Object
76 77 78 |
# File 'lib/radiant/extension/script.rb', line 76 def migrate rake "radiant:extensions:#{name}:migrate" end |
#update ⇒ Object
80 81 82 |
# File 'lib/radiant/extension/script.rb', line 80 def update rake "radiant:extensions:#{name}:update" end |