slim-rails 3.6.3 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/slim/authentication/authentication_generator.rb +21 -0
- data/lib/generators/slim/authentication/templates/passwords/edit.html.slim +10 -0
- data/lib/generators/slim/authentication/templates/passwords/new.html.slim +8 -0
- data/lib/generators/slim/authentication/templates/sessions/new.html.slim +12 -0
- data/lib/slim-rails/version.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5cc57cd0be673d5ceb521c08dd5b3877e73f79842dd4766341f35872287fe1d
|
4
|
+
data.tar.gz: 54e93a2b7a14023c34eb815b753bbd1a29454fbc0402186d70bc09fe82a06abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c848a2695899792ba05f695a519bf8454c8c6129a8c0a2fb2889526e8f0a16d5dc39578dc5123f2b2bc64f3a1e785073637ceff124759db9815d8c7cf19e76b
|
7
|
+
data.tar.gz: 41f330acf34c5d0493fbea601e44539f6fc99a4a5ac5bc4818da49ff4a3fb109eed0d5398ca59859a6fdce16e88bffe7aefcc9331997b1c5c61d5b7750539f26
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "rails/generators/erb/authentication/authentication_generator"
|
2
|
+
|
3
|
+
module Slim
|
4
|
+
module Generators
|
5
|
+
class AuthenticationGenerator < Erb::Generators::AuthenticationGenerator
|
6
|
+
source_root File.expand_path(File.join("..", "templates"), __FILE__)
|
7
|
+
|
8
|
+
def create_files
|
9
|
+
template "sessions/new.html.slim", "app/views/sessions/new.html.slim"
|
10
|
+
template "passwords/new.html.slim", "app/views/passwords/new.html.slim"
|
11
|
+
template "passwords/edit.html.slim", "app/views/passwords/edit.html.slim"
|
12
|
+
end
|
13
|
+
|
14
|
+
protected
|
15
|
+
|
16
|
+
def handler
|
17
|
+
:slim
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
h1 Update your password
|
2
|
+
|
3
|
+
= tag.div(flash[:alert], style: "color:red") if flash[:alert]
|
4
|
+
|
5
|
+
= form_with url: password_path(params[:token]), method: :put do |form|
|
6
|
+
= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72
|
7
|
+
br
|
8
|
+
= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72
|
9
|
+
br
|
10
|
+
= form.submit "Save"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
h1 Forgot your password?
|
2
|
+
|
3
|
+
= tag.div(flash[:alert], style: "color:red") if flash[:alert]
|
4
|
+
|
5
|
+
= form_with url: passwords_path do |form|
|
6
|
+
= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address]
|
7
|
+
br
|
8
|
+
= form.submit "Email reset instructions"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= tag.div(flash[:alert], style: "color:red") if flash[:alert]
|
2
|
+
= tag.div(flash[:notice], style: "color:green") if flash[:notice]
|
3
|
+
|
4
|
+
= form_with url: session_path do |form|
|
5
|
+
= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address]
|
6
|
+
br
|
7
|
+
= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72
|
8
|
+
br
|
9
|
+
= form.submit "Sign in"
|
10
|
+
br
|
11
|
+
|
12
|
+
= link_to "Forgot password?", new_password_path
|
data/lib/slim-rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Almeida
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -83,14 +83,14 @@ dependencies:
|
|
83
83
|
name: slim_lint
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 0.24.0
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - "
|
93
|
+
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: 0.24.0
|
96
96
|
- !ruby/object:Gem::Dependency
|
@@ -188,6 +188,10 @@ files:
|
|
188
188
|
- CHANGELOG.md
|
189
189
|
- LICENSE
|
190
190
|
- README.md
|
191
|
+
- lib/generators/slim/authentication/authentication_generator.rb
|
192
|
+
- lib/generators/slim/authentication/templates/passwords/edit.html.slim
|
193
|
+
- lib/generators/slim/authentication/templates/passwords/new.html.slim
|
194
|
+
- lib/generators/slim/authentication/templates/sessions/new.html.slim
|
191
195
|
- lib/generators/slim/controller/controller_generator.rb
|
192
196
|
- lib/generators/slim/controller/templates/view.html.slim
|
193
197
|
- lib/generators/slim/mailer/mailer_generator.rb
|
@@ -229,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
233
|
- !ruby/object:Gem::Version
|
230
234
|
version: '0'
|
231
235
|
requirements: []
|
232
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.5.23
|
233
237
|
signing_key:
|
234
238
|
specification_version: 4
|
235
239
|
summary: Slim templates generator for Rails
|