entrance 0.6.3 → 0.6.4
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 +5 -5
- data/examples/sinatra-app/Gemfile +1 -0
- data/examples/sinatra-app/app/models.rb +1 -0
- data/lib/entrance/addons/sinatra.rb +10 -4
- data/lib/entrance/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6b8399358827a7e8261d1b04ca1205b51bd8c28f5c0ab787114a1c51b4d555ff
|
|
4
|
+
data.tar.gz: 693666a5d3b403c65a3062a57b124d277f8522f081e535ae82783fa0fddc262e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b74454261f93e4b083ed1b512bfa3ced8c46b2fe4c12900e106d689567ea2be0e9cf83261a0a534054a814ab5bcbc72154824c93572e07f363b93b099e89917
|
|
7
|
+
data.tar.gz: 79dbbd943a1ebe55571d1ced3b3a1540b378c683b0c84b0a84304b3def8e25f3f6f8f1f37c4016bf692df3d4296d17fb3f067931294237c837f8557bfc0dec86
|
|
@@ -10,7 +10,7 @@ be present in a views/public directory.
|
|
|
10
10
|
Once a user logs in, he or she will be redirected to /.
|
|
11
11
|
|
|
12
12
|
require 'sinatra/base'
|
|
13
|
-
require 'entrance/sinatra'
|
|
13
|
+
require 'entrance/addons/sinatra'
|
|
14
14
|
|
|
15
15
|
class Hello < Sinatra::Base
|
|
16
16
|
register Entrance::Sinatra
|
|
@@ -34,7 +34,7 @@ module Entrance
|
|
|
34
34
|
if logged_in?
|
|
35
35
|
redirect(to('/'))
|
|
36
36
|
else
|
|
37
|
-
|
|
37
|
+
render_form('login')
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -58,7 +58,7 @@ module Entrance
|
|
|
58
58
|
app.get '/signup' do
|
|
59
59
|
return redirect(to('/')) if logged_in?
|
|
60
60
|
@user = ::Entrance.model.new
|
|
61
|
-
|
|
61
|
+
render_form('signup')
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
app.post '/signup' do
|
|
@@ -67,10 +67,16 @@ module Entrance
|
|
|
67
67
|
redirect_with('/login', :success, "Account created! Please sign in to continue.")
|
|
68
68
|
else
|
|
69
69
|
flash[:error] = "Couldn't sign you up. Please try again."
|
|
70
|
-
|
|
70
|
+
render_form('signup')
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
+
private
|
|
75
|
+
|
|
76
|
+
def render_form(name)
|
|
77
|
+
erb :'public/' + name
|
|
78
|
+
end
|
|
79
|
+
|
|
74
80
|
end
|
|
75
81
|
|
|
76
82
|
end
|
data/lib/entrance/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: entrance
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tomás Pollak
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bcrypt
|
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
146
146
|
version: 1.3.6
|
|
147
147
|
requirements: []
|
|
148
148
|
rubyforge_project: entrance
|
|
149
|
-
rubygems_version: 2.
|
|
149
|
+
rubygems_version: 2.7.3
|
|
150
150
|
signing_key:
|
|
151
151
|
specification_version: 4
|
|
152
152
|
summary: Lean authentication alternative for Rails and Sinatra.
|