Sha256: 2a58141398f37b91ed2be112898f75a4f58e6da4cba71079b38303e95e0fce3a

Contents?: true

Size: 995 Bytes

Versions: 3

Compression:

Stored size: 995 Bytes

Contents

class TinyCmsAssetsGenerator < Rails::Generator::Base
  def manifest
    record do |m|
      m.directory "config/locales"
      m.file '../../../lib/tiny_cms/tiny_cms.en.yml', 'config/locales/tiny_cms.en.yml'
      
      m.directory "public/javascripts/jquery-tree/jquery-tree-plugins"

      %w(jquery-1.4.2.min.js jquery-ui-dialog.js pages.js).each do |file|
        m.file "javascripts/#{file}", "public/javascripts/#{file}"      
      end
      
      %w(jquery-tree-plugins/jquery.tree.contextmenu.js jquery.tree.min.js).each do |file|
        m.file "javascripts/jquery-tree/#{file}", "public/javascripts/jquery-tree/#{file}"      
      end
      
      directory = nil
      Dir.glob("#{ spec.path }/templates/stylesheets/**/*.*").each do |file|
        file = file.gsub("#{ spec.path }/templates/", '')
        m.directory directory = "public/#{ File.dirname(file) }" if directory != "public/#{ File.dirname(file) }"
        m.file file, "public/#{ file }"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tiny_cms-0.2.0 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.1.1 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.1.0 generators/tiny_cms_assets/tiny_cms_assets_generator.rb