38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/generators/dailycred_generator.rb', line 38
def install
puts "DEPRECATED: calling `rails generate dailycred` has been deprecated. Please use `rails generate dailycred:install`."
template "omniauth.rb", "config/initializers/omniauth.rb"
puts "Please manually configure your API keys in config/initializers/omniauth.rb"
if options.bootstrap?
insert_into_file "app/controllers/application_controller.rb", APP_CONTROLLER_LINES, :after => /class ApplicationController\n|class ApplicationController .*\n/
copy_file "user.rb", "app/models/user.rb"
copy_file "migration_create_user.rb", "db/migrate/#{Time.now.strftime('%Y%m%d%H%M%S')}_create_users.rb"
inject_into_file "config/routes.rb", APP_ROUTES_LINES, :after => ".draw do\n"
else
puts "Make sure you implement your omniauth callback. For directions visit https://github.com/intridea/omniauth#integrating-omniauth-into-your-application"
end
end
|