trestle-auth 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/trestle/auth/configuration.rb +4 -0
- data/lib/trestle/auth/controller_methods.rb +1 -1
- data/lib/trestle/auth/engine.rb +1 -1
- data/lib/trestle/auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 526a5bb317d5e7a4cc86bfc4bf3f8cc7738711b5
|
4
|
+
data.tar.gz: 7e7ac41fbac4ab25372a076d22115d60ae5047cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d992286cb24a3876ba4f60e46d3a43b95f936fdfa955479544083b5684755c3ed23a3e8d3cc296a5db81bf78b3e3b078413f2fc59b88a78721e2930968111e4
|
7
|
+
data.tar.gz: eb1877b2b963f5351b1092e82f90a0de83efa1288adbf131fbc078391cf9fcbd1038642ebb450775d33bab07278c26ef6d16beabfe2c458ad04302c185b3201a
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ Run `bundle install`, and then run the install generator to set up configuration
|
|
21
21
|
Then create an initial admin user from the rails console:
|
22
22
|
|
23
23
|
$ rails console
|
24
|
-
>
|
24
|
+
> Administrator.create(email: "admin@example.com", password: "password", first_name: "Admin", last_name: "User")
|
25
25
|
|
26
26
|
After restarting your Rails server, any attempt to access a page within your admin will redirect you to the login page.
|
27
27
|
|
@@ -14,7 +14,7 @@ module Trestle
|
|
14
14
|
def current_user
|
15
15
|
@current_user ||= begin
|
16
16
|
if session[:trestle_user]
|
17
|
-
Trestle.config.auth.
|
17
|
+
Trestle.config.auth.find_user(session[:trestle_user])
|
18
18
|
elsif Trestle.config.auth.remember.enabled && token = cookies.signed[:trestle_remember_token]
|
19
19
|
user = Trestle.config.auth.remember.authenticate(token)
|
20
20
|
login!(user) if user
|
data/lib/trestle/auth/engine.rb
CHANGED
@@ -3,7 +3,7 @@ module Trestle
|
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
config.assets.precompile << "trestle/auth.css" << "trestle/auth.js" << "trestle/auth/userbox.scss"
|
5
5
|
|
6
|
-
|
6
|
+
config.before_initialize do
|
7
7
|
Trestle::Engine.paths["app/helpers"].concat(paths["app/helpers"].existent)
|
8
8
|
end
|
9
9
|
|
data/lib/trestle/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trestle-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Pohlenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trestle
|