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: 65ba41129e98e9a9c82883b65320a5ed5aa98f98767e61b1106fd103bde72b1e
4
- data.tar.gz: dfd16b2ad46aae979c9486700e36995e712b7ccb219e413f5add3c1845690679
3
+ metadata.gz: 2f3bf0b24da90944f17bfd760bb0b0450df908d3e2663487542d3ba8c31658ea
4
+ data.tar.gz: 54cb43b420af89ebd46f0c94760fdebd3375e1d2cc45e094776387bc8991075f
5
5
  SHA512:
6
- metadata.gz: a125b186f0b9c46212a98cce23c6e7d857b9c310524f19a4c1dc6b13792944eb037c6a31cf3952d2b0ff423c27a5eecea4a7a6bed270817f4bd09ee02fe4fbe3
7
- data.tar.gz: a5961bd3eaa9e11597e120ce128916374b5a75dd513431a331fce80b84b86af247f712ac5d108a6e5a3b1124c150e3e63175c46c2eaa7e5c49e333bb58063e42
6
+ metadata.gz: fdcbb3000cfb4958fffb27376312d4e8bd4341941049c9946e713e9e6ca3827c65f67bafbec27c3c2481bba62559ea0cd5edb86bea3086d52349007343a05a61
7
+ data.tar.gz: fc5617506e15104ea0b8298a1250428787ee51f32a238403d2a8321b20d4d79ba6de8bdad0270684c1fce7b066254597495fbfd6572c3cba81150b50b6d92f7c
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate auth_init Thing
6
+
7
+ This will create:
8
+ what/will/it/create
@@ -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
@@ -1,3 +1,3 @@
1
1
  module TokenAuthBox
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.4'
3
3
  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.2
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