Class: Registry::Git
Instance Attribute Summary
Attributes inherited from Installer
#name, #path, #url
Instance Method Summary
collapse
Methods inherited from Checkout
#initialize, #install
Methods inherited from Installer
#initialize, #install, #migrate, #update
Methods inherited from Action
#file_utils, #rake, #tasks_include?
Instance Method Details
#checkout ⇒ Object
159
160
161
162
163
164
165
166
167
168
169
170
171
|
# File 'lib/radiant/extension/script.rb', line 159
def checkout
if project_in_git?
system "git submodule add #{url} vendor/extensions/#{name}"
cd(File.join('vendor', 'extensions', name)) do
system "git submodule init && git submodule update"
end
else
super
cd(path) do
system "git submodule init && git submodule update"
end
end
end
|
#checkout_command ⇒ Object
155
156
157
|
# File 'lib/radiant/extension/script.rb', line 155
def checkout_command
"git clone #{url} #{name}"
end
|
#copy_to_vendor_extensions ⇒ Object
173
174
175
|
# File 'lib/radiant/extension/script.rb', line 173
def copy_to_vendor_extensions
super unless project_in_git?
end
|
#project_in_git? ⇒ Boolean
151
152
153
|
# File 'lib/radiant/extension/script.rb', line 151
def project_in_git?
@in_git ||= File.directory?(".git")
end
|