mm-devise 1.1.1 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,15 +1,25 @@
1
1
  source :rubygems
2
+ source 'http://gems.github.com/'
2
3
 
3
4
  gem "rails", :git => "git://github.com/rails/rails.git"
4
5
 
5
- gem "warden", "0.10.7"
6
- gem "webrat", "0.7.0"
7
- gem "mocha", :require => false
8
- gem "bcrypt-ruby", :require => "bcrypt"
9
- gem "oauth2"
6
+ group :test do
7
+ gem "test-unit", "~> 2.0.9"
8
+ gem "webrat", "~> 0.7.0"
9
+ gem "mocha", "~> 0.9.8", :require => false
10
+ end
10
11
 
11
- gem 'mongo_mapper', '>= 0.8.2'
12
- gem 'rails3-generators', '>= 0.12.1'
13
- gem 'jnunemaker-validatable', '>= 1.8.4'
14
- gem 'bson_ext', '>= 1.0.4'
12
+ group :default do
13
+ gem "webrat", "~> 0.7.0"
14
+
15
+ gem "bcrypt-ruby", :require => "bcrypt"
16
+ gem "oauth2"
17
+ gem "warden", ">= 0.10.7"
18
+ gem 'mongo_mapper', '~> 0.8.4'
19
+ gem 'sugar-high', '~> 0.2.10'
20
+ gem 'devise', '>= 1.1.1'
21
+ gem 'rails3-generators', '>= 0.13.0'
22
+ gem 'jnunemaker-validatable', '~> 1.8.1'
23
+ gem 'bson_ext', '~> 1.0.7'
24
+ end
15
25
 
data/README.markdown ADDED
@@ -0,0 +1,110 @@
1
+ # MongoMapper for Devise
2
+
3
+ *mm-devise* will let you use [devise](http://github.com/plataformatec/devise) with [MongoMapper](http://github.com/jnunemaker/mongomapper).
4
+
5
+ *mm-devise* is intended for use with *Rails 3* and *Devise 1.1.1*. It may work with earlier versions of devise, but it's not been tested.
6
+
7
+ This README only covers *mm-devise* specifics. Make sure to read the [devise README](http://github.com/plataformatec/devise/blob/master/README.rdoc)
8
+
9
+ ## Usage options
10
+
11
+ The gem gives you the options of 2 ORM setups depending on what library you wish to use for validations:
12
+
13
+ * *mongo_mapper* - Uses MongoMapper validations
14
+ * *mongo_mapper_active_model* - Uses ActiveModel::Validations
15
+
16
+ The advantage to this is ActiveModel's I18n support for error messages, and it uses the same validations lib as devise does by default.
17
+
18
+ ## ActiveModel compatibility
19
+
20
+ Currently only the <code>mongo_mapper</code> option has been tested.
21
+ There should be full ActiveModel support in a future version of MongoMapper, after Rails 3 is released.
22
+ ActiveModel support will likely be part of *MongoMapper 1.0* (as mentioned by jnunemaker in a post).
23
+
24
+ ## Installation
25
+
26
+ Add *devise*, *mm-devise* and *MongoMapper* gems to your Gemfile (your Rails app Gemfile). The following gems are required
27
+
28
+ <pre> gem 'mongo_mapper', '>= 0.8.2'
29
+ gem 'jnunemaker-validatable', '>= 1.8.4'
30
+ gem 'bson_ext', '>= 1.0.4'
31
+ gem 'devise', '~> 1.1.1'
32
+ gem 'mm-devise', '>= 1.1.0'
33
+ gem 'rails3-generators', '>= 0.12.1' # optional</pre>
34
+
35
+ You can install [rails3-generators](http://github.com/indirect/rails3-generators) which includes a *mongo_mapper* Model generator
36
+
37
+ <pre>gem install rails3-generators</pre>
38
+
39
+ Alternatively use bundler to install all required gems in your Rails 3 app
40
+
41
+ <pre>bundle install</pre>
42
+
43
+ Run the generator:
44
+
45
+ <pre>rails generate devise:install</pre>
46
+
47
+ The generator will install an initializer which describes ALL Devise's
48
+ configuration options and you MUST take a look at it. Make sure to specify
49
+ either <code>mongo_mapper</code> or <code>mongo_mapper_active_model</code> (ActiveModel::Validations)
50
+ as the orm in the configuration file.
51
+
52
+ require 'devise/orm/mongo_mapper'
53
+
54
+ Note: The model generator should do this automatically.
55
+
56
+ To add Devise to any of your models using the generator:
57
+
58
+ <pre>rails generate mongo_mapper:devise MODEL</pre>
59
+
60
+ Example: create a User model for use with Devise
61
+
62
+ <pre>rails generate mongo_mapper:devise User</pre>
63
+
64
+ Read the README for devise at [devise README](http://github.com/plataformatec/devise/blob/master/README.rdoc)
65
+
66
+ ## Test Driven Development - extending this project
67
+
68
+ To develop on this project using TDD, requires the following setup.
69
+ Clone this project into a container folder, fx <code>/projects</code>, so you have fx <code>/projects/mm-devise</code>
70
+ In the same container folder clone <code>devise</code> from github
71
+
72
+ Example:
73
+
74
+ <pre>git clone http://github.com/kristianmandrup/mm-devise.git
75
+ git clone http://github.com/plataformatec/devise.git
76
+ cd mm-devise
77
+ bundle install
78
+ rake test</pre>
79
+
80
+ When you run <code>rake test</code>, you will (as of Aug 6, 2010) still get a few errors and failures.
81
+ This is NOT due to any errors in <code>mm-devise</code> but rather due to a few "issues" with a few of the devise tests themselves IMO.
82
+
83
+ ## Note on Patches/Pull Requests
84
+
85
+ * Fork the project.
86
+ * Make your feature addition or bug fix.
87
+ * Add tests for it. This is important so I don't break it in a
88
+ future version unintentionally.
89
+ * Commit, do not mess with rakefile, version, or history.
90
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
91
+ * Send me a pull request. Bonus points for topic branches.
92
+
93
+ ## Maintainers
94
+
95
+ *Kristian Mandrup*
96
+
97
+ ## Contributors
98
+
99
+ *Jared Morgan* - Created the dm-devise gem which was used as a template for the development of this gem.
100
+ Also made suggestions for a few critical fixes and improvements in the code. Thanks :)
101
+
102
+ ## Bugs and Feedback
103
+
104
+ For *mm-devise* specific issues, please create an issue on GitHub at: [mm-devise issues](http://github.com/kristianmandrup/mm-devise/issues)
105
+
106
+ ## Copyright
107
+
108
+ Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.
109
+
110
+
data/Rakefile CHANGED
@@ -53,12 +53,13 @@ begin
53
53
  gem.email = "jmorgan@morgancreative.net"
54
54
  gem.homepage = "http://github.com/kristianmandrup/mm-devise"
55
55
  gem.authors = ["Kristian Mandrup"]
56
- gem.add_dependency 'mongo_mapper', '>= 0.8.2'
57
- gem.add_dependency 'rails3-generators', '>= 0.12.1'
58
- gem.add_dependency 'jnunemaker-validatable', '>= 1.8.4'
59
- gem.add_dependency 'bson_ext', '>= 1.0.4'
56
+ gem.add_dependency 'mongo_mapper', '~> 0.8.4'
57
+ gem.add_dependency 'bson_ext', '~> 1.0.4'
58
+ gem.add_dependency 'rails3-generators', '>= 0.13.0'
59
+ gem.add_dependency 'jnunemaker-validatable', '~> 1.8.1'
60
60
  gem.add_dependency 'devise', '>= 1.1.1'
61
- gem.add_dependency 'warden', '~> 0.10.7'
61
+ gem.add_dependency 'sugar-high', '~> 0.2.10'
62
+ gem.add_dependency 'warden', '>= 0.10.7'
62
63
  gem.add_dependency 'bcrypt-ruby', '~> 2.1.2'
63
64
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
64
65
  end
@@ -1,3 +1,4 @@
1
+ require 'mongo_mapper'
1
2
  require 'devise/orm/mongo_mapper/compatibility'
2
3
  require 'devise/orm/mongo_mapper/schema'
3
4
  require 'devise/orm/mongo_mapper/date_time'
@@ -1,3 +1,5 @@
1
+ require 'validatable'
2
+
1
3
  module Validatable
2
4
  # Monkey-patch Validatable::Errors to support generation of error message from
3
5
  # a Symbol.
@@ -1,3 +1,4 @@
1
+ require 'mongo_mapper'
1
2
  require 'devise/orm/mongo_mapper/compatibility'
2
3
  require 'devise/orm/mongo_mapper/schema'
3
4
  require 'devise/orm/mongo_mapper/date_time'
@@ -1,4 +1,5 @@
1
1
  require 'generators/devise/orm_helpers'
2
+ require 'sugar-high/file'
2
3
 
3
4
  module MongoMapper
4
5
  module Generators
@@ -9,9 +10,14 @@ module MongoMapper
9
10
  invoke "mongo_mapper:model", [name] unless model_exists?
10
11
  end
11
12
 
12
- def inject_devise_content
13
+ def inject_devise_content
13
14
  inject_into_file model_path, model_contents, :after => "include MongoMapper::Document\n"
14
15
  end
16
+
17
+ def replace_default_devise_orm
18
+ devise_init_file = File.join(Rails.root, 'config', 'initializers', 'devise.rb')
19
+ File.replace_content_from devise_init_file, :where => 'orm/active_record', :with => 'orm/mongo_mapper'
20
+ end
15
21
  end
16
22
  end
17
23
  end
@@ -1,5 +1,5 @@
1
1
  module MongoMapper
2
2
  module Devise
3
- VERSION = '1.1.1'.freeze
3
+ VERSION = '1.1.6'.freeze
4
4
  end
5
5
  end
data/mm-devise.gemspec ADDED
@@ -0,0 +1,104 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{mm-devise}
8
+ s.version = "1.1.6"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kristian Mandrup"]
12
+ s.date = %q{2010-09-26}
13
+ s.description = %q{dm-devise adds MongoMapper support to devise (http://github.com/plataformatec/devise) for authentication support for Rails}
14
+ s.email = %q{jmorgan@morgancreative.net}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.markdown"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "Gemfile",
23
+ "LICENSE",
24
+ "README.markdown",
25
+ "Rakefile",
26
+ "lib/devise/orm/mongo_mapper.rb",
27
+ "lib/devise/orm/mongo_mapper/compatibility.rb",
28
+ "lib/devise/orm/mongo_mapper/date_time.rb",
29
+ "lib/devise/orm/mongo_mapper/mm-validations.rb",
30
+ "lib/devise/orm/mongo_mapper/schema.rb",
31
+ "lib/devise/orm/mongo_mapper_active_model.rb",
32
+ "lib/generators/mongo_mapper/devise_generator.rb",
33
+ "lib/mm-devise/version.rb",
34
+ "mm-devise.gemspec",
35
+ "test/mongo_mapper/compatibility_test.rb",
36
+ "test/orm/mongo_mapper.rb",
37
+ "test/orm/mongo_mapper_active_model.rb",
38
+ "test/overrides/mm_validations_test.rb",
39
+ "test/overrides/mongo_mapper_test.rb",
40
+ "test/rails_app/app/mongo_mapper/admin.rb",
41
+ "test/rails_app/app/mongo_mapper/shim.rb",
42
+ "test/rails_app/app/mongo_mapper/user.rb",
43
+ "test/rails_app/app/mongo_mapper_active_model/admin.rb",
44
+ "test/rails_app/app/mongo_mapper_active_model/user.rb",
45
+ "test/rails_app/config/application.rb",
46
+ "test/rails_app/config/environment.rb",
47
+ "test/test_helper.rb"
48
+ ]
49
+ s.homepage = %q{http://github.com/kristianmandrup/mm-devise}
50
+ s.rdoc_options = ["--charset=UTF-8"]
51
+ s.require_paths = ["lib"]
52
+ s.rubygems_version = %q{1.3.7}
53
+ s.summary = %q{Support for using MongoMapper ORM with devise}
54
+ s.test_files = [
55
+ "test/mongo_mapper/compatibility_test.rb",
56
+ "test/orm/mongo_mapper.rb",
57
+ "test/orm/mongo_mapper_active_model.rb",
58
+ "test/overrides/mm_validations_test.rb",
59
+ "test/overrides/mongo_mapper_test.rb",
60
+ "test/rails_app/app/mongo_mapper/admin.rb",
61
+ "test/rails_app/app/mongo_mapper/shim.rb",
62
+ "test/rails_app/app/mongo_mapper/user.rb",
63
+ "test/rails_app/app/mongo_mapper_active_model/admin.rb",
64
+ "test/rails_app/app/mongo_mapper_active_model/user.rb",
65
+ "test/rails_app/config/application.rb",
66
+ "test/rails_app/config/environment.rb",
67
+ "test/test_helper.rb"
68
+ ]
69
+
70
+ if s.respond_to? :specification_version then
71
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
72
+ s.specification_version = 3
73
+
74
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
75
+ s.add_runtime_dependency(%q<mongo_mapper>, ["~> 0.8.4"])
76
+ s.add_runtime_dependency(%q<bson_ext>, ["~> 1.0.4"])
77
+ s.add_runtime_dependency(%q<rails3-generators>, [">= 0.13.0"])
78
+ s.add_runtime_dependency(%q<jnunemaker-validatable>, ["~> 1.8.1"])
79
+ s.add_runtime_dependency(%q<devise>, [">= 1.1.1"])
80
+ s.add_runtime_dependency(%q<sugar-high>, ["~> 0.2.10"])
81
+ s.add_runtime_dependency(%q<warden>, [">= 0.10.7"])
82
+ s.add_runtime_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
83
+ else
84
+ s.add_dependency(%q<mongo_mapper>, ["~> 0.8.4"])
85
+ s.add_dependency(%q<bson_ext>, ["~> 1.0.4"])
86
+ s.add_dependency(%q<rails3-generators>, [">= 0.13.0"])
87
+ s.add_dependency(%q<jnunemaker-validatable>, ["~> 1.8.1"])
88
+ s.add_dependency(%q<devise>, [">= 1.1.1"])
89
+ s.add_dependency(%q<sugar-high>, ["~> 0.2.10"])
90
+ s.add_dependency(%q<warden>, [">= 0.10.7"])
91
+ s.add_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
92
+ end
93
+ else
94
+ s.add_dependency(%q<mongo_mapper>, ["~> 0.8.4"])
95
+ s.add_dependency(%q<bson_ext>, ["~> 1.0.4"])
96
+ s.add_dependency(%q<rails3-generators>, [">= 0.13.0"])
97
+ s.add_dependency(%q<jnunemaker-validatable>, ["~> 1.8.1"])
98
+ s.add_dependency(%q<devise>, [">= 1.1.1"])
99
+ s.add_dependency(%q<sugar-high>, ["~> 0.2.10"])
100
+ s.add_dependency(%q<warden>, [">= 0.10.7"])
101
+ s.add_dependency(%q<bcrypt-ruby>, ["~> 2.1.2"])
102
+ end
103
+ end
104
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 1
9
- version: 1.1.1
8
+ - 6
9
+ version: 1.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-07 00:00:00 +02:00
17
+ date: 2010-09-26 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -23,32 +23,32 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
29
  - 0
30
30
  - 8
31
- - 2
32
- version: 0.8.2
31
+ - 4
32
+ version: 0.8.4
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
- name: rails3-generators
36
+ name: bson_ext
37
37
  prerelease: false
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ">="
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
43
  segments:
44
- - 0
45
- - 12
46
44
  - 1
47
- version: 0.12.1
45
+ - 0
46
+ - 4
47
+ version: 1.0.4
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
51
- name: jnunemaker-validatable
51
+ name: rails3-generators
52
52
  prerelease: false
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
@@ -56,25 +56,25 @@ dependencies:
56
56
  - - ">="
57
57
  - !ruby/object:Gem::Version
58
58
  segments:
59
- - 1
60
- - 8
61
- - 4
62
- version: 1.8.4
59
+ - 0
60
+ - 13
61
+ - 0
62
+ version: 0.13.0
63
63
  type: :runtime
64
64
  version_requirements: *id003
65
65
  - !ruby/object:Gem::Dependency
66
- name: bson_ext
66
+ name: jnunemaker-validatable
67
67
  prerelease: false
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
70
70
  requirements:
71
- - - ">="
71
+ - - ~>
72
72
  - !ruby/object:Gem::Version
73
73
  segments:
74
74
  - 1
75
- - 0
76
- - 4
77
- version: 1.0.4
75
+ - 8
76
+ - 1
77
+ version: 1.8.1
78
78
  type: :runtime
79
79
  version_requirements: *id004
80
80
  - !ruby/object:Gem::Dependency
@@ -93,12 +93,27 @@ dependencies:
93
93
  type: :runtime
94
94
  version_requirements: *id005
95
95
  - !ruby/object:Gem::Dependency
96
- name: warden
96
+ name: sugar-high
97
97
  prerelease: false
98
98
  requirement: &id006 !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
101
101
  - - ~>
102
+ - !ruby/object:Gem::Version
103
+ segments:
104
+ - 0
105
+ - 2
106
+ - 10
107
+ version: 0.2.10
108
+ type: :runtime
109
+ version_requirements: *id006
110
+ - !ruby/object:Gem::Dependency
111
+ name: warden
112
+ prerelease: false
113
+ requirement: &id007 !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ">="
102
117
  - !ruby/object:Gem::Version
103
118
  segments:
104
119
  - 0
@@ -106,11 +121,11 @@ dependencies:
106
121
  - 7
107
122
  version: 0.10.7
108
123
  type: :runtime
109
- version_requirements: *id006
124
+ version_requirements: *id007
110
125
  - !ruby/object:Gem::Dependency
111
126
  name: bcrypt-ruby
112
127
  prerelease: false
113
- requirement: &id007 !ruby/object:Gem::Requirement
128
+ requirement: &id008 !ruby/object:Gem::Requirement
114
129
  none: false
115
130
  requirements:
116
131
  - - ~>
@@ -121,7 +136,7 @@ dependencies:
121
136
  - 2
122
137
  version: 2.1.2
123
138
  type: :runtime
124
- version_requirements: *id007
139
+ version_requirements: *id008
125
140
  description: dm-devise adds MongoMapper support to devise (http://github.com/plataformatec/devise) for authentication support for Rails
126
141
  email: jmorgan@morgancreative.net
127
142
  executables: []
@@ -130,14 +145,13 @@ extensions: []
130
145
 
131
146
  extra_rdoc_files:
132
147
  - LICENSE
133
- - README.rdoc
148
+ - README.markdown
134
149
  files:
135
150
  - .document
136
151
  - .gitignore
137
152
  - Gemfile
138
- - Gemfile.lock
139
153
  - LICENSE
140
- - README.rdoc
154
+ - README.markdown
141
155
  - Rakefile
142
156
  - lib/devise/orm/mongo_mapper.rb
143
157
  - lib/devise/orm/mongo_mapper/compatibility.rb
@@ -147,6 +161,7 @@ files:
147
161
  - lib/devise/orm/mongo_mapper_active_model.rb
148
162
  - lib/generators/mongo_mapper/devise_generator.rb
149
163
  - lib/mm-devise/version.rb
164
+ - mm-devise.gemspec
150
165
  - test/mongo_mapper/compatibility_test.rb
151
166
  - test/orm/mongo_mapper.rb
152
167
  - test/orm/mongo_mapper_active_model.rb
data/Gemfile.lock DELETED
@@ -1,116 +0,0 @@
1
- GIT
2
- remote: git://github.com/rails/rails.git
3
- revision: 4952a80
4
- specs:
5
- actionmailer (3.0.0.rc)
6
- actionpack (= 3.0.0.rc)
7
- mail (~> 2.2.5)
8
- actionpack (3.0.0.rc)
9
- activemodel (= 3.0.0.rc)
10
- activesupport (= 3.0.0.rc)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.4.1)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.9)
16
- rack-test (~> 0.5.4)
17
- tzinfo (~> 0.3.22)
18
- activemodel (3.0.0.rc)
19
- activesupport (= 3.0.0.rc)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.4.1)
22
- activerecord (3.0.0.rc)
23
- activemodel (= 3.0.0.rc)
24
- activesupport (= 3.0.0.rc)
25
- arel (~> 0.4.0)
26
- tzinfo (~> 0.3.22)
27
- activeresource (3.0.0.rc)
28
- activemodel (= 3.0.0.rc)
29
- activesupport (= 3.0.0.rc)
30
- activesupport (3.0.0.rc)
31
- rails (3.0.0.rc)
32
- actionmailer (= 3.0.0.rc)
33
- actionpack (= 3.0.0.rc)
34
- activerecord (= 3.0.0.rc)
35
- activeresource (= 3.0.0.rc)
36
- activesupport (= 3.0.0.rc)
37
- bundler (>= 1.0.0.rc.1)
38
- railties (= 3.0.0.rc)
39
- railties (3.0.0.rc)
40
- actionpack (= 3.0.0.rc)
41
- activesupport (= 3.0.0.rc)
42
- rake (>= 0.8.3)
43
- thor (~> 0.14.0)
44
-
45
- GEM
46
- remote: http://rubygems.org/
47
- specs:
48
- abstract (1.0.0)
49
- addressable (2.1.2)
50
- arel (0.4.0)
51
- activesupport (>= 3.0.0.beta)
52
- bcrypt-ruby (2.1.2)
53
- bson (1.0.4)
54
- bson_ext (1.0.4)
55
- builder (2.1.2)
56
- erubis (2.6.6)
57
- abstract (>= 1.0.0)
58
- faraday (0.4.6)
59
- addressable (>= 2.1.1)
60
- rack (>= 1.0.1)
61
- i18n (0.4.1)
62
- jnunemaker-validatable (1.8.4)
63
- activesupport (>= 2.3.4)
64
- mail (2.2.5)
65
- activesupport (>= 2.3.6)
66
- mime-types
67
- treetop (>= 1.4.5)
68
- mime-types (1.16)
69
- mocha (0.9.8)
70
- rake
71
- mongo (1.0.7)
72
- bson (>= 1.0.4)
73
- mongo_mapper (0.8.2)
74
- activesupport (>= 2.3.4)
75
- jnunemaker-validatable (~> 1.8.4)
76
- plucky (~> 0.3.1)
77
- multi_json (0.0.4)
78
- nokogiri (1.4.2)
79
- oauth2 (0.0.10)
80
- faraday (~> 0.4.1)
81
- multi_json (>= 0.0.4)
82
- plucky (0.3.2)
83
- mongo (~> 1.0.1)
84
- polyglot (0.3.1)
85
- rack (1.2.1)
86
- rack-mount (0.6.9)
87
- rack (>= 1.0.0)
88
- rack-test (0.5.4)
89
- rack (>= 1.0)
90
- rails3-generators (0.12.1)
91
- rake (0.8.7)
92
- thor (0.14.0)
93
- treetop (1.4.8)
94
- polyglot (>= 0.3.1)
95
- tzinfo (0.3.22)
96
- warden (0.10.7)
97
- rack (>= 1.0.0)
98
- webrat (0.7.0)
99
- nokogiri (>= 1.2.0)
100
- rack (>= 1.0)
101
- rack-test (>= 0.5.3)
102
-
103
- PLATFORMS
104
- ruby
105
-
106
- DEPENDENCIES
107
- bcrypt-ruby
108
- bson_ext (>= 1.0.4)
109
- jnunemaker-validatable (>= 1.8.4)
110
- mocha
111
- mongo_mapper (>= 0.8.2)
112
- oauth2
113
- rails!
114
- rails3-generators (>= 0.12.1)
115
- warden (= 0.10.7)
116
- webrat (= 0.7.0)
data/README.rdoc DELETED
@@ -1,108 +0,0 @@
1
- = mm-devise
2
-
3
- mm-devise will let you use devise (http://github.com/plataformatec/devise) with MongoMapper.
4
-
5
- The gem gives you the options of 2 ORM setups depending on what library you wish to use for validations:
6
-
7
- :mongo_mapper::
8
- Uses Mongo Mapper validations.
9
- :mongo_mapper_active_model::
10
- Uses ActiveModel::Validations.
11
-
12
- The advantage to this is ActiveModel's I18n support for error messages, and
13
- it uses the same validations lib as devise does by default.
14
-
15
- Currently only the mongo_mapper option has been tested. Note if you run $ rake test, you will still get a few error and failures.
16
- This is not due to any error in mm-devise, but rather to a few "issues" with the devise tests themselves IMO.
17
-
18
- There should be full ActiveModel support in a future version of MongoMapper, after Rails 3 is released.
19
- ActiveModel support will likely be part of MongoMapper 1.0 (as mentioned by jnunemaker in a post).
20
-
21
- mm-devise is intended for use with Rails 3 and devise 1.1. It may work with earlier versions, but it's not been tested
22
-
23
- This README only covers mm-devise specifics.
24
- Make sure to read the devise README http://github.com/plataformatec/devise/blob/master/README.rdoc
25
-
26
- == Installation
27
-
28
- Add devise, mm-devise and Mongo Mapper gems to your Gemfile. The following gems are required
29
-
30
- gem 'mongo_mapper', '>= 0.8.2'
31
- gem 'jnunemaker-validatable', '>= 1.8.4'
32
- gem 'bson_ext', '>= 1.0.4'
33
- gem 'devise', '~> 1.1.1'
34
- gem 'mm-devise', '>= 1.1.0'
35
- gem 'rails3-generators', '>= 0.12.1'
36
-
37
- You can install http://github.com/indirect/rails3-generators which includes mongo_mapper Model generator
38
-
39
- gem install rails3-generators
40
-
41
- Alternatively use bundler to install all required gems in your rails app
42
-
43
- bundle install
44
-
45
- Run the generator:
46
-
47
- rails generate devise:install
48
-
49
- The generator will install an initializer which describes ALL Devise's
50
- configuration options and you MUST take a look at it. Make sure to specify
51
- either mongo_mapper or mongo_mapper_active_model (ActiveModel::Validations) as the orm in the configuration file.
52
-
53
- To add Devise to any of your models using the generator:
54
-
55
- rails generate mongo_mapper:devise MODEL
56
-
57
- Read the README for devise at http://github.com/plataformatec/devise/blob/master/README.rdoc
58
-
59
- == Test Driven Development - extending this project
60
-
61
- To develop on this project using TDD, requires the following setup.
62
- Clone this project into a container folder, fx /projects, so you have fx /projects/mm-devise
63
- In the same container folder clone devise from github
64
-
65
- Example:
66
-
67
- projects $ git clone [repo]\mm-devise.git
68
- projects $ git clone [repo]\devise.git
69
- projects $ cd mm-devise
70
- projects $ bundle install
71
- projects $ rake test
72
-
73
- == TODO
74
-
75
- * Example app
76
- * Rails templates
77
-
78
- == Note on Patches/Pull Requests
79
-
80
- * Fork the project.
81
- * Make your feature addition or bug fix.
82
- * Add tests for it. This is important so I don't break it in a
83
- future version unintentionally.
84
- * Commit, do not mess with rakefile, version, or history.
85
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
86
- * Send me a pull request. Bonus points for topic branches.
87
-
88
- == Maintainers
89
-
90
- Kristian Mandrup
91
-
92
- == Contributors
93
-
94
- Jared Morgan:
95
- Created the dm-devise gem which was used as a template for the development of this gem
96
- Also came with suggestions for a few critical fixes and improvements in the code. Thanks :)
97
-
98
- == Bugs and Feedback
99
-
100
- For mm-devise specific issues, please create an issue on GitHub at:
101
-
102
- http://github.com/kristianmandrup/mm-devise/issues
103
-
104
- == Copyright
105
-
106
- Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.
107
-
108
-