Permalink
Browse files

DeviseGenerator#replace_default_devise_orm is no longer needed

Devise inserts the generator ORM.
  • Loading branch information...
1 parent 165e0db commit 7e407ae6903fb914064b26aad009409074bc57fe @jm81 committed Aug 4, 2011
Showing with 0 additions and 20 deletions.
  1. +0 −5 Gemfile.lock
  2. +0 −1 dm-devise.gemspec
  3. +0 −14 lib/generators/data_mapper/devise_generator.rb
View
@@ -8,7 +8,6 @@ PATH
dm-rails (>= 1.0.3, < 1.2)
dm-serializer (>= 1.0.2, < 1.2)
dm-timestamps (>= 1.0.2, < 1.2)
- sugar-high (~> 0.2.10)
GEM
remote: http://rubygems.org/
@@ -140,13 +139,9 @@ GEM
thor (~> 0.14.4)
rake (0.9.2)
rdoc (3.8)
- require_all (1.2.0)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
- sugar-high (0.2.12)
- mocha (~> 0.9.8)
- require_all (~> 1.2.0)
thor (0.14.6)
treetop (1.4.10)
polyglot
View
@@ -22,5 +22,4 @@ Gem::Specification.new do |s|
s.add_dependency('dm-timestamps', '>= 1.0.2', '< 1.2')
s.add_dependency('dm-rails', '>= 1.0.3', '< 1.2')
s.add_dependency('devise', '~> 1.3')
- s.add_dependency('sugar-high', '~> 0.2.10')
end
@@ -1,13 +1,4 @@
require 'generators/devise/orm_helpers'
-require 'sugar-high/file'
-
-# Reload Active Support's String#blank?, overridden by sugar-high. Active Support's
-# version considers any all-space String blank, behavior that devise expects.
-class String #:nodoc:
- def blank?
- self !~ /\S/
- end
-end
module DataMapper
module Generators
@@ -21,11 +12,6 @@ def generate_model
def inject_devise_content
inject_into_file model_path, model_contents, :after => "include DataMapper::Resource\n" if model_exists?
end
-
- def replace_default_devise_orm
- devise_init_file = File.join(Rails.root, 'config', 'initializers', 'devise.rb')
- File.replace_content_from devise_init_file, :where => 'orm/active_record', :with => 'orm/data_mapper'
- end
end
end
end

0 comments on commit 7e407ae

Please sign in to comment.