Sha256: 6b56c2780374fac8ecdfc84789a5b6c083b8fcd3d3bb94b248f1bc6437b23cd8
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
require 'rails/generators' module Omnisocial module Generators class OmnisocialGenerator < Rails::Generators::Base include Rails::Generators::Migration desc 'Creates an omnisocial initializer and copies image and CSS assets.' def self.source_root File.join(File.dirname(__FILE__), 'templates') end def copy_initializer template 'omnisocial.rb', 'config/initializers/omnisocial.rb' end def copy_user_model template 'user.rb', 'app/models/user.rb' end def copy_assets copy_file 'assets/stylesheets/omnisocial.css', 'public/stylesheets/omnisocial.css' copy_file 'assets/images/twitter.gif', 'public/images/omnisocial/twitter.gif' copy_file 'assets/images/facebook.png', 'public/images/omnisocial/facebook.png' copy_file 'assets/images/signin_twitter.png', 'public/images/omnisocial/signin_twitter.png' copy_file 'assets/images/signin_facebook.png', 'public/images/omnisocial/signin_facebook.png' end def show_readme readme 'README' if behavior == :invoke end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cornflakeomnisocial-0.1.2.3 | lib/generators/omnisocial/omnisocial_generator.rb |