sorcery 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sorcery might be problematic. Click here for more details.

Files changed (164) hide show
  1. data/Gemfile +2 -1
  2. data/Gemfile.lock +58 -51
  3. data/README.rdoc +19 -57
  4. data/Rakefile +27 -1
  5. data/VERSION +1 -1
  6. data/lib/generators/sorcery/USAGE +22 -0
  7. data/lib/generators/sorcery/install_generator.rb +71 -0
  8. data/lib/{sorcery/initializers → generators/sorcery/templates}/initializer.rb +4 -4
  9. data/lib/generators/sorcery/templates/migration/activity_logging.rb +17 -0
  10. data/lib/generators/sorcery/templates/migration/brute_force_protection.rb +11 -0
  11. data/lib/generators/{sorcery_migration/templates → sorcery/templates/migration}/core.rb +2 -2
  12. data/lib/generators/{sorcery_migration/templates → sorcery/templates/migration}/external.rb +1 -1
  13. data/lib/generators/sorcery/templates/migration/remember_me.rb +15 -0
  14. data/lib/generators/sorcery/templates/migration/reset_password.rb +17 -0
  15. data/lib/generators/sorcery/templates/migration/user_activation.rb +17 -0
  16. data/lib/sorcery.rb +5 -7
  17. data/lib/sorcery/controller.rb +40 -39
  18. data/lib/sorcery/controller/submodules/activity_logging.rb +7 -10
  19. data/lib/sorcery/controller/submodules/external/protocols/oauth2.rb +23 -8
  20. data/lib/sorcery/controller/submodules/remember_me.rb +3 -2
  21. data/lib/sorcery/model.rb +21 -4
  22. data/lib/sorcery/model/adapters/mongo_mapper.rb +49 -0
  23. data/lib/sorcery/model/adapters/mongoid.rb +1 -1
  24. data/lib/sorcery/model/submodules/brute_force_protection.rb +8 -0
  25. data/lib/sorcery/model/submodules/remember_me.rb +8 -1
  26. data/lib/sorcery/model/submodules/reset_password.rb +10 -0
  27. data/lib/sorcery/model/submodules/user_activation.rb +12 -0
  28. data/sorcery.gemspec +86 -210
  29. data/spec/Gemfile +1 -1
  30. data/spec/Gemfile.lock +28 -15
  31. data/spec/README.md +6 -1
  32. data/spec/rails3/Gemfile +2 -2
  33. data/spec/rails3/Gemfile.lock +45 -50
  34. data/spec/rails3/spec/controller_oauth2_spec.rb +5 -3
  35. data/spec/rails3/spec/spec_helper.rb +1 -3
  36. data/spec/rails3_mongo_mapper/.gitignore +4 -0
  37. data/spec/rails3_mongo_mapper/.rspec +1 -0
  38. data/spec/{sinatra_modular → rails3_mongo_mapper}/Gemfile +5 -5
  39. data/spec/rails3_mongo_mapper/Gemfile.lock +159 -0
  40. data/spec/{sinatra → rails3_mongo_mapper}/Rakefile +3 -3
  41. data/spec/rails3_mongo_mapper/app/controllers/application_controller.rb +108 -0
  42. data/spec/rails3_mongo_mapper/app/helpers/application_helper.rb +2 -0
  43. data/spec/{sinatra → rails3_mongo_mapper/app/mailers}/sorcery_mailer.rb +0 -0
  44. data/spec/rails3_mongo_mapper/app/models/authentication.rb +6 -0
  45. data/spec/rails3_mongo_mapper/app/models/user.rb +5 -0
  46. data/spec/rails3_mongo_mapper/app/views/layouts/application.html.erb +14 -0
  47. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.html.erb +17 -0
  48. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.text.erb +9 -0
  49. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_success_email.html.erb +17 -0
  50. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_success_email.text.erb +9 -0
  51. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.html.erb +16 -0
  52. data/spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.text.erb +8 -0
  53. data/spec/rails3_mongo_mapper/config.ru +4 -0
  54. data/spec/rails3_mongo_mapper/config/application.rb +51 -0
  55. data/spec/rails3_mongo_mapper/config/boot.rb +13 -0
  56. data/spec/rails3_mongo_mapper/config/environment.rb +5 -0
  57. data/spec/rails3_mongo_mapper/config/environments/development.rb +30 -0
  58. data/spec/rails3_mongo_mapper/config/environments/in_memory.rb +0 -0
  59. data/spec/rails3_mongo_mapper/config/environments/production.rb +49 -0
  60. data/spec/rails3_mongo_mapper/config/environments/test.rb +35 -0
  61. data/spec/rails3_mongo_mapper/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/rails3_mongo_mapper/config/initializers/inflections.rb +10 -0
  63. data/spec/rails3_mongo_mapper/config/initializers/mime_types.rb +5 -0
  64. data/spec/rails3_mongo_mapper/config/initializers/mongo.rb +2 -0
  65. data/spec/rails3_mongo_mapper/config/initializers/secret_token.rb +7 -0
  66. data/spec/rails3_mongo_mapper/config/initializers/session_store.rb +8 -0
  67. data/spec/rails3_mongo_mapper/config/locales/en.yml +5 -0
  68. data/spec/rails3_mongo_mapper/config/routes.rb +59 -0
  69. data/spec/rails3_mongo_mapper/db/schema.rb +23 -0
  70. data/spec/rails3_mongo_mapper/db/seeds.rb +7 -0
  71. data/spec/rails3_mongo_mapper/lib/tasks/.gitkeep +0 -0
  72. data/spec/rails3_mongo_mapper/public/404.html +26 -0
  73. data/spec/rails3_mongo_mapper/public/422.html +26 -0
  74. data/spec/rails3_mongo_mapper/public/500.html +26 -0
  75. data/spec/rails3_mongo_mapper/public/favicon.ico +0 -0
  76. data/spec/rails3_mongo_mapper/public/images/rails.png +0 -0
  77. data/spec/rails3_mongo_mapper/public/javascripts/application.js +2 -0
  78. data/spec/rails3_mongo_mapper/public/javascripts/controls.js +965 -0
  79. data/spec/rails3_mongo_mapper/public/javascripts/dragdrop.js +974 -0
  80. data/spec/rails3_mongo_mapper/public/javascripts/effects.js +1123 -0
  81. data/spec/rails3_mongo_mapper/public/javascripts/prototype.js +6001 -0
  82. data/spec/rails3_mongo_mapper/public/javascripts/rails.js +175 -0
  83. data/spec/rails3_mongo_mapper/public/robots.txt +5 -0
  84. data/spec/rails3_mongo_mapper/public/stylesheets/.gitkeep +0 -0
  85. data/spec/rails3_mongo_mapper/script/rails +6 -0
  86. data/spec/{sinatra → rails3_mongo_mapper}/spec/controller_spec.rb +45 -42
  87. data/spec/{sinatra → rails3_mongo_mapper}/spec/spec.opts +0 -0
  88. data/spec/rails3_mongo_mapper/spec/spec_helper.orig.rb +27 -0
  89. data/spec/rails3_mongo_mapper/spec/spec_helper.rb +55 -0
  90. data/spec/rails3_mongo_mapper/spec/user_activation_spec.rb +9 -0
  91. data/spec/rails3_mongo_mapper/spec/user_activity_logging_spec.rb +8 -0
  92. data/spec/rails3_mongo_mapper/spec/user_brute_force_protection_spec.rb +8 -0
  93. data/spec/rails3_mongo_mapper/spec/user_oauth_spec.rb +8 -0
  94. data/spec/rails3_mongo_mapper/spec/user_remember_me_spec.rb +8 -0
  95. data/spec/rails3_mongo_mapper/spec/user_reset_password_spec.rb +8 -0
  96. data/spec/rails3_mongo_mapper/spec/user_spec.rb +37 -0
  97. data/spec/rails3_mongo_mapper/vendor/plugins/.gitkeep +0 -0
  98. data/spec/rails3_mongoid/Gemfile +1 -1
  99. data/spec/rails3_mongoid/Gemfile.lock +44 -35
  100. data/spec/rails3_mongoid/spec/controller_activity_logging_spec.rb +98 -0
  101. data/spec/rails3_mongoid/spec/user_spec.rb +1 -0
  102. data/spec/shared_examples/user_shared_examples.rb +29 -1
  103. metadata +124 -237
  104. data/lib/generators/sorcery_migration/sorcery_migration_generator.rb +0 -24
  105. data/lib/generators/sorcery_migration/templates/activity_logging.rb +0 -17
  106. data/lib/generators/sorcery_migration/templates/brute_force_protection.rb +0 -11
  107. data/lib/generators/sorcery_migration/templates/remember_me.rb +0 -15
  108. data/lib/generators/sorcery_migration/templates/reset_password.rb +0 -17
  109. data/lib/generators/sorcery_migration/templates/user_activation.rb +0 -17
  110. data/lib/sorcery/controller/adapters/sinatra.rb +0 -115
  111. data/lib/sorcery/sinatra.rb +0 -4
  112. data/lib/sorcery/test_helpers/internal/sinatra.rb +0 -74
  113. data/lib/sorcery/test_helpers/internal/sinatra_modular.rb +0 -74
  114. data/lib/sorcery/test_helpers/sinatra.rb +0 -88
  115. data/spec/rails3/Rakefile.unused +0 -7
  116. data/spec/sinatra/Gemfile +0 -15
  117. data/spec/sinatra/Gemfile.lock +0 -115
  118. data/spec/sinatra/authentication.rb +0 -3
  119. data/spec/sinatra/db/migrate/activation/20101224223622_add_activation_to_users.rb +0 -17
  120. data/spec/sinatra/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb +0 -17
  121. data/spec/sinatra/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb +0 -11
  122. data/spec/sinatra/db/migrate/core/20101224223620_create_users.rb +0 -16
  123. data/spec/sinatra/db/migrate/external/20101224223628_create_authentications.rb +0 -14
  124. data/spec/sinatra/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb +0 -15
  125. data/spec/sinatra/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb +0 -13
  126. data/spec/sinatra/filters.rb +0 -27
  127. data/spec/sinatra/modular.rb +0 -157
  128. data/spec/sinatra/myapp.rb +0 -133
  129. data/spec/sinatra/spec/controller_activity_logging_spec.rb +0 -85
  130. data/spec/sinatra/spec/controller_brute_force_protection_spec.rb +0 -70
  131. data/spec/sinatra/spec/controller_http_basic_auth_spec.rb +0 -53
  132. data/spec/sinatra/spec/controller_oauth2_spec.rb +0 -96
  133. data/spec/sinatra/spec/controller_oauth_spec.rb +0 -100
  134. data/spec/sinatra/spec/controller_remember_me_spec.rb +0 -64
  135. data/spec/sinatra/spec/controller_session_timeout_spec.rb +0 -57
  136. data/spec/sinatra/spec/spec_helper.rb +0 -45
  137. data/spec/sinatra/user.rb +0 -6
  138. data/spec/sinatra/views/test_login.erb +0 -4
  139. data/spec/sinatra_modular/Gemfile.lock +0 -115
  140. data/spec/sinatra_modular/Rakefile +0 -11
  141. data/spec/sinatra_modular/authentication.rb +0 -3
  142. data/spec/sinatra_modular/db/migrate/activation/20101224223622_add_activation_to_users.rb +0 -17
  143. data/spec/sinatra_modular/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb +0 -17
  144. data/spec/sinatra_modular/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb +0 -11
  145. data/spec/sinatra_modular/db/migrate/core/20101224223620_create_users.rb +0 -16
  146. data/spec/sinatra_modular/db/migrate/external/20101224223628_create_authentications.rb +0 -14
  147. data/spec/sinatra_modular/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb +0 -15
  148. data/spec/sinatra_modular/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb +0 -13
  149. data/spec/sinatra_modular/filters.rb +0 -27
  150. data/spec/sinatra_modular/modular.rb +0 -157
  151. data/spec/sinatra_modular/myapp.rb +0 -133
  152. data/spec/sinatra_modular/sorcery_mailer.rb +0 -25
  153. data/spec/sinatra_modular/spec_modular/controller_activity_logging_spec.rb +0 -85
  154. data/spec/sinatra_modular/spec_modular/controller_brute_force_protection_spec.rb +0 -70
  155. data/spec/sinatra_modular/spec_modular/controller_http_basic_auth_spec.rb +0 -53
  156. data/spec/sinatra_modular/spec_modular/controller_oauth2_spec.rb +0 -96
  157. data/spec/sinatra_modular/spec_modular/controller_oauth_spec.rb +0 -100
  158. data/spec/sinatra_modular/spec_modular/controller_remember_me_spec.rb +0 -64
  159. data/spec/sinatra_modular/spec_modular/controller_session_timeout_spec.rb +0 -57
  160. data/spec/sinatra_modular/spec_modular/controller_spec.rb +0 -116
  161. data/spec/sinatra_modular/spec_modular/spec.opts +0 -2
  162. data/spec/sinatra_modular/spec_modular/spec_helper.rb +0 -51
  163. data/spec/sinatra_modular/user.rb +0 -6
  164. data/spec/sinatra_modular/views/test_login.erb +0 -4
@@ -22,7 +22,7 @@ module Sorcery
22
22
 
23
23
  # Clears the cookie and clears the token from the db.
24
24
  def forget_me!
25
- current_user.forget_me!
25
+ @current_user.forget_me!
26
26
  cookies[:remember_me_token] = nil
27
27
  end
28
28
 
@@ -59,7 +59,8 @@ module Sorcery
59
59
  cookies.signed[:remember_me_token] = {
60
60
  :value => user.send(user.sorcery_config.remember_me_token_attribute_name),
61
61
  :expires => user.send(user.sorcery_config.remember_me_token_expires_at_attribute_name),
62
- :httponly => true
62
+ :httponly => true,
63
+ :domain => Config.cookie_domain
63
64
  }
64
65
  end
65
66
  end
data/lib/sorcery/model.rb CHANGED
@@ -3,8 +3,8 @@ module Sorcery
3
3
  # It should be included into the ORM base class.
4
4
  # In the case of Rails this is usually ActiveRecord (actually, in that case, the plugin does this automatically).
5
5
  #
6
- # When included it defines a single method: 'activate_sorcery!' which when called adds the other capabilities
7
- # to the class.
6
+ # When included it defines a single method: 'authenticates_with_sorcery!'
7
+ # which when called adds the other capabilities to the class.
8
8
  # This method is also the place to configure the plugin in the Model layer.
9
9
  module Model
10
10
  def self.included(klass)
@@ -24,6 +24,7 @@ module Sorcery
24
24
  ::Sorcery::Controller::Config.user_config.tap{|blk| blk.call(@sorcery_config) if blk}
25
25
 
26
26
  init_mongoid_support! if defined?(Mongoid) and self.ancestors.include?(Mongoid::Document)
27
+ init_mongo_mapper_support! if defined?(MongoMapper) and self.ancestors.include?(MongoMapper::Document)
27
28
 
28
29
  init_orm_hooks!
29
30
 
@@ -62,13 +63,29 @@ module Sorcery
62
63
  end
63
64
  end
64
65
 
66
+ # defines mongo_mapper fields on the model class,
67
+ def init_mongo_mapper_support!
68
+ self.class_eval do
69
+ sorcery_config.username_attribute_names.each do |username|
70
+ key username, String
71
+ end
72
+ key sorcery_config.email_attribute_name, String unless sorcery_config.username_attribute_names.include?(sorcery_config.email_attribute_name)
73
+ key sorcery_config.crypted_password_attribute_name, String
74
+ key sorcery_config.salt_attribute_name, String
75
+ end
76
+ end
77
+
65
78
  # add virtual password accessor and ORM callbacks.
66
79
  def init_orm_hooks!
67
80
  self.class_eval do
68
81
  attr_accessor @sorcery_config.password_attribute_name
69
82
  attr_protected @sorcery_config.crypted_password_attribute_name, @sorcery_config.salt_attribute_name
70
- before_save :encrypt_password, :if => Proc.new { |record| record.send(sorcery_config.password_attribute_name).present? }
71
- after_save :clear_virtual_password, :if => Proc.new { |record| record.send(sorcery_config.password_attribute_name).present? }
83
+ before_save :encrypt_password, :if => Proc.new { |record|
84
+ record.send(sorcery_config.password_attribute_name).present?
85
+ }
86
+ after_save :clear_virtual_password, :if => Proc.new { |record|
87
+ record.send(sorcery_config.password_attribute_name).present?
88
+ }
72
89
  end
73
90
  end
74
91
  end
@@ -0,0 +1,49 @@
1
+ module Sorcery
2
+ module Model
3
+ module Adapters
4
+ module MongoMapper
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ include Sorcery::Model
9
+ end
10
+
11
+ module InstanceMethods
12
+ def increment(attr)
13
+ self.inc(attr,1)
14
+ end
15
+
16
+ def save!(options = {})
17
+ save(options)
18
+ end
19
+ end
20
+
21
+ module ClassMethods
22
+ def find_by_credentials(credentials)
23
+ @sorcery_config.username_attribute_names.each do |attribute|
24
+ @user = where(attribute => credentials[0]).first
25
+ break if @user
26
+ end
27
+ @user
28
+ end
29
+
30
+ def find_by_id(id)
31
+ find(id)
32
+ end
33
+
34
+ def find_by_activation_token(token)
35
+ where(sorcery_config.activation_token_attribute_name => token).first
36
+ end
37
+
38
+ def transaction(&blk)
39
+ tap(&blk)
40
+ end
41
+
42
+ def find_by_sorcery_token(token_attr_name, token)
43
+ where(token_attr_name => token).first
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -41,7 +41,7 @@ module Sorcery
41
41
 
42
42
  def find_by_username(username)
43
43
  query = sorcery_config.username_attribute_names.map {|name| {name => username}}
44
- where(query).first
44
+ any_of(*query).first
45
45
  end
46
46
 
47
47
  def transaction(&blk)
@@ -26,6 +26,9 @@ module Sorcery
26
26
 
27
27
  base.sorcery_config.before_authenticate << :prevent_locked_user_login
28
28
  base.sorcery_config.after_config << :define_brute_force_protection_mongoid_fields if defined?(Mongoid) and base.ancestors.include?(Mongoid::Document)
29
+ if defined?(MongoMapper) and base.ancestors.include?(MongoMapper::Document)
30
+ base.sorcery_config.after_config << :define_brute_force_protection_mongo_mapper_fields
31
+ end
29
32
  base.extend(ClassMethods)
30
33
  base.send(:include, InstanceMethods)
31
34
  end
@@ -37,6 +40,11 @@ module Sorcery
37
40
  field sorcery_config.failed_logins_count_attribute_name, :type => Integer
38
41
  field sorcery_config.lock_expires_at_attribute_name, :type => DateTime
39
42
  end
43
+
44
+ def define_brute_force_protection_mongo_mapper_fields
45
+ key sorcery_config.failed_logins_count_attribute_name, Integer
46
+ key sorcery_config.lock_expires_at_attribute_name, DateTime
47
+ end
40
48
  end
41
49
 
42
50
  module InstanceMethods
@@ -24,7 +24,10 @@ module Sorcery
24
24
  base.send(:include, InstanceMethods)
25
25
 
26
26
  base.sorcery_config.after_config << :define_remember_me_mongoid_fields if defined?(Mongoid) and base.ancestors.include?(Mongoid::Document)
27
-
27
+ if defined?(MongoMapper) and base.ancestors.include?(MongoMapper::Document)
28
+ base.sorcery_config.after_config << :define_remember_me_mongo_mapper_fields
29
+ end
30
+
28
31
  base.extend(ClassMethods)
29
32
  end
30
33
 
@@ -36,6 +39,10 @@ module Sorcery
36
39
  field sorcery_config.remember_me_token_expires_at_attribute_name, :type => Time
37
40
  end
38
41
 
42
+ def define_remember_me_mongo_mapper_fields
43
+ key sorcery_config.remember_me_token_attribute_name, String
44
+ key sorcery_config.remember_me_token_expires_at_attribute_name, Time
45
+ end
39
46
  end
40
47
 
41
48
  module InstanceMethods
@@ -45,6 +45,9 @@ module Sorcery
45
45
 
46
46
  base.sorcery_config.after_config << :validate_mailer_defined
47
47
  base.sorcery_config.after_config << :define_reset_password_mongoid_fields if defined?(Mongoid) and base.ancestors.include?(Mongoid::Document)
48
+ if defined?(MongoMapper) and base.ancestors.include?(MongoMapper::Document)
49
+ base.sorcery_config.after_config << :define_reset_password_mongo_mapper_fields
50
+ end
48
51
 
49
52
  base.send(:include, InstanceMethods)
50
53
 
@@ -72,6 +75,13 @@ module Sorcery
72
75
  field sorcery_config.reset_password_token_expires_at_attribute_name, :type => DateTime
73
76
  field sorcery_config.reset_password_email_sent_at_attribute_name, :type => DateTime
74
77
  end
78
+
79
+ def define_reset_password_mongo_mapper_fields
80
+ key sorcery_config.reset_password_token_attribute_name, String
81
+ # no DateTime in MM
82
+ key sorcery_config.reset_password_token_expires_at_attribute_name, Time
83
+ key sorcery_config.reset_password_email_sent_at_attribute_name, Time
84
+ end
75
85
  end
76
86
 
77
87
  module InstanceMethods
@@ -52,6 +52,9 @@ module Sorcery
52
52
 
53
53
  base.sorcery_config.after_config << :validate_mailer_defined
54
54
  base.sorcery_config.after_config << :define_user_activation_mongoid_fields if defined?(Mongoid) and base.ancestors.include?(Mongoid::Document)
55
+ if defined?(MongoMapper) and base.ancestors.include?(MongoMapper::Document)
56
+ base.sorcery_config.after_config << :define_user_activation_mongo_mapper_fields
57
+ end
55
58
  base.sorcery_config.before_authenticate << :prevent_non_active_login
56
59
 
57
60
  base.extend(ClassMethods)
@@ -84,6 +87,15 @@ module Sorcery
84
87
  field sorcery_config.activation_token_expires_at_attribute_name, :type => DateTime
85
88
  end
86
89
  end
90
+
91
+ def define_user_activation_mongo_mapper_fields
92
+ self.class_eval do
93
+ key sorcery_config.activation_state_attribute_name, String
94
+ key sorcery_config.activation_token_attribute_name, String
95
+ # no DateTime in MM
96
+ key sorcery_config.activation_token_expires_at_attribute_name, Time
97
+ end
98
+ end
87
99
  end
88
100
 
89
101
  module InstanceMethods
data/sorcery.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sorcery"
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Noam Ben Ari"]
12
- s.date = "2011-09-30"
12
+ s.date = "2011-10-22"
13
13
  s.description = "Provides common authentication needs such as signing in/out, activating by email and resetting password."
14
14
  s.email = "nbenari@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -25,17 +25,18 @@ Gem::Specification.new do |s|
25
25
  "README.rdoc",
26
26
  "Rakefile",
27
27
  "VERSION",
28
- "lib/generators/sorcery_migration/sorcery_migration_generator.rb",
29
- "lib/generators/sorcery_migration/templates/activity_logging.rb",
30
- "lib/generators/sorcery_migration/templates/brute_force_protection.rb",
31
- "lib/generators/sorcery_migration/templates/core.rb",
32
- "lib/generators/sorcery_migration/templates/external.rb",
33
- "lib/generators/sorcery_migration/templates/remember_me.rb",
34
- "lib/generators/sorcery_migration/templates/reset_password.rb",
35
- "lib/generators/sorcery_migration/templates/user_activation.rb",
28
+ "lib/generators/sorcery/USAGE",
29
+ "lib/generators/sorcery/install_generator.rb",
30
+ "lib/generators/sorcery/templates/initializer.rb",
31
+ "lib/generators/sorcery/templates/migration/activity_logging.rb",
32
+ "lib/generators/sorcery/templates/migration/brute_force_protection.rb",
33
+ "lib/generators/sorcery/templates/migration/core.rb",
34
+ "lib/generators/sorcery/templates/migration/external.rb",
35
+ "lib/generators/sorcery/templates/migration/remember_me.rb",
36
+ "lib/generators/sorcery/templates/migration/reset_password.rb",
37
+ "lib/generators/sorcery/templates/migration/user_activation.rb",
36
38
  "lib/sorcery.rb",
37
39
  "lib/sorcery/controller.rb",
38
- "lib/sorcery/controller/adapters/sinatra.rb",
39
40
  "lib/sorcery/controller/submodules/activity_logging.rb",
40
41
  "lib/sorcery/controller/submodules/brute_force_protection.rb",
41
42
  "lib/sorcery/controller/submodules/external.rb",
@@ -56,9 +57,9 @@ Gem::Specification.new do |s|
56
57
  "lib/sorcery/crypto_providers/sha256.rb",
57
58
  "lib/sorcery/crypto_providers/sha512.rb",
58
59
  "lib/sorcery/engine.rb",
59
- "lib/sorcery/initializers/initializer.rb",
60
60
  "lib/sorcery/model.rb",
61
61
  "lib/sorcery/model/adapters/active_record.rb",
62
+ "lib/sorcery/model/adapters/mongo_mapper.rb",
62
63
  "lib/sorcery/model/adapters/mongoid.rb",
63
64
  "lib/sorcery/model/submodules/activity_logging.rb",
64
65
  "lib/sorcery/model/submodules/brute_force_protection.rb",
@@ -68,14 +69,10 @@ Gem::Specification.new do |s|
68
69
  "lib/sorcery/model/submodules/user_activation.rb",
69
70
  "lib/sorcery/model/temporary_token.rb",
70
71
  "lib/sorcery/railties/tasks.rake",
71
- "lib/sorcery/sinatra.rb",
72
72
  "lib/sorcery/test_helpers.rb",
73
73
  "lib/sorcery/test_helpers/internal.rb",
74
74
  "lib/sorcery/test_helpers/internal/rails.rb",
75
- "lib/sorcery/test_helpers/internal/sinatra.rb",
76
- "lib/sorcery/test_helpers/internal/sinatra_modular.rb",
77
75
  "lib/sorcery/test_helpers/rails.rb",
78
- "lib/sorcery/test_helpers/sinatra.rb",
79
76
  "sorcery.gemspec",
80
77
  "spec/Gemfile",
81
78
  "spec/Gemfile.lock",
@@ -87,7 +84,6 @@ Gem::Specification.new do |s|
87
84
  "spec/rails3/Gemfile.lock",
88
85
  "spec/rails3/README",
89
86
  "spec/rails3/Rakefile",
90
- "spec/rails3/Rakefile.unused",
91
87
  "spec/rails3/app/controllers/application_controller.rb",
92
88
  "spec/rails3/app/helpers/application_helper.rb",
93
89
  "spec/rails3/app/mailers/sorcery_mailer.rb",
@@ -161,6 +157,68 @@ Gem::Specification.new do |s|
161
157
  "spec/rails3/spec/user_reset_password_spec.rb",
162
158
  "spec/rails3/spec/user_spec.rb",
163
159
  "spec/rails3/vendor/plugins/.gitkeep",
160
+ "spec/rails3_mongo_mapper/.gitignore",
161
+ "spec/rails3_mongo_mapper/.rspec",
162
+ "spec/rails3_mongo_mapper/Gemfile",
163
+ "spec/rails3_mongo_mapper/Gemfile.lock",
164
+ "spec/rails3_mongo_mapper/Rakefile",
165
+ "spec/rails3_mongo_mapper/app/controllers/application_controller.rb",
166
+ "spec/rails3_mongo_mapper/app/helpers/application_helper.rb",
167
+ "spec/rails3_mongo_mapper/app/mailers/sorcery_mailer.rb",
168
+ "spec/rails3_mongo_mapper/app/models/authentication.rb",
169
+ "spec/rails3_mongo_mapper/app/models/user.rb",
170
+ "spec/rails3_mongo_mapper/app/views/layouts/application.html.erb",
171
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.html.erb",
172
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_email.text.erb",
173
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_success_email.html.erb",
174
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/activation_success_email.text.erb",
175
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.html.erb",
176
+ "spec/rails3_mongo_mapper/app/views/sorcery_mailer/reset_password_email.text.erb",
177
+ "spec/rails3_mongo_mapper/config.ru",
178
+ "spec/rails3_mongo_mapper/config/application.rb",
179
+ "spec/rails3_mongo_mapper/config/boot.rb",
180
+ "spec/rails3_mongo_mapper/config/environment.rb",
181
+ "spec/rails3_mongo_mapper/config/environments/development.rb",
182
+ "spec/rails3_mongo_mapper/config/environments/in_memory.rb",
183
+ "spec/rails3_mongo_mapper/config/environments/production.rb",
184
+ "spec/rails3_mongo_mapper/config/environments/test.rb",
185
+ "spec/rails3_mongo_mapper/config/initializers/backtrace_silencers.rb",
186
+ "spec/rails3_mongo_mapper/config/initializers/inflections.rb",
187
+ "spec/rails3_mongo_mapper/config/initializers/mime_types.rb",
188
+ "spec/rails3_mongo_mapper/config/initializers/mongo.rb",
189
+ "spec/rails3_mongo_mapper/config/initializers/secret_token.rb",
190
+ "spec/rails3_mongo_mapper/config/initializers/session_store.rb",
191
+ "spec/rails3_mongo_mapper/config/locales/en.yml",
192
+ "spec/rails3_mongo_mapper/config/routes.rb",
193
+ "spec/rails3_mongo_mapper/db/schema.rb",
194
+ "spec/rails3_mongo_mapper/db/seeds.rb",
195
+ "spec/rails3_mongo_mapper/lib/tasks/.gitkeep",
196
+ "spec/rails3_mongo_mapper/public/404.html",
197
+ "spec/rails3_mongo_mapper/public/422.html",
198
+ "spec/rails3_mongo_mapper/public/500.html",
199
+ "spec/rails3_mongo_mapper/public/favicon.ico",
200
+ "spec/rails3_mongo_mapper/public/images/rails.png",
201
+ "spec/rails3_mongo_mapper/public/javascripts/application.js",
202
+ "spec/rails3_mongo_mapper/public/javascripts/controls.js",
203
+ "spec/rails3_mongo_mapper/public/javascripts/dragdrop.js",
204
+ "spec/rails3_mongo_mapper/public/javascripts/effects.js",
205
+ "spec/rails3_mongo_mapper/public/javascripts/prototype.js",
206
+ "spec/rails3_mongo_mapper/public/javascripts/rails.js",
207
+ "spec/rails3_mongo_mapper/public/robots.txt",
208
+ "spec/rails3_mongo_mapper/public/stylesheets/.gitkeep",
209
+ "spec/rails3_mongo_mapper/script/rails",
210
+ "spec/rails3_mongo_mapper/spec/controller_spec.rb",
211
+ "spec/rails3_mongo_mapper/spec/spec.opts",
212
+ "spec/rails3_mongo_mapper/spec/spec_helper.orig.rb",
213
+ "spec/rails3_mongo_mapper/spec/spec_helper.rb",
214
+ "spec/rails3_mongo_mapper/spec/user_activation_spec.rb",
215
+ "spec/rails3_mongo_mapper/spec/user_activity_logging_spec.rb",
216
+ "spec/rails3_mongo_mapper/spec/user_brute_force_protection_spec.rb",
217
+ "spec/rails3_mongo_mapper/spec/user_oauth_spec.rb",
218
+ "spec/rails3_mongo_mapper/spec/user_remember_me_spec.rb",
219
+ "spec/rails3_mongo_mapper/spec/user_reset_password_spec.rb",
220
+ "spec/rails3_mongo_mapper/spec/user_spec.rb",
221
+ "spec/rails3_mongo_mapper/vendor/plugins/.gitkeep",
164
222
  "spec/rails3_mongoid/.gitignore",
165
223
  "spec/rails3_mongoid/.rspec",
166
224
  "spec/rails3_mongoid/Gemfile",
@@ -211,6 +269,7 @@ Gem::Specification.new do |s|
211
269
  "spec/rails3_mongoid/public/robots.txt",
212
270
  "spec/rails3_mongoid/public/stylesheets/.gitkeep",
213
271
  "spec/rails3_mongoid/script/rails",
272
+ "spec/rails3_mongoid/spec/controller_activity_logging_spec.rb",
214
273
  "spec/rails3_mongoid/spec/controller_spec.rb",
215
274
  "spec/rails3_mongoid/spec/spec.opts",
216
275
  "spec/rails3_mongoid/spec/spec_helper.orig.rb",
@@ -232,60 +291,6 @@ Gem::Specification.new do |s|
232
291
  "spec/shared_examples/user_remember_me_shared_examples.rb",
233
292
  "spec/shared_examples/user_reset_password_shared_examples.rb",
234
293
  "spec/shared_examples/user_shared_examples.rb",
235
- "spec/sinatra/Gemfile",
236
- "spec/sinatra/Gemfile.lock",
237
- "spec/sinatra/Rakefile",
238
- "spec/sinatra/authentication.rb",
239
- "spec/sinatra/db/migrate/activation/20101224223622_add_activation_to_users.rb",
240
- "spec/sinatra/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb",
241
- "spec/sinatra/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb",
242
- "spec/sinatra/db/migrate/core/20101224223620_create_users.rb",
243
- "spec/sinatra/db/migrate/external/20101224223628_create_authentications.rb",
244
- "spec/sinatra/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb",
245
- "spec/sinatra/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb",
246
- "spec/sinatra/filters.rb",
247
- "spec/sinatra/modular.rb",
248
- "spec/sinatra/myapp.rb",
249
- "spec/sinatra/sorcery_mailer.rb",
250
- "spec/sinatra/spec/controller_activity_logging_spec.rb",
251
- "spec/sinatra/spec/controller_brute_force_protection_spec.rb",
252
- "spec/sinatra/spec/controller_http_basic_auth_spec.rb",
253
- "spec/sinatra/spec/controller_oauth2_spec.rb",
254
- "spec/sinatra/spec/controller_oauth_spec.rb",
255
- "spec/sinatra/spec/controller_remember_me_spec.rb",
256
- "spec/sinatra/spec/controller_session_timeout_spec.rb",
257
- "spec/sinatra/spec/controller_spec.rb",
258
- "spec/sinatra/spec/spec.opts",
259
- "spec/sinatra/spec/spec_helper.rb",
260
- "spec/sinatra/user.rb",
261
- "spec/sinatra/views/test_login.erb",
262
- "spec/sinatra_modular/Gemfile",
263
- "spec/sinatra_modular/Gemfile.lock",
264
- "spec/sinatra_modular/Rakefile",
265
- "spec/sinatra_modular/authentication.rb",
266
- "spec/sinatra_modular/db/migrate/activation/20101224223622_add_activation_to_users.rb",
267
- "spec/sinatra_modular/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb",
268
- "spec/sinatra_modular/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb",
269
- "spec/sinatra_modular/db/migrate/core/20101224223620_create_users.rb",
270
- "spec/sinatra_modular/db/migrate/external/20101224223628_create_authentications.rb",
271
- "spec/sinatra_modular/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb",
272
- "spec/sinatra_modular/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb",
273
- "spec/sinatra_modular/filters.rb",
274
- "spec/sinatra_modular/modular.rb",
275
- "spec/sinatra_modular/myapp.rb",
276
- "spec/sinatra_modular/sorcery_mailer.rb",
277
- "spec/sinatra_modular/spec_modular/controller_activity_logging_spec.rb",
278
- "spec/sinatra_modular/spec_modular/controller_brute_force_protection_spec.rb",
279
- "spec/sinatra_modular/spec_modular/controller_http_basic_auth_spec.rb",
280
- "spec/sinatra_modular/spec_modular/controller_oauth2_spec.rb",
281
- "spec/sinatra_modular/spec_modular/controller_oauth_spec.rb",
282
- "spec/sinatra_modular/spec_modular/controller_remember_me_spec.rb",
283
- "spec/sinatra_modular/spec_modular/controller_session_timeout_spec.rb",
284
- "spec/sinatra_modular/spec_modular/controller_spec.rb",
285
- "spec/sinatra_modular/spec_modular/spec.opts",
286
- "spec/sinatra_modular/spec_modular/spec_helper.rb",
287
- "spec/sinatra_modular/user.rb",
288
- "spec/sinatra_modular/views/test_login.erb",
289
294
  "spec/sorcery_crypto_providers_spec.rb",
290
295
  "spec/spec.opts",
291
296
  "spec/spec_helper.rb"
@@ -293,147 +298,16 @@ Gem::Specification.new do |s|
293
298
  s.homepage = "http://github.com/NoamB/sorcery"
294
299
  s.licenses = ["MIT"]
295
300
  s.require_paths = ["lib"]
296
- s.rubygems_version = "1.8.10"
301
+ s.rubygems_version = "1.8.11"
297
302
  s.summary = "Magical authentication for Rails 3 applications"
298
- s.test_files = [
299
- "spec/rails3/app/controllers/application_controller.rb",
300
- "spec/rails3/app/helpers/application_helper.rb",
301
- "spec/rails3/app/mailers/sorcery_mailer.rb",
302
- "spec/rails3/app/models/authentication.rb",
303
- "spec/rails3/app/models/user.rb",
304
- "spec/rails3/config/application.rb",
305
- "spec/rails3/config/boot.rb",
306
- "spec/rails3/config/environment.rb",
307
- "spec/rails3/config/environments/development.rb",
308
- "spec/rails3/config/environments/in_memory.rb",
309
- "spec/rails3/config/environments/production.rb",
310
- "spec/rails3/config/environments/test.rb",
311
- "spec/rails3/config/initializers/backtrace_silencers.rb",
312
- "spec/rails3/config/initializers/inflections.rb",
313
- "spec/rails3/config/initializers/mime_types.rb",
314
- "spec/rails3/config/initializers/secret_token.rb",
315
- "spec/rails3/config/initializers/session_store.rb",
316
- "spec/rails3/config/routes.rb",
317
- "spec/rails3/db/migrate/activation/20101224223622_add_activation_to_users.rb",
318
- "spec/rails3/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb",
319
- "spec/rails3/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb",
320
- "spec/rails3/db/migrate/core/20101224223620_create_users.rb",
321
- "spec/rails3/db/migrate/external/20101224223628_create_authentications.rb",
322
- "spec/rails3/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb",
323
- "spec/rails3/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb",
324
- "spec/rails3/db/schema.rb",
325
- "spec/rails3/db/seeds.rb",
326
- "spec/rails3/spec/controller_activity_logging_spec.rb",
327
- "spec/rails3/spec/controller_brute_force_protection_spec.rb",
328
- "spec/rails3/spec/controller_http_basic_auth_spec.rb",
329
- "spec/rails3/spec/controller_oauth2_spec.rb",
330
- "spec/rails3/spec/controller_oauth_spec.rb",
331
- "spec/rails3/spec/controller_remember_me_spec.rb",
332
- "spec/rails3/spec/controller_session_timeout_spec.rb",
333
- "spec/rails3/spec/controller_spec.rb",
334
- "spec/rails3/spec/integration_spec.rb",
335
- "spec/rails3/spec/spec_helper.orig.rb",
336
- "spec/rails3/spec/spec_helper.rb",
337
- "spec/rails3/spec/user_activation_spec.rb",
338
- "spec/rails3/spec/user_activity_logging_spec.rb",
339
- "spec/rails3/spec/user_brute_force_protection_spec.rb",
340
- "spec/rails3/spec/user_oauth_spec.rb",
341
- "spec/rails3/spec/user_remember_me_spec.rb",
342
- "spec/rails3/spec/user_reset_password_spec.rb",
343
- "spec/rails3/spec/user_spec.rb",
344
- "spec/rails3_mongoid/app/controllers/application_controller.rb",
345
- "spec/rails3_mongoid/app/helpers/application_helper.rb",
346
- "spec/rails3_mongoid/app/mailers/sorcery_mailer.rb",
347
- "spec/rails3_mongoid/app/models/authentication.rb",
348
- "spec/rails3_mongoid/app/models/user.rb",
349
- "spec/rails3_mongoid/config/application.rb",
350
- "spec/rails3_mongoid/config/boot.rb",
351
- "spec/rails3_mongoid/config/environment.rb",
352
- "spec/rails3_mongoid/config/environments/development.rb",
353
- "spec/rails3_mongoid/config/environments/in_memory.rb",
354
- "spec/rails3_mongoid/config/environments/production.rb",
355
- "spec/rails3_mongoid/config/environments/test.rb",
356
- "spec/rails3_mongoid/config/initializers/backtrace_silencers.rb",
357
- "spec/rails3_mongoid/config/initializers/inflections.rb",
358
- "spec/rails3_mongoid/config/initializers/mime_types.rb",
359
- "spec/rails3_mongoid/config/initializers/secret_token.rb",
360
- "spec/rails3_mongoid/config/initializers/session_store.rb",
361
- "spec/rails3_mongoid/config/routes.rb",
362
- "spec/rails3_mongoid/db/schema.rb",
363
- "spec/rails3_mongoid/db/seeds.rb",
364
- "spec/rails3_mongoid/spec/controller_spec.rb",
365
- "spec/rails3_mongoid/spec/spec_helper.orig.rb",
366
- "spec/rails3_mongoid/spec/spec_helper.rb",
367
- "spec/rails3_mongoid/spec/user_activation_spec.rb",
368
- "spec/rails3_mongoid/spec/user_activity_logging_spec.rb",
369
- "spec/rails3_mongoid/spec/user_brute_force_protection_spec.rb",
370
- "spec/rails3_mongoid/spec/user_oauth_spec.rb",
371
- "spec/rails3_mongoid/spec/user_remember_me_spec.rb",
372
- "spec/rails3_mongoid/spec/user_reset_password_spec.rb",
373
- "spec/rails3_mongoid/spec/user_spec.rb",
374
- "spec/shared_examples/controller_oauth2_shared_examples.rb",
375
- "spec/shared_examples/controller_oauth_shared_examples.rb",
376
- "spec/shared_examples/user_activation_shared_examples.rb",
377
- "spec/shared_examples/user_activity_logging_shared_examples.rb",
378
- "spec/shared_examples/user_brute_force_protection_shared_examples.rb",
379
- "spec/shared_examples/user_oauth_shared_examples.rb",
380
- "spec/shared_examples/user_remember_me_shared_examples.rb",
381
- "spec/shared_examples/user_reset_password_shared_examples.rb",
382
- "spec/shared_examples/user_shared_examples.rb",
383
- "spec/sinatra/authentication.rb",
384
- "spec/sinatra/db/migrate/activation/20101224223622_add_activation_to_users.rb",
385
- "spec/sinatra/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb",
386
- "spec/sinatra/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb",
387
- "spec/sinatra/db/migrate/core/20101224223620_create_users.rb",
388
- "spec/sinatra/db/migrate/external/20101224223628_create_authentications.rb",
389
- "spec/sinatra/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb",
390
- "spec/sinatra/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb",
391
- "spec/sinatra/filters.rb",
392
- "spec/sinatra/modular.rb",
393
- "spec/sinatra/myapp.rb",
394
- "spec/sinatra/sorcery_mailer.rb",
395
- "spec/sinatra/spec/controller_activity_logging_spec.rb",
396
- "spec/sinatra/spec/controller_brute_force_protection_spec.rb",
397
- "spec/sinatra/spec/controller_http_basic_auth_spec.rb",
398
- "spec/sinatra/spec/controller_oauth2_spec.rb",
399
- "spec/sinatra/spec/controller_oauth_spec.rb",
400
- "spec/sinatra/spec/controller_remember_me_spec.rb",
401
- "spec/sinatra/spec/controller_session_timeout_spec.rb",
402
- "spec/sinatra/spec/controller_spec.rb",
403
- "spec/sinatra/spec/spec_helper.rb",
404
- "spec/sinatra/user.rb",
405
- "spec/sinatra_modular/authentication.rb",
406
- "spec/sinatra_modular/db/migrate/activation/20101224223622_add_activation_to_users.rb",
407
- "spec/sinatra_modular/db/migrate/activity_logging/20101224223624_add_activity_logging_to_users.rb",
408
- "spec/sinatra_modular/db/migrate/brute_force_protection/20101224223626_add_brute_force_protection_to_users.rb",
409
- "spec/sinatra_modular/db/migrate/core/20101224223620_create_users.rb",
410
- "spec/sinatra_modular/db/migrate/external/20101224223628_create_authentications.rb",
411
- "spec/sinatra_modular/db/migrate/remember_me/20101224223623_add_remember_me_token_to_users.rb",
412
- "spec/sinatra_modular/db/migrate/reset_password/20101224223622_add_reset_password_to_users.rb",
413
- "spec/sinatra_modular/filters.rb",
414
- "spec/sinatra_modular/modular.rb",
415
- "spec/sinatra_modular/myapp.rb",
416
- "spec/sinatra_modular/sorcery_mailer.rb",
417
- "spec/sinatra_modular/spec_modular/controller_activity_logging_spec.rb",
418
- "spec/sinatra_modular/spec_modular/controller_brute_force_protection_spec.rb",
419
- "spec/sinatra_modular/spec_modular/controller_http_basic_auth_spec.rb",
420
- "spec/sinatra_modular/spec_modular/controller_oauth2_spec.rb",
421
- "spec/sinatra_modular/spec_modular/controller_oauth_spec.rb",
422
- "spec/sinatra_modular/spec_modular/controller_remember_me_spec.rb",
423
- "spec/sinatra_modular/spec_modular/controller_session_timeout_spec.rb",
424
- "spec/sinatra_modular/spec_modular/controller_spec.rb",
425
- "spec/sinatra_modular/spec_modular/spec_helper.rb",
426
- "spec/sinatra_modular/user.rb",
427
- "spec/sorcery_crypto_providers_spec.rb",
428
- "spec/spec_helper.rb"
429
- ]
430
303
 
431
304
  if s.respond_to? :specification_version then
432
305
  s.specification_version = 3
433
306
 
434
307
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
435
308
  s.add_runtime_dependency(%q<oauth>, ["~> 0.4.4"])
436
- s.add_runtime_dependency(%q<oauth2>, ["~> 0.5.1"])
309
+ s.add_runtime_dependency(%q<oauth2>, ["~> 0.4.1"])
310
+ s.add_runtime_dependency(%q<mongo_mapper>, [">= 0"])
437
311
  s.add_development_dependency(%q<rails>, [">= 3.0.0"])
438
312
  s.add_development_dependency(%q<json>, [">= 1.5.1"])
439
313
  s.add_development_dependency(%q<mongoid>, ["~> 2.0"])
@@ -449,10 +323,11 @@ Gem::Specification.new do |s|
449
323
  s.add_development_dependency(%q<timecop>, [">= 0"])
450
324
  s.add_runtime_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
451
325
  s.add_runtime_dependency(%q<oauth>, ["~> 0.4.4"])
452
- s.add_runtime_dependency(%q<oauth2>, ["~> 0.5.1"])
326
+ s.add_runtime_dependency(%q<oauth2>, ["~> 0.4.1"])
453
327
  else
454
328
  s.add_dependency(%q<oauth>, ["~> 0.4.4"])
455
- s.add_dependency(%q<oauth2>, ["~> 0.5.1"])
329
+ s.add_dependency(%q<oauth2>, ["~> 0.4.1"])
330
+ s.add_dependency(%q<mongo_mapper>, [">= 0"])
456
331
  s.add_dependency(%q<rails>, [">= 3.0.0"])
457
332
  s.add_dependency(%q<json>, [">= 1.5.1"])
458
333
  s.add_dependency(%q<mongoid>, ["~> 2.0"])
@@ -468,11 +343,12 @@ Gem::Specification.new do |s|
468
343
  s.add_dependency(%q<timecop>, [">= 0"])
469
344
  s.add_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
470
345
  s.add_dependency(%q<oauth>, ["~> 0.4.4"])
471
- s.add_dependency(%q<oauth2>, ["~> 0.5.1"])
346
+ s.add_dependency(%q<oauth2>, ["~> 0.4.1"])
472
347
  end
473
348
  else
474
349
  s.add_dependency(%q<oauth>, ["~> 0.4.4"])
475
- s.add_dependency(%q<oauth2>, ["~> 0.5.1"])
350
+ s.add_dependency(%q<oauth2>, ["~> 0.4.1"])
351
+ s.add_dependency(%q<mongo_mapper>, [">= 0"])
476
352
  s.add_dependency(%q<rails>, [">= 3.0.0"])
477
353
  s.add_dependency(%q<json>, [">= 1.5.1"])
478
354
  s.add_dependency(%q<mongoid>, ["~> 2.0"])
@@ -488,7 +364,7 @@ Gem::Specification.new do |s|
488
364
  s.add_dependency(%q<timecop>, [">= 0"])
489
365
  s.add_dependency(%q<bcrypt-ruby>, ["~> 3.0.0"])
490
366
  s.add_dependency(%q<oauth>, ["~> 0.4.4"])
491
- s.add_dependency(%q<oauth2>, ["~> 0.5.1"])
367
+ s.add_dependency(%q<oauth2>, ["~> 0.4.1"])
492
368
  end
493
369
  end
494
370