Sha256: 1a5fc854d5fa2d8100f09e884ea91aa30bf5d7907a5289a7db1d0c5bf116e0a0
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
if defined?(Rails) && Rails::VERSION::MAJOR >= 3 class HughAssetsGenerator < Rails::Generators::Base include Rails::Generators::Actions def create_hugh_file empty_directory('public/javascripts') copy_file( File.join(File.dirname(__FILE__), 'templates', 'hugh.js'), 'public/javascripts/hugh.js' ) empty_directory('public/stylesheets/images/hugh') copy_file( File.join(File.dirname(__FILE__), 'templates', 'hugh.css'), 'public/stylesheets/hugh.css' ) copy_file( File.join(File.dirname(__FILE__), 'templates', 'spectrum.png'), 'public/stylesheets/images/hugh/spectrum.png' ) copy_file( File.join(File.dirname(__FILE__), 'templates', 'handle.png'), 'public/stylesheets/images/hugh/handle.png' ) readme(File.join(File.dirname(__FILE__), 'templates', 'NOTES')) end end else class HughAssetsGenerator < Rails::Generator::Base def manifest record do |m| m.directory('public/javascripts') m.file('hugh.js', 'public/javascripts/hugh.js') m.directory('public/stylesheets/images/hugh') m.file('hugh.css', 'public/stylesheets/hugh.css') m.file('spectrum.png', 'public/stylesheets/images/hugh/spectrum.png') m.file('handle.png', 'public/stylesheets/images/hugh/handle.png') m.readme('NOTES') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hugh-0.1.1 | generators/hugh_assets/hugh_assets_generator.rb |
hugh-0.1.0 | generators/hugh_assets/hugh_assets_generator.rb |