authlogic 4.0.1 → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +43 -1
  3. data/.rubocop_todo.yml +23 -132
  4. data/CHANGELOG.md +12 -0
  5. data/CONTRIBUTING.md +10 -3
  6. data/Gemfile +2 -2
  7. data/Rakefile +6 -6
  8. data/authlogic.gemspec +13 -12
  9. data/lib/authlogic/acts_as_authentic/base.rb +12 -7
  10. data/lib/authlogic/acts_as_authentic/email.rb +16 -6
  11. data/lib/authlogic/acts_as_authentic/logged_in_status.rb +10 -5
  12. data/lib/authlogic/acts_as_authentic/login.rb +11 -5
  13. data/lib/authlogic/acts_as_authentic/password.rb +111 -57
  14. data/lib/authlogic/acts_as_authentic/perishable_token.rb +6 -2
  15. data/lib/authlogic/acts_as_authentic/persistence_token.rb +1 -1
  16. data/lib/authlogic/acts_as_authentic/queries/find_with_case.rb +2 -2
  17. data/lib/authlogic/acts_as_authentic/restful_authentication.rb +31 -3
  18. data/lib/authlogic/acts_as_authentic/session_maintenance.rb +11 -3
  19. data/lib/authlogic/acts_as_authentic/single_access_token.rb +14 -2
  20. data/lib/authlogic/acts_as_authentic/validations_scope.rb +6 -6
  21. data/lib/authlogic/authenticates_many/association.rb +2 -2
  22. data/lib/authlogic/authenticates_many/base.rb +27 -19
  23. data/lib/authlogic/controller_adapters/rack_adapter.rb +1 -1
  24. data/lib/authlogic/controller_adapters/rails_adapter.rb +6 -3
  25. data/lib/authlogic/controller_adapters/sinatra_adapter.rb +2 -2
  26. data/lib/authlogic/crypto_providers.rb +2 -0
  27. data/lib/authlogic/crypto_providers/bcrypt.rb +15 -9
  28. data/lib/authlogic/crypto_providers/md5.rb +2 -1
  29. data/lib/authlogic/crypto_providers/scrypt.rb +12 -7
  30. data/lib/authlogic/crypto_providers/sha256.rb +2 -1
  31. data/lib/authlogic/crypto_providers/wordpress.rb +31 -2
  32. data/lib/authlogic/i18n.rb +22 -17
  33. data/lib/authlogic/regex.rb +57 -29
  34. data/lib/authlogic/session/activation.rb +1 -1
  35. data/lib/authlogic/session/brute_force_protection.rb +2 -2
  36. data/lib/authlogic/session/callbacks.rb +43 -36
  37. data/lib/authlogic/session/cookies.rb +4 -2
  38. data/lib/authlogic/session/existence.rb +1 -1
  39. data/lib/authlogic/session/foundation.rb +5 -1
  40. data/lib/authlogic/session/http_auth.rb +2 -2
  41. data/lib/authlogic/session/klass.rb +2 -1
  42. data/lib/authlogic/session/magic_columns.rb +4 -2
  43. data/lib/authlogic/session/magic_states.rb +9 -10
  44. data/lib/authlogic/session/params.rb +11 -4
  45. data/lib/authlogic/session/password.rb +72 -38
  46. data/lib/authlogic/session/perishable_token.rb +2 -1
  47. data/lib/authlogic/session/persistence.rb +2 -1
  48. data/lib/authlogic/session/scopes.rb +26 -16
  49. data/lib/authlogic/session/unauthorized_record.rb +12 -7
  50. data/lib/authlogic/session/validation.rb +1 -1
  51. data/lib/authlogic/test_case/mock_controller.rb +1 -1
  52. data/lib/authlogic/test_case/mock_cookie_jar.rb +1 -1
  53. data/lib/authlogic/test_case/mock_request.rb +1 -1
  54. data/lib/authlogic/version.rb +1 -1
  55. data/test/acts_as_authentic_test/base_test.rb +1 -1
  56. data/test/acts_as_authentic_test/email_test.rb +11 -11
  57. data/test/acts_as_authentic_test/logged_in_status_test.rb +4 -4
  58. data/test/acts_as_authentic_test/login_test.rb +2 -2
  59. data/test/acts_as_authentic_test/magic_columns_test.rb +1 -1
  60. data/test/acts_as_authentic_test/password_test.rb +1 -1
  61. data/test/acts_as_authentic_test/perishable_token_test.rb +2 -2
  62. data/test/acts_as_authentic_test/persistence_token_test.rb +1 -1
  63. data/test/acts_as_authentic_test/restful_authentication_test.rb +12 -3
  64. data/test/acts_as_authentic_test/session_maintenance_test.rb +1 -1
  65. data/test/acts_as_authentic_test/single_access_test.rb +1 -1
  66. data/test/adapter_test.rb +3 -3
  67. data/test/authenticates_many_test.rb +1 -1
  68. data/test/config_test.rb +9 -9
  69. data/test/crypto_provider_test/aes256_test.rb +1 -1
  70. data/test/crypto_provider_test/bcrypt_test.rb +1 -1
  71. data/test/crypto_provider_test/scrypt_test.rb +1 -1
  72. data/test/crypto_provider_test/sha1_test.rb +1 -1
  73. data/test/crypto_provider_test/sha256_test.rb +1 -1
  74. data/test/crypto_provider_test/sha512_test.rb +1 -1
  75. data/test/crypto_provider_test/wordpress_test.rb +24 -0
  76. data/test/i18n_test.rb +3 -3
  77. data/test/libs/user_session.rb +2 -2
  78. data/test/random_test.rb +1 -1
  79. data/test/session_test/activation_test.rb +1 -1
  80. data/test/session_test/active_record_trickery_test.rb +3 -3
  81. data/test/session_test/brute_force_protection_test.rb +1 -1
  82. data/test/session_test/callbacks_test.rb +9 -3
  83. data/test/session_test/cookies_test.rb +11 -11
  84. data/test/session_test/existence_test.rb +1 -1
  85. data/test/session_test/foundation_test.rb +1 -1
  86. data/test/session_test/http_auth_test.rb +6 -6
  87. data/test/session_test/id_test.rb +1 -1
  88. data/test/session_test/klass_test.rb +1 -1
  89. data/test/session_test/magic_columns_test.rb +1 -1
  90. data/test/session_test/magic_states_test.rb +1 -1
  91. data/test/session_test/params_test.rb +7 -4
  92. data/test/session_test/password_test.rb +1 -1
  93. data/test/session_test/perishability_test.rb +1 -1
  94. data/test/session_test/persistence_test.rb +1 -1
  95. data/test/session_test/scopes_test.rb +9 -3
  96. data/test/session_test/session_test.rb +2 -2
  97. data/test/session_test/timeout_test.rb +1 -1
  98. data/test/session_test/unauthorized_record_test.rb +1 -1
  99. data/test/session_test/validation_test.rb +1 -1
  100. data/test/test_helper.rb +34 -14
  101. metadata +6 -4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-20 00:00:00.000000000 Z
13
+ date: 2018-04-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 0.51.0
123
+ version: 0.54.0
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: 0.51.0
130
+ version: 0.54.0
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: timecop
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -249,6 +249,7 @@ files:
249
249
  - test/crypto_provider_test/sha1_test.rb
250
250
  - test/crypto_provider_test/sha256_test.rb
251
251
  - test/crypto_provider_test/sha512_test.rb
252
+ - test/crypto_provider_test/wordpress_test.rb
252
253
  - test/fixtures/companies.yml
253
254
  - test/fixtures/employees.yml
254
255
  - test/fixtures/projects.yml
@@ -337,6 +338,7 @@ test_files:
337
338
  - test/crypto_provider_test/sha1_test.rb
338
339
  - test/crypto_provider_test/sha256_test.rb
339
340
  - test/crypto_provider_test/sha512_test.rb
341
+ - test/crypto_provider_test/wordpress_test.rb
340
342
  - test/fixtures/companies.yml
341
343
  - test/fixtures/employees.yml
342
344
  - test/fixtures/projects.yml