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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzcwYmZlNTJmZjU4MmQ5OGY4YTI5ZTk0NjVhYzFkMjNhOGQ2NGFiZg==
4
+ M2NhNWFmMWI2ZjZmYjkxYTQzN2Q1ZTU5ZTYzNThkZDJkMjZhYzMzMw==
5
5
  data.tar.gz: !binary |-
6
- OGE1OTdkZWVkMTRjMzQ1MGFiOTBjYmM0N2NhOWRlNjI1OTRiOTUxYg==
6
+ MTc4NDA3MGQ5Nzk5MzdjZmYyYzRjZGVlNzA5YThjNjIzYjg1OWI2Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTk2ZmYyMDdiMjg5YzU0NTc4NzA1N2VhNTcxZjZhNGFlOTJiYzQyM2I1ZWNl
10
- N2VhNjE2N2IyMWQzZjIxMzFhNzI3M2JkMDgwYzVlNTBmNTBhMDRmNjBiMzgw
11
- NzhlNTNiNGMzMzMxZTBlOTYxMDljYzNmYmMxMGM5NDMzNjc0NmE=
9
+ ZjU0MjQ2ZDZmNjJmYzhlOTk4ZjU4OWY4MTBlOWMwZjE2YjBhMWEwOGU2NDkz
10
+ OTJiODRiMjhkMjc3YzM2NGYyMWZmNWViYTcwNTdiZGQ0MDI5NzBiNWRkNThm
11
+ NWNhMDExOTQwODhiNTU3NjIyNzE3ODFmNThiODY0OTdjZjAzNGY=
12
12
  data.tar.gz: !binary |-
13
- ZjVkODExYjBmNTU0YWQzMWI3YWRhOWUwYjY4NTllNDQ2YjZiNjdiNTdhOWNl
14
- ZjUwMDEyNWI5OGNhMjg5N2I0ZTM0MDRhYWYxNzc2NDA4ZDVjMGJkMjc2NmY4
15
- NWQ1ZWQ4YzQxMmQ2ZjUyZDBkNzE4ZmJjNGNkOTI0YTgzN2RlOTk=
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 = ">= 1.9"
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
@@ -0,0 +1,5 @@
1
+ module AdminAuth
2
+ class Engine < ::Rails::Engine
3
+ config.autoload_paths += Dir["#{config.root}/app/**/*.rb"]
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ module AdminAuth
2
+ class Railtie < ::Rails::Railtie
3
+ initializer :admin_auth do
4
+ ::Admin.include(AdminAuth::Model)
5
+ ::ApplicationController.include(AdminAuth::Controller)
6
+ end
7
+ end
8
+ end
@@ -3,7 +3,7 @@ module AdminAuth
3
3
  attr_reader :klass
4
4
 
5
5
  def initialize
6
- @klass = Admin
6
+ @klass = ::Admin
7
7
  end
8
8
 
9
9
  def all
@@ -1,3 +1,3 @@
1
1
  module AdminAuth
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
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.0
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: '1.9'
159
+ version: '2.0'
158
160
  required_rubygems_version: !ruby/object:Gem::Requirement
159
161
  requirements:
160
162
  - - ! '>='