Sha256: 93b4d1aa0dbf8d572000b7d3306ae357d6034def915288e812648b192e726d05
Contents?: true
Size: 664 Bytes
Versions: 6
Compression:
Stored size: 664 Bytes
Contents
module Nesta module Commands module Theme class Install def initialize(*args) @url = args.shift @url.nil? && (raise UsageError.new('URL not specified')) options = args.shift || {} end def theme_name File.basename(@url, '.git').sub(/nesta-theme-/, '') end def execute(process) process.run('git', 'clone', @url, "themes/#{theme_name}") FileUtils.rm_rf(File.join("themes/#{theme_name}", '.git')) enable(process) end def enable(process) Enable.new(theme_name).execute(process) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems