<commit_before>= 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-05-01, commit d9d5ae3d58d4a9fad94107fa29e30af96ec9891b
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
<commit_msg>Fix installation instructions to just use rails g devise<commit_after>= 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-05-07, commit f5e33089a032f44abd80225e34370c4fdd651a25
Last tested against devise release 2.2.4

== 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 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

{'fraction_non_alphanumeric': 0.0845103033109516, 'fraction_numerical': 0.03635100717758741, 'mean_word_length': 3.8924122310305775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3246498', 'n_tokens_mistral': 1501, 'n_tokens_neox': 1355, 'n_words': 520}