authentication-zero 2.8.2 → 2.8.3

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: 8ea407810dad8ddf7ac7366ebf6fe46c7d3558b2376fc33981ecb5ee32d968f0
4
- data.tar.gz: 9be562630186a350cb34df5d395692b99219f5627568a19715d3c826b706cffa
3
+ metadata.gz: 7c761cc8c78b6706041724ca6313bb115f8263036a5d4ea94e50ea30c8928ebc
4
+ data.tar.gz: d9488244decbc2fbd95e4d46b6847d34b701b3f023c6bb37c26da19a67a7ab19
5
5
  SHA512:
6
- metadata.gz: 1e08a25cda16b7e975057159b8cafac1a9e20a94730c5a28a10f9b5d26a66d448895e2b726141a1f6091042e2ffc31c730bcae0ca9d7609b0b5cde5b3bb5ae7d
7
- data.tar.gz: 4c00dd86cea638d791c1306114405cac87c7703aa615e730be5fb6719293b0c76fd83ec905cc7043af0e282605240ccab85225167db7e2aa6cba6a2d576ff570
6
+ metadata.gz: 9a09fd156b599aba36c0e27d6c96e07779fde672da91b2db7541d12ea2395f581114569f8036cd18cdf6a062d68b9cabacb543b76a5885aa4121a79768495831
7
+ data.tar.gz: bbdcd461f3effa96d83ffb631defa701eb4b174bc3ada9ce6782e906b136ed2c7d45f8f5c2b56b80d8caa95326f5fbcfa637759c44b3a731c356b3adef56b819
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.8.2)
4
+ authentication-zero (2.8.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.8.2"
2
+ VERSION = "2.8.3"
3
3
  end
@@ -19,6 +19,6 @@ class Identity::EmailsController < ApplicationController
19
19
  end
20
20
 
21
21
  def <%= "#{singular_table_name}_params" %>
22
- params.require(:<%= singular_table_name %>).permit(:email)
22
+ params.permit(:email)
23
23
  end
24
24
  end
@@ -37,7 +37,7 @@ class Identity::PasswordResetsController < ApplicationController
37
37
  end
38
38
 
39
39
  def <%= "#{singular_table_name}_params" %>
40
- params.require(:<%= singular_table_name %>).permit(:password, :password_confirmation)
40
+ params.permit(:password, :password_confirmation)
41
41
  end
42
42
  <% if options.lockable? %>
43
43
  def require_locking
@@ -20,6 +20,6 @@ class PasswordsController < ApplicationController
20
20
  end
21
21
 
22
22
  def <%= "#{singular_table_name}_params" %>
23
- params.require(:<%= singular_table_name %>).permit(:password, :password_confirmation)
23
+ params.permit(:password, :password_confirmation)
24
24
  end
25
25
  end
@@ -20,7 +20,7 @@ class RegistrationsController < ApplicationController
20
20
 
21
21
  private
22
22
  def <%= "#{singular_table_name}_params" %>
23
- params.require(:<%= singular_table_name %>).permit(:email, :password, :password_confirmation)
23
+ params.permit(:email, :password, :password_confirmation)
24
24
  end
25
25
 
26
26
  def session_params
@@ -8,7 +8,7 @@
8
8
  <p><%%= button_to "Re-send verification email", identity_email_verification_path %></p>
9
9
  <%% end %>
10
10
 
11
- <%%= form_with(model: @<%= model_resource_name %>, url: identity_email_path) do |form| %>
11
+ <%%= form_with(url: identity_email_path, method: :patch) do |form| %>
12
12
  <%% if @<%= singular_table_name %>.errors.any? %>
13
13
  <div style="color: red">
14
14
  <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
@@ -1,6 +1,6 @@
1
1
  <h1>Reset your password</h1>
2
2
 
3
- <%%= form_with(model: @<%= model_resource_name %>, url: identity_password_reset_path) do |form| %>
3
+ <%%= form_with(url: identity_password_reset_path, method: :patch) do |form| %>
4
4
  <%% if @<%= singular_table_name %>.errors.any? %>
5
5
  <div style="color: red">
6
6
  <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h1>Change your password</h1>
4
4
 
5
- <%%= form_with(model: @<%= model_resource_name %>, url: password_path) do |form| %>
5
+ <%%= form_with(url: password_path, method: :patch) do |form| %>
6
6
  <%% if @<%= singular_table_name %>.errors.any? %>
7
7
  <div style="color: red">
8
8
  <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
@@ -1,6 +1,6 @@
1
1
  <h1>Sign up</h1>
2
2
 
3
- <%%= form_with(model: @<%= model_resource_name %>, url: sign_up_path) do |form| %>
3
+ <%%= form_with(url: sign_up_path) do |form| %>
4
4
  <%% if @<%= singular_table_name %>.errors.any? %>
5
5
  <div style="color: red">
6
6
  <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
@@ -18,14 +18,14 @@ class Identity::EmailsControllerTest < ActionDispatch::IntegrationTest
18
18
  end
19
19
 
20
20
  test "should update email" do
21
- patch identity_email_url, params: { <%= singular_table_name %>: { email: "new_email@hey.com" } }
21
+ patch identity_email_url, params: { email: "new_email@hey.com" }
22
22
  assert_redirected_to root_url
23
23
  end
24
24
 
25
25
  test "should not update email without sudo" do
26
26
  @<%= singular_table_name %>.sessions.last.update! sudo_at: 1.day.ago
27
27
 
28
- patch identity_email_url, params: { <%= singular_table_name %>: { email: "new_email@hey.com" } }
28
+ patch identity_email_url, params: { email: "new_email@hey.com" }
29
29
  assert_redirected_to new_sessions_sudo_url(proceed_to_url: identity_email_url)
30
30
  end
31
31
 
@@ -49,7 +49,7 @@ class Identity::PasswordResetsControllerTest < ActionDispatch::IntegrationTest
49
49
  end
50
50
 
51
51
  test "should update password" do
52
- patch identity_password_reset_url, params: { token: @sid, <%= singular_table_name %>: { password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" } }
52
+ patch identity_password_reset_url, params: { token: @sid, password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
53
53
  assert_redirected_to sign_in_url
54
54
  end
55
55
 
@@ -11,12 +11,12 @@ class PasswordsControllerTest < ActionDispatch::IntegrationTest
11
11
  end
12
12
 
13
13
  test "should update password" do
14
- patch password_url, params: { current_password: "Secret1*3*5*", <%= singular_table_name %>: { password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" } }
14
+ patch password_url, params: { current_password: "Secret1*3*5*", password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
15
15
  assert_redirected_to root_url
16
16
  end
17
17
 
18
18
  test "should not update password with wrong current password" do
19
- patch password_url, params: { current_password: "SecretWrong1*3", <%= singular_table_name %>: { password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" } }
19
+ patch password_url, params: { current_password: "SecretWrong1*3", password: "Secret6*4*2*", password_confirmation: "Secret6*4*2*" }
20
20
 
21
21
  assert_redirected_to edit_password_url
22
22
  assert_equal "The current password you entered is incorrect", flash[:alert]
@@ -8,7 +8,7 @@ class RegistrationsControllerTest < ActionDispatch::IntegrationTest
8
8
 
9
9
  test "should sign up" do
10
10
  assert_difference("<%= class_name %>.count") do
11
- post sign_up_url, params: { <%= singular_table_name %>: { email: "lazaronixon@hey.com", password: "Secret1*3*5*", password_confirmation: "Secret1*3*5*" } }, headers: { "User-Agent" => "Firefox" }
11
+ post sign_up_url, params: { email: "lazaronixon@hey.com", password: "Secret1*3*5*", password_confirmation: "Secret1*3*5*" }, headers: { "User-Agent" => "Firefox" }
12
12
  end
13
13
 
14
14
  assert_redirected_to root_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon