jj-middleware 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/jj-middleware.gemspec +1 -1
- data/lib/jj/middleware/onboarding.rb +4 -5
- data/lib/jj/middleware.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ddac0f6c59a12d3d877ef45218ffbed2cbef94d
|
4
|
+
data.tar.gz: 7183a18286a9c1a71a5ab68394e922668f2a3240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56085af19906726369333841eeef7f281db07c819efbd1bb602d1076a8f58310151314c930302c619ba8bfe45d6a77f7d5b05c66f967ca5c1a8a4412f0c34b41
|
7
|
+
data.tar.gz: b0836c282e3102fe087ec1968d37584627384bdd51396559fb24b4fd2f40a1b8386db9b3cb7bff06b2566e0670f5b40a1bfd0635c1fad51a14a37d32dcb29bda
|
data/jj-middleware.gemspec
CHANGED
@@ -12,8 +12,8 @@ module JJ
|
|
12
12
|
def call(env)
|
13
13
|
sess = Session.new(env)
|
14
14
|
user = sess.fetch("user")
|
15
|
-
|
16
|
-
unless user_exist?(user
|
15
|
+
|
16
|
+
unless user_exist?(user)
|
17
17
|
log.info("[JJ::Onboarding] User record not yet created.")
|
18
18
|
record = create_user!(user.id)
|
19
19
|
sess.set_model(record)
|
@@ -35,9 +35,8 @@ module JJ
|
|
35
35
|
Wes::Data::API::CreatorUser.create(:auth0_id => user_id)
|
36
36
|
end
|
37
37
|
|
38
|
-
def user_exist?(
|
39
|
-
user
|
40
|
-
user && (user.auth0_id == user_id)
|
38
|
+
def user_exist?(user)
|
39
|
+
user && user.respond_to?("model") && (user.model.auth0_id == user.id)
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|
data/lib/jj/middleware.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jj-middleware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '6'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '6'
|
97
97
|
description:
|
98
98
|
email:
|
99
99
|
- ''
|