Class: FacebookRailsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/facebook_rails/facebook_rails_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



4
5
6
# File 'lib/generators/facebook_rails/facebook_rails_generator.rb', line 4

def self.source_root
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end

Instance Method Details

#copy_configurationObject



8
9
10
# File 'lib/generators/facebook_rails/facebook_rails_generator.rb', line 8

def copy_configuration
  template 'facebook.yml', 'config/facebook.yml'
end

#copy_spec_filesObject



12
13
14
# File 'lib/generators/facebook_rails/facebook_rails_generator.rb', line 12

def copy_spec_files
  directory 'f8_user_mocks', 'spec/f8_user_mocks'
end

#insert_spec_helperObject



16
17
18
# File 'lib/generators/facebook_rails/facebook_rails_generator.rb', line 16

def insert_spec_helper
  insert_into_file "spec/spec_helper.rb", "require 'facebook_rails/test'\n", :after => "require 'rspec/rails'\n"
end