token_auth_box 0.0.2 → 0.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f3bf0b24da90944f17bfd760bb0b0450df908d3e2663487542d3ba8c31658ea
|
4
|
+
data.tar.gz: 54cb43b420af89ebd46f0c94760fdebd3375e1d2cc45e094776387bc8991075f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdcbb3000cfb4958fffb27376312d4e8bd4341941049c9946e713e9e6ca3827c65f67bafbec27c3c2481bba62559ea0cd5edb86bea3086d52349007343a05a61
|
7
|
+
data.tar.gz: fc5617506e15104ea0b8298a1250428787ee51f32a238403d2a8321b20d4d79ba6de8bdad0270684c1fce7b066254597495fbfd6572c3cba81150b50b6d92f7c
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class AuthInitGenerator < Rails::Generators::Base
|
2
|
+
source_root File.expand_path('templates', __dir__)
|
3
|
+
def init
|
4
|
+
inject_into_file 'app/controllers/application_controller.rb', after: /class ApplicationController < ActionController(.+)\n/ do <<-'RUBY'
|
5
|
+
include Authbox::Middleware
|
6
|
+
before_action :ensure_signed_in
|
7
|
+
RUBY
|
8
|
+
end
|
9
|
+
|
10
|
+
inject_into_file 'config/routes.rb', after: '.routes.draw do\n' do <<-'RUBY'
|
11
|
+
mount TokenAuthBox::Engine => '/auth'
|
12
|
+
RUBY
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: token_auth_box
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- drake
|
@@ -54,6 +54,8 @@ files:
|
|
54
54
|
- app/mailers/token_auth_box/application_mailer.rb
|
55
55
|
- app/models/token_auth_box/application_record.rb
|
56
56
|
- config/routes.rb
|
57
|
+
- lib/generators/auth_init/USAGE
|
58
|
+
- lib/generators/auth_init/auth_init_generator.rb
|
57
59
|
- lib/tasks/token_auth_box_tasks.rake
|
58
60
|
- lib/token_auth_box.rb
|
59
61
|
- lib/token_auth_box/engine.rb
|