<commit_before>class SocialStream::Base::InstallGenerator < Rails::Generators::Base #:nodoc:
  include Rails::Generators::Migration

  hook_for :taggings, :as => :migration
  hook_for :authentication
  hook_for :messages

  source_root File.expand_path(File.join('..', 'templates'), __FILE__)

  def devise_initializer_config
    inject_into_file "config/initializers/devise.rb",
                     "\n  config.omniauth :linked_in, \"ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB\", \"WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY\"
                      \n  config.omniauth :facebook, \"129571360447856\",\"<KEY>\"
                      \n  #config.omniauth :twitter, \"<KEY>\",\"<KEY>\"
                      \n  config.token_authentication_key = :auth_token
                      \n  config.stateless_token = true",
                      :after => "  # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'"
  end

  def create_devise_route
    route "devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}"
  end

  def create_initializer_file
    copy_file 'initializer.rb', 'config/initializers/social_stream.rb'
  end

  def create_config_relations_file
    copy_file 'relations.yml', 'config/relations.yml'
  end

  def remove_public_index
    remove_file 'public/index.html'
  end

  def remove_application_layout
    remove_file 'app/views/layouts/application.html.erb'
  end

  def create_navigation_config
    copy_file 'navigation.rb', 'config/navigation.rb'
  end

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

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

  def create_migration_file
    require 'rake'
    Rails.application.load_tasks
    Rake::Task['social_stream_base_engine:install:migrations'].invoke
  end
end
<commit_msg>Fix generator copying of migrations<commit_after>class SocialStream::Base::InstallGenerator < Rails::Generators::Base #:nodoc:
  include Rails::Generators::Migration

  hook_for :taggings, :as => :migration
  hook_for :authentication
  hook_for :messages

  source_root File.expand_path(File.join('..', 'templates'), __FILE__)

  def devise_initializer_config
    inject_into_file "config/initializers/devise.rb",
                     "\n  config.omniauth :linked_in, \"ekxfXU8nueVSMQ9fc5KJAryBkyztUlCBYMW3DoQPzbE79WhivvzhQloRNHCHgPeB\", \"WYiHFT-KKFgjd45W3-pEAficmXRHmN6_6DGwj1C_ZILJlSO1gBvv6VNYXU9tybGY\"
                      \n  config.omniauth :facebook, \"129571360447856\",\"eef39dce5e20e76f77495c59623bdb38\"
                      \n  #config.omniauth :twitter, \"wgTxO0fTpjTeSnjKC9ZHA\",\"<KEY>\"
                      \n  config.token_authentication_key = :auth_token
                      \n  config.stateless_token = true",
                      :after => "  # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'"
  end

  def create_devise_route
    route "devise_for :users, :controllers => {:omniauth_callbacks => 'omniauth_callbacks'}"
  end

  def create_initializer_file
    copy_file 'initializer.rb', 'config/initializers/social_stream.rb'
  end

  def create_config_relations_file
    copy_file 'relations.yml', 'config/relations.yml'
  end

  def remove_public_index
    remove_file 'public/index.html'
  end

  def remove_application_layout
    remove_file 'app/views/layouts/application.html.erb'
  end

  def create_navigation_config
    copy_file 'navigation.rb', 'config/navigation.rb'
  end

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

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

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

{'fraction_non_alphanumeric': 0.10736889692585895, 'fraction_numerical': 0.018309222423146473, 'mean_word_length': 3.1086350974930363, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5321231', 'n_tokens_mistral': 1572, 'n_tokens_neox': 1451, 'n_words': 229}