Sha256: 26927209f10263ffe9804bb8372924f9fd8acd0750e9f3022de2dc900b974520

Contents?: true

Size: 927 Bytes

Versions: 90

Compression:

Stored size: 927 Bytes

Contents

class SocialStream::Presence::InstallGenerator < Rails::Generators::Base
  include Rails::Generators::Migration
  
  source_root File.expand_path('../templates', __FILE__)

  def create_initializer_file
    template 'initializer.rb', 'config/initializers/social_stream_presence.rb'
  end

  def create_migration_file
    require 'rake'
    Rails.application.load_tasks
    Rake::Task['railties:install:migrations'].reenable
    Rake::Task['social_stream_presence_engine:install:migrations'].invoke
  end

  def require_javascripts
    inject_into_file 'app/assets/javascripts/application.js',
                     "//= require social_stream-presence\n",
                     :before => '//= require_tree .'
  end

  def require_stylesheets
    inject_into_file 'app/assets/stylesheets/application.css',
                     " *= require social_stream-presence\n",
                     :before => ' *= require_tree .'
  end
end

Version data entries

90 entries across 90 versions & 3 rubygems

Version Path
social_stream-0.28.4 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.28.1 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.28.0 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.15.0 lib/generators/social_stream/presence/install_generator.rb
social_stream-0.27.3 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.27.2 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.27.1 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.27.0 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.14.0 lib/generators/social_stream/presence/install_generator.rb
social_stream-0.26.2 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.13.3 lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.13.2 lib/generators/social_stream/presence/install_generator.rb
social_stream-0.26.1 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.13.1 lib/generators/social_stream/presence/install_generator.rb
social_stream-0.26.0 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.13.0 lib/generators/social_stream/presence/install_generator.rb
social_stream-0.25.2 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.25.1 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-0.25.0 presence/lib/generators/social_stream/presence/install_generator.rb
social_stream-presence-0.12.0 lib/generators/social_stream/presence/install_generator.rb