
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
= dm-devise
dm-devise lets you use devise (http://github.com/plataformatec/devise) with DataMapper.
dm-devise is intended for use with Rails >= 3.2 and devise >= 2.1.
This README only covers dm-devise specifics. Make sure to read the devise README http://github.com/plataformatec/devise/blob/master/README.rdoc
Last tested against devise master: 2013-03-22, commit 72cbafa3225bab8904d62df9b1f5cbaaa0322931 Last tested against devise release 2.2.3
== Installation
Add dm-devise and dm gems to your Gemfile. The following gems are required:
gem 'dm-core', '> 1.2.0'
gem 'dm-sqlite-adapter', '> 1.2.0' # or your preferred adapter
gem 'dm-serializer', '> 1.2.0'
gem 'dm-timestamps', '> 1.2.0'
gem 'dm-rails', '> 1.2.0'
gem 'dm-validations', '> 1.2.0' # Do not include if using data_mapper_active_model
gem 'dm-devise', '~> 2.1.0'
If you're using Active Model validations, do not include dm-validations in your Gemfile.
dm-devise works with versions of DataMapper gems >= 1.0.2 on the 1.0 branch,
= 1.1.0.rc3 on the 1.1 branch and 1.2.0.
Run the generator:
rails generate data_mapper:devise_install
The generator will install an initializer which describes ALL Devise's configuration options and you MUST take a look at it. See Config section below for three config options that have particular importance to dm-devise.
Add Devise to any of your models using the generator:
rails generate data_mapper:devise MODEL
Read the README for devise at http://github.com/plataformatec/devise/blob/master/README.rdoc
== Using raise_on_save_failure
The default controllers provided by devise will not work correctly if raise_on_save_failure is set to true for the devise model. You can customize the controllers (See the devise README for details), but I don't know what customizations in particular to recommend. See https://github.com/jm81/dm-devise/issues/14 for discussion.
== Config Options
See the generated initializer for all the config options, but dm-devise users should be particularly aware of these three:
=== data_mapper_validation_lib
dm-devise adds some compatibility methods for either dm-validations or Active Model validations. By default, it determines what to load based on which library is found (giving preference to dm-validations). You may explicitly set this to 'dm-validations' or 'active_model', or false to not load any of the validations compatibility code. Details of the options:
dm-validations:: Uses dm-validations. This involves a bit of monkey-patching, but you need to use this if you want auto-validations in any of your models. active_model:: Uses ActiveModel::Validations. Do not use if you require 'dm-validations' anywhere in your app (or include it in your Gemfile). Things will break. The advantage to this is Active Model's I18n support for error messages, and it uses the same validations lib as devise does by default.
=== data_mapper_validation_messages
Messages to use as the default DataMapper validation error messages. The messages are updated from those included in dm-validations to be consistent with ActiveModel (i.e. with the Devise test expectations) and include additional messages that devise uses (:not_found, :already_confirmed, :not_locked, and :expired). If set to false, the messages are left as defined by the dm-validations gem.
== TODO
== Testing
The dm-devise test rake task runs all of devise's tests using the data_mapper ORM with both dm-validations and active_model validations (you can specify one with rake test VALIDATION_LIB=lib_name). In order to run tests, you'll need a local copy of devise (a gem is fine as long as you specify the path). By default, dm-devise looks for devise in [path-to-dm-devise]/../devise. You can override this by setting a DEVISE_PATH env variable. For example:
rake test DEVISE_PATH=/path/to/devise
== Note on Patches/Pull Requests
== Maintainers
== Contributors
http://github.com/jm81/dm-devise/contributors
== Bugs and Feedback
For dm-devise specific issues, please create an issue on GitHub at:
http://github.com/jm81/dm-devise/issues
== Copyright
Copyright (c) 2010-2011 Jared Morgan. See LICENSE for details.
FAQs
Unknown package
We found that dm-devise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.