Sha256: 694cb72339a1bca6bd98a9745cb86ddaaeeb06a3b50dc93b598770d811b82165

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 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 tiny_cms.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

8 entries across 8 versions & 1 rubygems

Version Path
tiny_cms-0.2.10 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.8 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.6 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.5 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.4 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.3 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.2 generators/tiny_cms_assets/tiny_cms_assets_generator.rb
tiny_cms-0.2.1 generators/tiny_cms_assets/tiny_cms_assets_generator.rb