admin_auth 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/admin_auth.gemspec +1 -1
- data/app/views/admin/admins/index.haml +0 -4
- data/lib/admin_auth.rb +11 -14
- data/lib/admin_auth/engine.rb +5 -0
- data/lib/admin_auth/railtie.rb +8 -0
- data/lib/admin_auth/repository.rb +1 -1
- data/lib/admin_auth/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2NhNWFmMWI2ZjZmYjkxYTQzN2Q1ZTU5ZTYzNThkZDJkMjZhYzMzMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTc4NDA3MGQ5Nzk5MzdjZmYyYzRjZGVlNzA5YThjNjIzYjg1OWI2Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjU0MjQ2ZDZmNjJmYzhlOTk4ZjU4OWY4MTBlOWMwZjE2YjBhMWEwOGU2NDkz
|
10
|
+
OTJiODRiMjhkMjc3YzM2NGYyMWZmNWViYTcwNTdiZGQ0MDI5NzBiNWRkNThm
|
11
|
+
NWNhMDExOTQwODhiNTU3NjIyNzE3ODFmNThiODY0OTdjZjAzNGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWE2N2ZkMmJkZjk4NzI3ZDY5MjQ1MDJhYWJjMzJhY2I3Zjg1MzFjZTk2NDQ4
|
14
|
+
OWE5Y2QzMzEwNWY3MmYzMTFhZmRlZGE1ZjBlNDA2NmVkMGIzZjAwNTBiMGJj
|
15
|
+
NDQyZDY1ZmFmMmQzMDZiMmQ5MjE5NjI1NTQ3M2I4OGJkMmQ4MzM=
|
data/admin_auth.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
spec.required_ruby_version = ">=
|
20
|
+
spec.required_ruby_version = ">= 2.0"
|
21
21
|
|
22
22
|
spec.add_dependency "bcrypt", "~> 3"
|
23
23
|
spec.add_dependency "haml", "~> 4"
|
@@ -8,14 +8,10 @@
|
|
8
8
|
%thead
|
9
9
|
%tr
|
10
10
|
%td= 'Email'
|
11
|
-
%td= 'Sign in count'
|
12
|
-
%td= 'Last signed in at'
|
13
11
|
%td= 'Actions'
|
14
12
|
%tbody
|
15
13
|
- admins.each do |admin|
|
16
14
|
%tr
|
17
15
|
%td= admin.email
|
18
|
-
%td= admin.sign_in_count
|
19
|
-
%td= admin.last_sign_in_at
|
20
16
|
%td.action= link_to 'Delete', admin_admin_path(locale, admin), method: :delete,
|
21
17
|
data: { confirm: 'Are you sure?' }, class: 'button'
|
data/lib/admin_auth.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
|
-
require 'admin_auth/controller'
|
2
|
-
require 'admin_auth/encryptor'
|
3
|
-
require 'admin_auth/model'
|
4
|
-
require 'admin_auth/repository'
|
5
|
-
require 'admin_auth/routes'
|
6
1
|
require 'admin_auth/version'
|
7
2
|
|
3
|
+
if defined?(Rails)
|
4
|
+
require 'admin_auth/controller'
|
5
|
+
require 'admin_auth/encryptor'
|
6
|
+
require 'admin_auth/model'
|
7
|
+
require 'admin_auth/repository'
|
8
|
+
require 'admin_auth/routes'
|
9
|
+
|
10
|
+
require 'admin_auth/engine'
|
11
|
+
require 'admin_auth/railtie'
|
12
|
+
end
|
13
|
+
|
8
14
|
module AdminAuth
|
9
|
-
class Engine < ::Rails::Engine
|
10
|
-
config.autoload_paths += Dir["#{config.root}/app/**/*.rb"]
|
11
|
-
end
|
12
15
|
|
13
|
-
class Railtie < ::Rails::Railtie
|
14
|
-
initializer :admin_auth do
|
15
|
-
Admin.include(AdminAuth::Model)
|
16
|
-
ApplicationController.include(AdminAuth::Controller)
|
17
|
-
end
|
18
|
-
end
|
19
16
|
end
|
data/lib/admin_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: admin_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phillip Boksz
|
@@ -132,7 +132,9 @@ files:
|
|
132
132
|
- lib/admin_auth.rb
|
133
133
|
- lib/admin_auth/controller.rb
|
134
134
|
- lib/admin_auth/encryptor.rb
|
135
|
+
- lib/admin_auth/engine.rb
|
135
136
|
- lib/admin_auth/model.rb
|
137
|
+
- lib/admin_auth/railtie.rb
|
136
138
|
- lib/admin_auth/repository.rb
|
137
139
|
- lib/admin_auth/routes.rb
|
138
140
|
- lib/admin_auth/version.rb
|
@@ -154,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
156
|
requirements:
|
155
157
|
- - ! '>='
|
156
158
|
- !ruby/object:Gem::Version
|
157
|
-
version: '
|
159
|
+
version: '2.0'
|
158
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
161
|
requirements:
|
160
162
|
- - ! '>='
|