lib/generators/devise/config/config_generator.rb in cream-0.8.9.2 vs lib/generators/devise/config/config_generator.rb in cream-0.8.9.3
- old
+ new
@@ -1,10 +1,9 @@
require 'sugar-high/file'
require 'sugar-high/module'
require 'cream'
require 'rails3_artifactor'
-require 'logging_assist'
require 'generators/cream/helpers/all'
# include helpers
require_all File.dirname(__FILE__)
@@ -15,15 +14,16 @@
argument :user_class, :type => :string, :default => 'User', :desc => "User class"
# ORM to use
class_option :orm, :type => :string, :default => 'active_record', :desc => "ORM to use"
+ class_option :logging, :type => :boolean, :default => false, :desc => "Logging on?"
class_option :logfile, :type => :string, :default => nil, :desc => "Logfile location"
class_option :gems, :type => :boolean, :default => true, :desc => "Add gems to gemfile?"
def configure_devise
- logger.add_logfile :logfile => logfile if logfile
+ logit!
devise_gems if gems?
say "WARNING: Not configuring devise gems for #{orm}", :yellow if !gems?
devise_install
configure_devise!
@@ -41,13 +41,13 @@
include DeviseConfigGenerator::AppHelper
include DeviseConfigGenerator::GemHelper
def devise_install
if devise_initializer?
- logger.debug "initializers/devise.rb was found so devise:install will not be run"
+ debug! "initializers/devise.rb was found so devise:install will not be run"
return
end
- logger.debug "initializers/devise.rb was NOT found so devise:install will now be run"
+ debug! "initializers/devise.rb was NOT found so devise:install will now be run"
rgen 'devise:install'
end
# see app_helper.rb
def configure_devise!
\ No newline at end of file