alchemy-devise 4.3.1 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8ff701dc927764bc7c9cf43cc470f882d35c50bf4ad9f9a29c828b33934200e
4
- data.tar.gz: b78d425267af7117f47e525553c63a1a744a0ec19857b0b615a2f01c26daac24
3
+ metadata.gz: 7e352204aef8262b7a4b3cffe5ef3e7a58781194d777a481c3b99300f92499d6
4
+ data.tar.gz: 6fa7ec4f94b5333fe8cad0897f821d80fedb297f932f4d904cbd4eeecce5cd2b
5
5
  SHA512:
6
- metadata.gz: '0898ee0e43338c75145a93b7c7007ca86f60a1896688561f705a83fdc6f521f54eeb1ad31639416c2605f3028b62f517a3d6de2a53d07066bb57874383494f35'
7
- data.tar.gz: 95f9ca999bc45d9ceaff08bde3369e296aa546714c029491f33b93e0228f0d44900a43cb4a70e1e28b1c2517a9006daa8f598e44d8c39dc26b34a283235c4142
6
+ metadata.gz: 2b6ac50b6a59132a6232a481da65290dc7500f7ab44397cfce25df98ef28d2609340e65edc190d9dca48e74409b5a3eb394aa5f015f8e72f134fcb2b0d1f025c
7
+ data.tar.gz: bba4952131d61b8f33ec9670ffa9a2178ebe6095e52453f27e2c604b0918d9b528fd09d1f32a3f7d8a2a7896525b1f85004b695c04b0687a4a3066516a761cfe
@@ -2,7 +2,7 @@ module Alchemy
2
2
  module Admin
3
3
  class UsersController < ResourcesController
4
4
 
5
- before_action :set_roles_and_genders, except: [:index, :destroy]
5
+ before_action :set_roles, except: [:index, :destroy]
6
6
 
7
7
  load_and_authorize_resource class: Alchemy::User,
8
8
  only: [:edit, :update, :destroy]
@@ -67,13 +67,12 @@ module Alchemy
67
67
 
68
68
  private
69
69
 
70
- def set_roles_and_genders
70
+ def set_roles
71
71
  if can_update_role?
72
72
  @user_roles = User::ROLES.map do |role|
73
73
  [User.human_rolename(role), role]
74
74
  end
75
75
  end
76
- @user_genders = User.genders_for_select
77
76
  end
78
77
 
79
78
  def user_params
@@ -8,7 +8,6 @@ module Alchemy
8
8
  :lastname,
9
9
  :login,
10
10
  :email,
11
- :gender,
12
11
  :language,
13
12
  :password,
14
13
  :password_confirmation,
@@ -41,13 +40,6 @@ module Alchemy
41
40
  Alchemy.t("user_roles.#{role}")
42
41
  end
43
42
 
44
- def genders_for_select
45
- [
46
- [Alchemy.t('male'), 'male'],
47
- [Alchemy.t('female'), 'female']
48
- ]
49
- end
50
-
51
43
  def logged_in_timeout
52
44
  Config.get(:auto_logout_time).minutes.to_i
53
45
  end
@@ -1,7 +1,3 @@
1
- <%= f.input :gender,
2
- collection: @user_genders,
3
- prompt: Alchemy.t('Please choose'),
4
- input_html: {class: 'alchemy_selectbox'} %>
5
1
  <%= f.input :firstname %>
6
2
  <%= f.input :lastname %>
7
3
  <%= f.input :login, autofocus: true %>
@@ -18,3 +18,9 @@ Alchemy.user_class_name = 'Alchemy::User'
18
18
  Alchemy.signup_path = '/admin/signup'
19
19
  Alchemy.login_path = '/admin/login'
20
20
  Alchemy.logout_path = '/admin/logout'
21
+
22
+ if Alchemy.respond_to?(:logout_method)
23
+ Rails.application.config.after_initialize do
24
+ Alchemy.logout_method = Devise.sign_out_via
25
+ end
26
+ end
@@ -6,7 +6,6 @@ class CreateAlchemyUsers < ActiveRecord::Migration[4.2]
6
6
  t.string "lastname"
7
7
  t.string "login"
8
8
  t.string "email"
9
- t.string "gender"
10
9
  t.string "language"
11
10
  t.string "encrypted_password", limit: 128, default: "", null: false
12
11
  t.string "password_salt", limit: 128, default: "", null: false
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Devise
3
- VERSION = "4.3.1"
3
+ VERSION = "4.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.1
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-28 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0.beta
19
+ version: 4.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4.99'
22
+ version: '5.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 4.1.0.beta
29
+ version: 4.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4.99'
32
+ version: '5.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: devise
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: 4.7.1
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '4.99'
42
+ version: '5'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: 4.7.1
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '4.99'
52
+ version: '5'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: capybara
55
55
  requirement: !ruby/object:Gem::Requirement