Class: InstallTheme::InstallThemeGenerator

Inherits:
RubiGen::Base
  • Object
show all
Defined in:
lib/install_theme/install_theme_generator.rb

Instance Method Summary collapse

Instance Method Details

#manifestObject

NOTE: runtime_options needs to be passed in to #new



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/install_theme/install_theme_generator.rb', line 4

def manifest
  record do |m|
    files = Dir[File.join(source_root, "**/*")].map do |f|
      f.gsub(source_root, "").gsub(%r{^/}, '')
    end
    directories = files.map { |f| File.dirname(f) }.uniq.sort
    directories.each do |dir|
      m.directory dir
    end
    files.sort.each do |f|
      next if File.directory?(File.join(source_root, f))
      m.file f, f
    end
  end
end