rails_jwt_admin 0.1.0 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -5
- data/app/models/rails_jwt_admin/user.rb +2 -0
- data/lib/generators/rails_jwt_admin/install_generator.rb +18 -0
- data/lib/rails_jwt_admin/engine.rb +0 -1
- data/lib/rails_jwt_admin/version.rb +1 -1
- data/lib/rails_jwt_admin.rb +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cea14329748e5f97b29a967644804f20bd8e0f4f60f7b963bc7a3c74f54abaae
|
4
|
+
data.tar.gz: 825d36984443e9279231464d349b51235c4bc2c7c6b50aa2182450a049d0dfc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 952e84d9bfbdf0a7def0d1fbaf6ddcf9cf57a21e1e96cdb971bcedf49140f22a6fa5f3bc9e9b79290e1318f560ad60618b396a1ef941c7c4094963b27a6461d5
|
7
|
+
data.tar.gz: 4f3cdfccb963bf566902c9f56e8b6d085b2e646ed429eed09c13c1a9ed10462fd7b9cb691cf10e80f706cc9abe394146096c2164825c62ae951e16a88b6da7d6
|
data/README.md
CHANGED
@@ -3,11 +3,24 @@
|
|
3
3
|
|
4
4
|
## installation
|
5
5
|
```shell
|
6
|
-
#
|
7
|
-
gem install 'rails_jwt_admin'
|
8
|
-
|
9
|
-
# rails - bundle install
|
6
|
+
# 1. add gen & bundle install
|
10
7
|
gem 'rails_jwt_admin'
|
8
|
+
|
9
|
+
# 2. install admin
|
10
|
+
rails g rails_jwt_admin:install
|
11
|
+
|
12
|
+
# 3. check table & rake db:migrate
|
13
|
+
rake db:migrate
|
14
|
+
```
|
15
|
+
|
16
|
+
## seed
|
17
|
+
```rb
|
18
|
+
RailsJwtAdmin::User.create(
|
19
|
+
username: "admin",
|
20
|
+
email: "example@qq.com",
|
21
|
+
password: "123123",
|
22
|
+
password_confirmation: "123123"
|
23
|
+
)
|
11
24
|
```
|
12
25
|
|
13
26
|
## resources
|
@@ -16,4 +29,5 @@ gem 'rails_jwt_admin'
|
|
16
29
|
- https://www.jianshu.com/p/56467f890516
|
17
30
|
- https://www.pluralsight.com/guides/token-based-authentication-with-ruby-on-rails-5-api
|
18
31
|
- https://github.com/jwt/ruby-jwt
|
19
|
-
- https://github.com/afeiship/rails-module-jwt
|
32
|
+
- https://github.com/afeiship/rails-module-jwt
|
33
|
+
- https://github.com/afeiship/rails_admin_users
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RailsJwtAdmin
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
desc "Configure necessary files to use RailsJwtAdmin"
|
4
|
+
|
5
|
+
def generate_model
|
6
|
+
rake "rails_jwt_admin:install:migrations"
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_routes
|
10
|
+
route 'mount RailsJwtAdmin::Engine => "/rails_jwt_admin"'
|
11
|
+
end
|
12
|
+
|
13
|
+
def add_gems
|
14
|
+
gem "jwt"
|
15
|
+
gem "bcrypt"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/rails_jwt_admin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_jwt_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- afeiship
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
-
description:
|
47
|
+
description:
|
48
48
|
email:
|
49
49
|
- 1290657123@qq.com
|
50
50
|
executables: []
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- app/models/rails_jwt_admin/user.rb
|
62
62
|
- config/routes.rb
|
63
63
|
- db/migrate/20201202013006_create_rails_jwt_admin_users.rb
|
64
|
+
- lib/generators/rails_jwt_admin/install_generator.rb
|
64
65
|
- lib/rails_jwt_admin.rb
|
65
66
|
- lib/rails_jwt_admin/engine.rb
|
66
67
|
- lib/rails_jwt_admin/version.rb
|
@@ -70,7 +71,7 @@ homepage: https://github.com/afeiship/rails_jwt_admin
|
|
70
71
|
licenses:
|
71
72
|
- MIT
|
72
73
|
metadata: {}
|
73
|
-
post_install_message:
|
74
|
+
post_install_message:
|
74
75
|
rdoc_options: []
|
75
76
|
require_paths:
|
76
77
|
- lib
|
@@ -86,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
87
|
version: '0'
|
87
88
|
requirements: []
|
88
89
|
rubygems_version: 3.0.3
|
89
|
-
signing_key:
|
90
|
+
signing_key:
|
90
91
|
specification_version: 4
|
91
92
|
summary: Summary of RailsJwtAdmin.
|
92
93
|
test_files: []
|