admin_auth 0.3.0 → 0.3.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
- OTIwYzFhNGMzZDBjYmU3ZjU5Y2M5MGMwNTJiNTgxOWUyOGQxMmVlNw==
4
+ MDhlMmEwODNjOWIwNzMyZmQ4MDkwNDM4ZDQ2NTJiODAxMGY1MjE1OQ==
5
5
  data.tar.gz: !binary |-
6
- MjZjYzI1ZGRkOGM1YTJhZDBiMTQ3YWU0MmNkNzQ5MzVmM2UxYjIxNA==
6
+ YWQwZmNmM2ZlYmFkZDQxOWYzY2FmZjM4MzJhNTgwNmY4YzA1ZDYwNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTM2OTdlZTgwODA2Y2E2MDVmZWUwMjI2ZTIxZTMyYmE2ZTM1NDhjZmE2YjI1
10
- NjBlNDk3OGI3ZGZjNjZhMzczNDUwMmQyNDQzY2Y5YzRhMDI4NzJjNzkyNzVk
11
- M2NkZDUzMjA0MzVkOWVlNDUxZmIyYzQ0ZWQ3MTVmYzFhNmY5OGY=
9
+ Y2NjYzAxMGZlNjE5YmZiNjJhNDg3MWI2ZjAwMWM3MTdjMjczMDI2MDJhMTJh
10
+ NWZjZjg3YzZhNDI5NDBmZjc2MGE0ZWQ2NzA0OWVmMjNkNzhhMTcyYWE4OGVj
11
+ NDk1ZDVhZjZlNTQ0YTQ2NTQ2MzY2NDVlMjE5MTk3MjMxZjEyNGY=
12
12
  data.tar.gz: !binary |-
13
- OThkZDFlZGY3MzJmZjZhNWM3ZGI1NWQ4Nzk3MmEyYjdkY2U3MGY1MTRkOTFh
14
- Y2IyNTJlMDFhMmMzYWNiNGFlMDEzZWYwZmEyMTdlYmY5MjI5MmNjM2RkMGI4
15
- MTQ0YjNkYzkxMTFmY2E1MzdjMDRjMGY4YzE3NjhkZmUzZWY5Y2M=
13
+ NjA3ZGRiYmFjYjhiZDg0ZmUwMzE3YzlmNDgyNjFmMThkZTE3MWY1YWYyMzJj
14
+ MWEyZTQxMzgxZjNjZGM3ZTFjYTExNTI4Y2Q4Njk2YmZkODZmM2Q3YzE5OWVh
15
+ MTIxOWNjMDM4NTFiMDZkYzBhZGE0MDM2NDQwODJlNThmYTQ2ZTM=
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - 2.0
4
5
  - 2.1
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/[my-github-username]/admin_auth/fork )
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,4 +1,4 @@
1
- .admin-auth.edit
1
+ .admin-auth.edit{ style: 'text-align: center' }
2
2
  %h2= 'Edit admin'
3
3
  = form_for admin, url: admin_admin_path(locale, admin), method: :put do |f|
4
4
  .section= f.password_field :password, placeholder: '********'
@@ -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
- %table
8
- %thead
9
- %tr
10
- %td= 'Email'
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'
@@ -1,4 +1,4 @@
1
- .admin-auth.new
1
+ .admin-auth.new{ style: 'text-align: center' }
2
2
  %h2= 'New admin'
3
3
  = form_for admin, url: admin_admins_path(locale), method: :post do |f|
4
4
  .section= f.text_field :email, placeholder: 'email@email.com'
@@ -1,4 +1,4 @@
1
- .admin-auth.login
1
+ .admin-auth.login{ style: 'text-align: center' }
2
2
  %h2= 'Admin login'
3
3
  = form_for admin, url: admin_login_path(locale), method: :post do |f|
4
4
  .section= f.text_field :email, autofocus: true, placeholder: 'email@email.com'
@@ -1,3 +1,3 @@
1
1
  module AdminAuth
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -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 controllers' do
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.0
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: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt