Sha256: 431979ea118494b287a8f8a04bea683bb6f4556d721e252482d9f7c5945fc2ec

Contents?: true

Size: 813 Bytes

Versions: 5

Compression:

Stored size: 813 Bytes

Contents

require 'securerandom'
require 'rails/generators'
require 'rails/generators/migration'

module RubyGallery
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration
      source_root File.expand_path("../../templates", __FILE__)
      
      desc "Creates a Congig file and copy locate files to your application."
      
      class_option :orm

      def inject_javascript
        append_to_file 'app/assets/javascripts/application.js' do
          out = "\n"
          out << "//= require ruby_gallery/app"
        end
      end
      
      def inject_css
        append_to_file 'app/assets/stylesheets/application.css' do
          out = "\n"
          out << "/* *= require ruby_gallery/styles */"
        end      
      end
      
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby_gallery-0.2.2 lib/generators/ruby_gallery/install_generator.rb
ruby_gallery-0.2.1 lib/generators/ruby_gallery/install_generator.rb
ruby_gallery-0.1.9 lib/generators/ruby_gallery/install_generator.rb
ruby_gallery-0.1.8 lib/generators/ruby_gallery/install_generator.rb
ruby_gallery-0.1.7 lib/generators/ruby_gallery/install_generator.rb