yaag 0.2.0 → 0.3.0
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 +4 -4
- data/README.md +15 -1
- data/lib/generators/authentication/copy/mailers_generator.rb +11 -0
- data/lib/generators/authentication/copy/models_generator.rb +13 -0
- data/lib/yaag/test/sessions_helper.rb +2 -0
- data/lib/yaag/version.rb +1 -1
- data/lib/yaag.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9574bdab53be3c4f08a3b5d53a94c13c4112250d508a285ca15a0d2d92eadecb
|
|
4
|
+
data.tar.gz: '0396903f2a8a2f9995e9cfeedb97714fc712bf91db65f0485bfa9bb81f4f6a75'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4250c7ab8385ebd4ae19737ad206f5cc7ec4fb24708f88cb50fd44d7b176ed55983028b862580710bb933995bc35366b7470b5fa3669b9a0c132befcb2ef4567
|
|
7
|
+
data.tar.gz: 4e28c123f2295fe0933b2324ce6add25cd64548570bd0e4434f9ee84fcfb1c148b198e2768b1a1092b268c77c7f211ccaf926e38864b3e2e686473b26204f440
|
data/README.md
CHANGED
|
@@ -76,9 +76,21 @@ For controllers (including concerns):
|
|
|
76
76
|
rails g authentication:copy:controllers
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
For mailers:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
rails g authentication:copy:mailers
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For models:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
rails g authentication:copy:models
|
|
89
|
+
```
|
|
90
|
+
|
|
79
91
|
### Test helper
|
|
80
92
|
|
|
81
|
-
To be able to perform tasks as an authenticated user, a helper is available to be used in tests. Add `include Yaag::Test::SessionsHelper` to access the methods `sign_in_as` and `sign_out`:
|
|
93
|
+
To be able to perform tasks as an authenticated user, a helper is available to be used in tests. Add `include Yaag::Test::SessionsHelper` to your test class to access the methods `sign_in_as` and `sign_out`:
|
|
82
94
|
|
|
83
95
|
```
|
|
84
96
|
class MyControllerTest < ActionDispatch::IntegrationTest
|
|
@@ -88,6 +100,8 @@ class MyControllerTest < ActionDispatch::IntegrationTest
|
|
|
88
100
|
end
|
|
89
101
|
```
|
|
90
102
|
|
|
103
|
+
Note: the example above requires users fixtures to exist, which are not provided by this gem.
|
|
104
|
+
|
|
91
105
|
## Release
|
|
92
106
|
|
|
93
107
|
```bash
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Authentication
|
|
2
|
+
module Copy
|
|
3
|
+
class ModelsGenerator < Rails::Generators::Base
|
|
4
|
+
source_root File.expand_path("../../../../", __dir__)
|
|
5
|
+
|
|
6
|
+
def copy_models
|
|
7
|
+
copy_file "app/models/current.rb"
|
|
8
|
+
copy_file "app/models/session.rb"
|
|
9
|
+
copy_file "app/models/user.rb"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/yaag/version.rb
CHANGED
data/lib/yaag.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yaag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nu12
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Yet Another Authentication Gem (YAAG) provides passwordless authentication
|
|
14
14
|
for your Ruby on Rails app, all it takes is the user's e-mail address.
|
|
@@ -38,6 +38,8 @@ files:
|
|
|
38
38
|
- db/migrate/20260108165215_create_sessions.rb
|
|
39
39
|
- lib/generators/authentication/USAGE
|
|
40
40
|
- lib/generators/authentication/copy/controllers_generator.rb
|
|
41
|
+
- lib/generators/authentication/copy/mailers_generator.rb
|
|
42
|
+
- lib/generators/authentication/copy/models_generator.rb
|
|
41
43
|
- lib/generators/authentication/copy/views_generator.rb
|
|
42
44
|
- lib/generators/authentication/install_generator.rb
|
|
43
45
|
- lib/generators/authentication/templates/README
|