Sha256: 12d58d680b85ff0b0ce306fa485353c8d1a6095773122b47de8c7d593c1d912c

Contents?: true

Size: 589 Bytes

Versions: 10

Compression:

Stored size: 589 Bytes

Contents

require 'fileutils'

class CkeditorInstallGenerator < Rails::Generator::Base

  def manifest
    record do |m|
      copy_initializer(m)
      copy_javascripts(m)
      
      m.readme "README"
    end
  end

  private
  
    def copy_initializer(m)
      m.directory "config/initializers"
      m.template  "ckeditor.rb", "config/initializers/ckeditor.rb"
    end
    
    def copy_javascripts(m)
      src_dir = File.join(@source_root, 'ckeditor')
      dst_dir = File.join(RAILS_ROOT, 'public', 'javascripts')
      
      FileUtils.cp_r src_dir, dst_dir, :verbose => true
    end

end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
artemk-ckeditor-3.5.5 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-jess-3.4.3 generators/ckeditor_install/ckeditor_install_generator.rb
artemk-ckeditor-3.5.4 generators/ckeditor_install/ckeditor_install_generator.rb
artemk-ckeditor-3.4.4 generators/ckeditor_install/ckeditor_install_generator.rb
artemk-ckeditor-3.4.3 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-3.4.3 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-3.4.2 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-3.4.1 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-3.4.0 generators/ckeditor_install/ckeditor_install_generator.rb
ckeditor-3.3.2 generators/ckeditor_install/ckeditor_install_generator.rb