loyal_devise 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.travis.yml +14 -9
- data/.yardopts +9 -0
- data/CHANGELOG.rdoc +60 -5
- data/CONTRIBUTING.md +4 -2
- data/Gemfile +7 -7
- data/Gemfile.lock +107 -101
- data/MIT-LICENSE +1 -1
- data/README.md +110 -48
- data/Rakefile +1 -0
- data/app/controllers/devise/confirmations_controller.rb +2 -4
- data/app/controllers/devise/omniauth_callbacks_controller.rb +0 -1
- data/app/controllers/devise/passwords_controller.rb +16 -5
- data/app/controllers/devise/registrations_controller.rb +13 -7
- data/app/controllers/devise/sessions_controller.rb +6 -6
- data/app/controllers/devise/unlocks_controller.rb +3 -4
- data/app/controllers/devise_controller.rb +12 -33
- data/app/helpers/devise_helper.rb +0 -1
- data/app/mailers/devise/mailer.rb +7 -8
- data/app/views/devise/mailer/confirmation_instructions.html.erb +1 -1
- data/app/views/devise/mailer/reset_password_instructions.html.erb +1 -1
- data/app/views/devise/registrations/edit.html.erb +5 -1
- data/config/locales/en.yml +48 -48
- data/devise.gemspec +6 -6
- data/devise.png +0 -0
- data/gemfiles/{Gemfile.rails-3.1.x → Gemfile.rails-3.2.x} +8 -12
- data/gemfiles/Gemfile.rails-3.2.x.lock +156 -0
- data/lib/devise.rb +34 -11
- data/lib/devise/controllers/helpers.rb +33 -7
- data/lib/devise/controllers/rememberable.rb +6 -3
- data/lib/devise/controllers/scoped_views.rb +1 -2
- data/lib/devise/controllers/url_helpers.rb +0 -1
- data/lib/devise/delegator.rb +0 -1
- data/lib/devise/failure_app.rb +8 -2
- data/lib/devise/hooks/activatable.rb +1 -2
- data/lib/devise/hooks/forgetable.rb +0 -1
- data/lib/devise/hooks/lockable.rb +1 -2
- data/lib/devise/hooks/rememberable.rb +1 -2
- data/lib/devise/hooks/timeoutable.rb +0 -1
- data/lib/devise/hooks/trackable.rb +0 -1
- data/lib/devise/mailers/helpers.rb +18 -14
- data/lib/devise/mapping.rb +6 -7
- data/lib/devise/models.rb +0 -1
- data/lib/devise/models/authenticatable.rb +50 -27
- data/lib/devise/models/confirmable.rb +37 -16
- data/lib/devise/models/database_authenticatable.rb +17 -3
- data/lib/devise/models/lockable.rb +1 -2
- data/lib/devise/models/omniauthable.rb +1 -2
- data/lib/devise/models/recoverable.rb +10 -6
- data/lib/devise/models/registerable.rb +0 -1
- data/lib/devise/models/rememberable.rb +1 -2
- data/lib/devise/models/timeoutable.rb +1 -2
- data/lib/devise/models/token_authenticatable.rb +0 -1
- data/lib/devise/models/trackable.rb +0 -1
- data/lib/devise/models/validatable.rb +0 -1
- data/lib/devise/modules.rb +1 -2
- data/lib/devise/omniauth.rb +0 -1
- data/lib/devise/omniauth/config.rb +0 -1
- data/lib/devise/omniauth/url_helpers.rb +0 -1
- data/lib/devise/orm/active_record.rb +1 -2
- data/lib/devise/orm/mongoid.rb +1 -2
- data/lib/devise/{param_filter.rb → parameter_filter.rb} +10 -12
- data/lib/devise/parameter_sanitizer.rb +59 -0
- data/lib/devise/rails.rb +0 -1
- data/lib/devise/rails/routes.rb +22 -18
- data/lib/devise/rails/warden_compat.rb +0 -30
- data/lib/devise/strategies/authenticatable.rb +8 -6
- data/lib/devise/strategies/base.rb +1 -2
- data/lib/devise/strategies/database_authenticatable.rb +1 -2
- data/lib/devise/strategies/rememberable.rb +1 -2
- data/lib/devise/strategies/token_authenticatable.rb +38 -4
- data/lib/devise/test_helpers.rb +0 -1
- data/lib/devise/time_inflector.rb +1 -2
- data/lib/devise/version.rb +1 -2
- data/lib/generators/active_record/devise_generator.rb +1 -5
- data/lib/generators/active_record/templates/migration.rb +0 -1
- data/lib/generators/active_record/templates/migration_existing.rb +0 -1
- data/lib/generators/devise/devise_generator.rb +0 -1
- data/lib/generators/devise/install_generator.rb +0 -1
- data/lib/generators/devise/orm_helpers.rb +1 -2
- data/lib/generators/devise/views_generator.rb +8 -3
- data/lib/generators/mongoid/devise_generator.rb +1 -2
- data/lib/generators/templates/README +1 -1
- data/lib/generators/templates/devise.rb +10 -5
- data/lib/generators/templates/markerb/confirmation_instructions.markerb +1 -1
- data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +1 -0
- data/lib/generators/templates/simple_form_for/registrations/edit.html.erb +6 -1
- data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +1 -0
- data/loyal_devise.gemspec +27 -0
- data/test/controllers/custom_strategy_test.rb +0 -1
- data/test/controllers/helpers_test.rb +0 -1
- data/test/controllers/internal_helpers_test.rb +13 -4
- data/test/controllers/passwords_controller_test.rb +32 -0
- data/test/controllers/sessions_controller_test.rb +28 -1
- data/test/controllers/url_helpers_test.rb +0 -1
- data/test/delegator_test.rb +0 -1
- data/test/devise_test.rb +12 -2
- data/test/failure_app_test.rb +3 -4
- data/test/generators/active_record_generator_test.rb +1 -4
- data/test/generators/devise_generator_test.rb +0 -1
- data/test/generators/install_generator_test.rb +0 -1
- data/test/generators/mongoid_generator_test.rb +0 -1
- data/test/generators/views_generator_test.rb +16 -2
- data/test/helpers/devise_helper_test.rb +1 -2
- data/test/integration/authenticatable_test.rb +92 -27
- data/test/integration/confirmable_test.rb +7 -7
- data/test/integration/database_authenticatable_test.rb +8 -7
- data/test/integration/http_authenticatable_test.rb +19 -2
- data/test/integration/lockable_test.rb +1 -2
- data/test/integration/omniauthable_test.rb +2 -3
- data/test/integration/recoverable_test.rb +40 -12
- data/test/integration/registerable_test.rb +17 -14
- data/test/integration/rememberable_test.rb +16 -10
- data/test/integration/timeoutable_test.rb +11 -2
- data/test/integration/token_authenticatable_test.rb +45 -2
- data/test/integration/trackable_test.rb +1 -2
- data/test/mailers/confirmation_instructions_test.rb +11 -3
- data/test/mailers/reset_password_instructions_test.rb +11 -3
- data/test/mailers/unlock_instructions_test.rb +11 -2
- data/test/mapping_test.rb +0 -1
- data/test/models/authenticatable_test.rb +6 -1
- data/test/models/confirmable_test.rb +53 -2
- data/test/models/database_authenticatable_test.rb +57 -21
- data/test/models/lockable_test.rb +1 -2
- data/test/models/omniauthable_test.rb +0 -1
- data/test/models/recoverable_test.rb +21 -5
- data/test/models/registerable_test.rb +0 -1
- data/test/models/rememberable_test.rb +4 -4
- data/test/models/serializable_test.rb +8 -8
- data/test/models/timeoutable_test.rb +0 -1
- data/test/models/token_authenticatable_test.rb +0 -1
- data/test/models/trackable_test.rb +0 -1
- data/test/models/validatable_test.rb +16 -6
- data/test/models_test.rb +7 -24
- data/test/omniauth/config_test.rb +1 -2
- data/test/omniauth/url_helpers_test.rb +4 -2
- data/test/orm/active_record.rb +1 -1
- data/test/orm/mongoid.rb +2 -4
- data/test/parameter_sanitizer_test.rb +51 -0
- data/test/rails_app/Rakefile +0 -4
- data/test/rails_app/app/active_record/admin.rb +0 -1
- data/test/rails_app/app/active_record/shim.rb +1 -2
- data/test/rails_app/app/active_record/user.rb +0 -1
- data/test/rails_app/app/controllers/admins/sessions_controller.rb +1 -2
- data/test/rails_app/app/controllers/admins_controller.rb +0 -1
- data/test/rails_app/app/controllers/application_controller.rb +1 -1
- data/test/rails_app/app/controllers/home_controller.rb +0 -1
- data/test/rails_app/app/controllers/publisher/registrations_controller.rb +1 -2
- data/test/rails_app/app/controllers/publisher/sessions_controller.rb +1 -2
- data/test/rails_app/app/controllers/users/omniauth_callbacks_controller.rb +1 -2
- data/test/rails_app/app/controllers/users_controller.rb +8 -1
- data/test/rails_app/app/helpers/application_helper.rb +0 -1
- data/test/rails_app/app/mailers/users/mailer.rb +4 -1
- data/test/rails_app/app/mongoid/admin.rb +4 -3
- data/test/rails_app/app/mongoid/shim.rb +3 -5
- data/test/rails_app/app/mongoid/user.rb +2 -3
- data/test/rails_app/app/views/users/edit_form.html.erb +1 -0
- data/test/rails_app/bin/bundle +3 -0
- data/test/rails_app/bin/rails +4 -0
- data/test/rails_app/bin/rake +4 -0
- data/test/rails_app/config/application.rb +1 -3
- data/test/rails_app/config/boot.rb +3 -4
- data/test/rails_app/config/environment.rb +2 -3
- data/test/rails_app/config/environments/development.rb +23 -8
- data/test/rails_app/config/environments/production.rb +68 -18
- data/test/rails_app/config/environments/test.rb +18 -16
- data/test/rails_app/config/initializers/backtrace_silencers.rb +0 -1
- data/test/rails_app/config/initializers/devise.rb +0 -1
- data/test/rails_app/config/initializers/inflections.rb +0 -1
- data/test/rails_app/config/initializers/secret_token.rb +8 -3
- data/test/rails_app/config/initializers/session_store.rb +1 -0
- data/test/rails_app/config/routes.rb +20 -17
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +0 -1
- data/test/rails_app/db/schema.rb +0 -1
- data/test/rails_app/lib/shared_admin.rb +0 -1
- data/test/rails_app/lib/shared_user.rb +0 -2
- data/test/routes_test.rb +22 -21
- data/test/support/assertions.rb +0 -1
- data/test/support/helpers.rb +1 -2
- data/test/support/integration.rb +0 -1
- data/test/support/webrat/integrations/rails.rb +0 -1
- data/test/test_helper.rb +8 -2
- data/test/test_helpers_test.rb +0 -1
- data/test/test_models.rb +26 -0
- metadata +65 -27
- data/gemfiles/Gemfile.rails-3.1.x.lock +0 -167
- data/test/indifferent_hash.rb +0 -34
- data/test/rails_app/script/rails +0 -10
data/test/indifferent_hash.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
require 'test_helper'
|
3
|
-
|
4
|
-
class IndifferentHashTest < ActiveSupport::TestCase
|
5
|
-
setup do
|
6
|
-
@hash = Devise::IndifferentHash.new
|
7
|
-
end
|
8
|
-
|
9
|
-
test "it overwrites getter and setter" do
|
10
|
-
@hash[:foo] = "bar"
|
11
|
-
assert_equal "bar", @hash["foo"]
|
12
|
-
assert_equal "bar", @hash[:foo]
|
13
|
-
|
14
|
-
@hash["foo"] = "baz"
|
15
|
-
assert_equal "baz", @hash["foo"]
|
16
|
-
assert_equal "baz", @hash[:foo]
|
17
|
-
end
|
18
|
-
|
19
|
-
test "it overwrites update" do
|
20
|
-
@hash.update :foo => "bar"
|
21
|
-
assert_equal "bar", @hash["foo"]
|
22
|
-
assert_equal "bar", @hash[:foo]
|
23
|
-
|
24
|
-
@hash.update "foo" => "baz"
|
25
|
-
assert_equal "baz", @hash["foo"]
|
26
|
-
assert_equal "baz", @hash[:foo]
|
27
|
-
end
|
28
|
-
|
29
|
-
test "it returns a Hash on to_hash" do
|
30
|
-
@hash[:foo] = "bar"
|
31
|
-
assert_equal Hash["foo", "bar"], @hash.to_hash
|
32
|
-
assert_kind_of Hash, @hash.to_hash
|
33
|
-
end
|
34
|
-
end if defined?(Devise::IndifferentHash)
|
data/test/rails_app/script/rails
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
ENV_PATH = File.expand_path('../../config/environment', __FILE__)
|
5
|
-
BOOT_PATH = File.expand_path('../../config/boot', __FILE__)
|
6
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
7
|
-
ROOT_PATH = File.expand_path('../..', __FILE__)
|
8
|
-
|
9
|
-
require BOOT_PATH
|
10
|
-
require 'rails/commands'
|