admin_auth 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.travis.yml +1 -0
- data/README.md +2 -2
- data/app/views/admin/admins/edit.haml +1 -1
- data/app/views/admin/admins/index.haml +5 -11
- data/app/views/admin/admins/new.haml +1 -1
- data/app/views/admin/sessions/new.haml +1 -1
- data/lib/admin_auth/version.rb +1 -1
- data/spec/lib/admin_auth/engine_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDhlMmEwODNjOWIwNzMyZmQ4MDkwNDM4ZDQ2NTJiODAxMGY1MjE1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWQwZmNmM2ZlYmFkZDQxOWYzY2FmZjM4MzJhNTgwNmY4YzA1ZDYwNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2NjYzAxMGZlNjE5YmZiNjJhNDg3MWI2ZjAwMWM3MTdjMjczMDI2MDJhMTJh
|
10
|
+
NWZjZjg3YzZhNDI5NDBmZjc2MGE0ZWQ2NzA0OWVmMjNkNzhhMTcyYWE4OGVj
|
11
|
+
NDk1ZDVhZjZlNTQ0YTQ2NTQ2MzY2NDVlMjE5MTk3MjMxZjEyNGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjA3ZGRiYmFjYjhiZDg0ZmUwMzE3YzlmNDgyNjFmMThkZTE3MWY1YWYyMzJj
|
14
|
+
MWEyZTQxMzgxZjNjZGM3ZTFjYTExNTI4Y2Q4Njk2YmZkODZmM2Q3YzE5OWVh
|
15
|
+
MTIxOWNjMDM4NTFiMDZkYzBhZGE0MDM2NDQwODJlNThmYTQ2ZTM=
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,7 @@ To use this gem you need to do few things:
|
|
30
30
|
- email (string)
|
31
31
|
- encrypted_password (string)
|
32
32
|
2. Add the line `admin_auth_routes` to your `routes.rb` file.
|
33
|
-
3. Now if you add `before_action authenticate_admin!` to any controller it will send the user to the admin login page.
|
33
|
+
3. Now if you add `before_action :authenticate_admin!` to any controller it will send the user to the admin login page.
|
34
34
|
4. To create an admin you will need to do it in the rails console: `Admin.create(email: 'email@email.com', password: 'password', password_confirmation: 'password')`
|
35
35
|
5. Optionally, add an `after_login_path(locale = nil)` method to your `ApplicationController` that returns the path you want to redirect to when logged in.
|
36
36
|
6. Optionally, add an `after_logout_path(locale = nil)` method to your `ApplicationController` that returns the path you want to redirect to after logout.
|
@@ -38,7 +38,7 @@ To use this gem you need to do few things:
|
|
38
38
|
|
39
39
|
## Contributing
|
40
40
|
|
41
|
-
1. Fork it ( https://github.com/
|
41
|
+
1. Fork it ( https://github.com/pboksz/admin_auth/fork )
|
42
42
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
43
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -1,17 +1,11 @@
|
|
1
|
-
.admin-auth.index
|
1
|
+
.admin-auth.index{ style: 'text-align: center' }
|
2
2
|
%h2= 'Admins'
|
3
3
|
.section.actions
|
4
4
|
= link_to 'Add an Admin', new_admin_admin_path(locale), class: 'button'
|
5
5
|
= link_to 'Change your password', edit_admin_admin_path(locale, current_admin), class: 'button'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
%td= 'Actions'
|
12
|
-
%tbody
|
13
|
-
- admins.each do |admin|
|
14
|
-
%tr
|
15
|
-
%td= admin.email
|
16
|
-
%td.action= link_to 'Delete', admin_admin_path(locale, admin), method: :delete,
|
7
|
+
- admins.each do |admin|
|
8
|
+
.admin
|
9
|
+
.section= admin.email
|
10
|
+
.section.actions= link_to 'Delete', admin_admin_path(locale, admin), method: :delete,
|
17
11
|
data: { confirm: 'Are you sure?' }, class: 'button'
|
data/lib/admin_auth/version.rb
CHANGED
@@ -10,7 +10,7 @@ describe AdminAuth::Engine do
|
|
10
10
|
it { expect(subject.config.autoload_paths).to include "#{root_path}/sessions_controller.rb" }
|
11
11
|
end
|
12
12
|
|
13
|
-
describe 'autoload
|
13
|
+
describe 'autoload views' do
|
14
14
|
let(:root_path) { "#{subject.config.root}/app/views/admin" }
|
15
15
|
|
16
16
|
it { expect(subject.config.autoload_paths).to include "#{root_path}/admins/edit.haml" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: admin_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phillip Boksz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|