authenticate 0.7.0 → 0.7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 385cdcc42a02c88733f5236180cbf2f8fe9b26cd
|
4
|
+
data.tar.gz: 467b36878265dd502f6fd88fd0fe4eb8075ff2a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dbfc58d5d80c63d57ea44f2609cb5d7945db12c0122aba71b498f3a90e9dd395573389aebd8bfa12a8c048d4507307e5e0ac4470b01ac2dfb72cdcde97ea8a8
|
7
|
+
data.tar.gz: 576dedbcf695565157b8a5df868f510695e50a38a6ed0e36a68be484017fbad396a4d10428411727bcfb15c9f99b89a15b196637ae2700fb223ea1b023a89ae8
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# Authenticate Changelog
|
2
2
|
|
3
3
|
|
4
|
+
## [0.7.1] - June 22, 2017
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
- routes respects config.allow_sign_up? and shuts off /sign_up
|
8
|
+
- removed spurious output from install generator
|
9
|
+
|
10
|
+
[0.7.1]: https://github.com/tomichj/authenticate/compare/v0.7.0...v0.7.1
|
11
|
+
|
12
|
+
|
4
13
|
## [0.7.0] - May 25, 2017
|
5
14
|
|
6
15
|
### API Changes
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Please use [GitHub Issues] to report bugs. You can contact me directly on twitte
|
|
17
17
|
|
18
18
|
## Philosophy
|
19
19
|
|
20
|
-
* simple - Authenticate's code is straightforward and easy to read.
|
20
|
+
* simple - Authenticate's code is straightforward and easy to read. No middleware!
|
21
21
|
* opinionated - set the "right" defaults, but let you control almost everything if you want
|
22
22
|
* small footprint - as few public methods and modules as possible. Methods only loaded into your user model if needed.
|
23
23
|
* configuration driven - almost all configuration is performed in the initializer
|
@@ -36,7 +36,7 @@ The callback architecture is based on the system used by devise and warden, but
|
|
36
36
|
|
37
37
|
### Session Token
|
38
38
|
|
39
|
-
Authenticate generates
|
39
|
+
Authenticate generates a token (called a 'session token') to identify the user from a saved cookie.
|
40
40
|
When a user authenticates successfully, Authenticate generates and stores a 'session token' for your user in
|
41
41
|
your database. The session token is also stored in a cookie in the user's browser.
|
42
42
|
The cookie is then presented upon each subsequent access attempt to your server.
|
data/config/routes.rb
CHANGED
@@ -9,8 +9,11 @@ if Authenticate.configuration.routes_enabled?
|
|
9
9
|
resources :passwords, controller: 'authenticate/passwords', only: [:edit, :update]
|
10
10
|
end
|
11
11
|
|
12
|
-
get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
|
13
12
|
get '/sign_in', to: 'authenticate/sessions#new', as: 'sign_in'
|
14
13
|
get '/sign_out', to: 'authenticate/sessions#destroy', as: 'sign_out'
|
14
|
+
|
15
|
+
if Authenticate.configuration.allow_sign_up?
|
16
|
+
get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
|
17
|
+
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/authenticate/version.rb
CHANGED
@@ -52,7 +52,29 @@ describe DeprecatedMethodsController, type: :controller do
|
|
52
52
|
|
53
53
|
it 'warns on authenticated?' do
|
54
54
|
expect { subject.authenticated? }.to output(/deprecated/i).to_stderr
|
55
|
-
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'authenticates' do
|
58
|
+
silence do
|
59
|
+
expect(subject.authenticated?).to be_truthy
|
60
|
+
end
|
56
61
|
end
|
57
62
|
end
|
58
63
|
end
|
64
|
+
|
65
|
+
|
66
|
+
def silence
|
67
|
+
# Store the original stderr and stdout in order to restore them later
|
68
|
+
@original_stderr = $stderr
|
69
|
+
@original_stdout = $stdout
|
70
|
+
|
71
|
+
# Redirect stderr and stdout
|
72
|
+
$stderr = $stdout = StringIO.new
|
73
|
+
|
74
|
+
yield
|
75
|
+
|
76
|
+
$stderr = @original_stderr
|
77
|
+
$stdout = @original_stdout
|
78
|
+
@original_stderr = nil
|
79
|
+
@original_stdout = nil
|
80
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authenticate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Tomich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|