authentication_with_registration_generator 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: febeeccd2a93042a70d9b2f3aa950e6b4481d88f5ccee985a9e038f02dfed96a
4
- data.tar.gz: a7b2ab6ea284d15c2c85a41cce2a06eba9b0baaf72387c7c1d82437466ae6504
3
+ metadata.gz: e2af1fb45e405f12df5e826d7ca8db516184ddbddff53aef0c8aef8ad8e332be
4
+ data.tar.gz: cb3dd9a2111996624d715a437223d98dce161a078a04bbe2c7ef9f2d63fb5dd9
5
5
  SHA512:
6
- metadata.gz: b6c36f2105d2c32a042e93f3b77df1c572708337208b7c1ee7282a26ec26a28b2a9014a394fbd65d582f01880cdbacfce32153ee374d72080bf0b13201fd8634
7
- data.tar.gz: a6e87fa43c9efd1a9a09c98647c354ec80bd878353478815675c6434a6e6a7edf44c75530a1da84a536324bfbf63200b3779daa86607e0fdf2730be63bec8994
6
+ metadata.gz: b5599634fe5d9503c956069e8d0a79c38e46a9cde0ecf7456e6cca241ab0fabb55a5cdc6e5a13ec8d18bb71887fe306d42031d71bf69ae66436fe1b17a493519
7
+ data.tar.gz: 149f1e0d9d8d04ffae7422eadc8585e49989dff354262e09ab710d8e2462d0f2096ca171354c9d5413d9446e598ab39a1f2332a5836d2028c926ad2b36f97f45
@@ -33,7 +33,7 @@ module Authentication
33
33
  if File.exist?(session_view_path)
34
34
  # Replace the "Forgot password?" link with the new links
35
35
  gsub_file session_view_path, /<br>\s*<%= link_to "Forgot password\?", new_password_path %>/ do |match|
36
- "<p>\n <%= link_to 'Forgot password?', new_password_path %> | \n <%= link_to 'No Account? Register here', new_registration_path %>\n</p>"
36
+ "<p>\n <%%= link_to 'Forgot password?', new_password_path %> | \n <%= link_to 'No Account? Register here', new_registration_path %>\n</p>"
37
37
  end
38
38
  else
39
39
  # If the file doesn't exist, handle it accordingly (e.g., raise an error or create the file)
@@ -47,16 +47,14 @@ module Authentication
47
47
 
48
48
  def link_to_sign_in_or_out
49
49
  if authenticated?
50
- authenticity_token = form_authenticity_token
51
- action_url = sign_out_path
52
50
  # Return the form as a string
53
- "<form class=\"button_to\" action=\"#{action_url}\" accept-charset=\"UTF-8\" method=\"post\">
51
+ "<form class=\"button_to\" action=\"\#{sign_out_path}\" accept-charset=\"UTF-8\" method=\"post\">
54
52
  <input type=\"hidden\" name=\"_method\" value=\"delete\" autocomplete=\"off\" />
55
53
  <button type=\"submit\">Sign Out</button>
56
- <input type=\"hidden\" name=\"authenticity_token\" value=\"#{authenticity_token}\" autocomplete=\"off\" />
54
+ <input type=\"hidden\" name=\"authenticity_token\" value=\"\#{form_authenticity_token}\" autocomplete=\"off\" />
57
55
  </form>".html_safe
58
56
  else
59
- "<a href=\"#{sign_in_path}\">Sign In</a>".html_safe
57
+ "<a href=\"\#{sign_in_path}\">Sign In</a>".html_safe
60
58
  end
61
59
  end
62
60
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AuthenticationGenerator
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication_with_registration_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DAZ