Module: DeviseConfigGenerator::GemHelper

Included in:
Devise::Generators::ConfigGenerator
Defined in:
lib/generators/devise/config/gem_config_helper.rb

Instance Method Summary collapse

Instance Method Details

#configure_gems_active_recordObject



12
13
14
# File 'lib/generators/devise/config/gem_config_helper.rb', line 12

def configure_gems_active_record
  say "Configuring for Active Record"
end

#configure_gems_couch_dbObject



34
35
36
37
38
# File 'lib/generators/devise/config/gem_config_helper.rb', line 34

def configure_gems_couch_db
  say "Configuring for Couch DB"
  add_gem 'devise_couch'
  say "WARNING: Couch DB does not currently have a complete Roles implementation (admin_flag only). Please help implement the Roles strategy adapter.", :yellow
end

#configure_gems_data_mapperObject



16
17
18
19
# File 'lib/generators/devise/config/gem_config_helper.rb', line 16

def configure_gems_data_mapper
  say "Configuring for Data Mapper"
  add_gem 'dm-devise'
end

#configure_gems_mongo_mapperObject



21
22
23
24
25
# File 'lib/generators/devise/config/gem_config_helper.rb', line 21

def configure_gems_mongo_mapper
  say "Configuring for Mongo Mapper"
  add_gem 'mm-devise'
  gems_mongo_db          
end

#configure_gems_mongoidObject



27
28
29
30
31
32
# File 'lib/generators/devise/config/gem_config_helper.rb', line 27

def configure_gems_mongoid
  say "Configuring for Mongoid"
  # say "Please configure Devise for Mongoid similar to Rails 3 example app: http://github.com/fortuity/rails3-mongoid-devise"
  add_gem 'mongoid', '>= 2.0.0.beta.20'
  gems_mongo_db
end

#devise_mongoid_setupObject



7
8
9
10
# File 'lib/generators/devise/config/gem_config_helper.rb', line 7

def devise_mongoid_setup
  rgen 'mongoid:config'
  rgen "devise mongoid" 
end

#gems_mongo_dbObject



3
4
5
# File 'lib/generators/devise/config/gem_config_helper.rb', line 3

def gems_mongo_db
  add_gem 'bson_ext', '>= 1.1.4'
end