jj-middleware 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0c8817a2816a94bcd4485e8eb2567487861ce42
4
- data.tar.gz: 653ff3a437c77d6d042972f3759cea3f8cd3ab61
3
+ metadata.gz: 38fb290ecb6f605486f23e35ddc6fa3cdd3e6530
4
+ data.tar.gz: fde74d97db7ac62ad15040f9db749fa1f60e0b1c
5
5
  SHA512:
6
- metadata.gz: b1ee907a2e37923a147804fae15a720628bd38bbb7c8a9f95ed8ed5b76b4add1d8b112b33c272a6c99b1b01c7291ccb812254c4e343556b2a37da8b68d074e6a
7
- data.tar.gz: 873935f4e6e40a7efb442f861bc9e7ed4c39ddccd015367224a2083d52bc3012fe14cf6f66a7aea4b5d72fe95076b15dd4f9752029fd769be04ddce4d228fe03
6
+ metadata.gz: ef8a942992cfd666fe9a2cef527c0cc708f337c793d4405db2a2dbb9bdbb11e2a3ee6a2da609d84887086636dfd072315b8676a2406ef99cd0184d5bd07a9416
7
+ data.tar.gz: 2958b78c8324a2fdc9f7ede80cfb0be618ef86368afcc6e0e8efe6229d9429db11b2632c91b65a670778ca49ab6f650a86c7f94d8d080a2aba683b32cc1e9a91
data/lib/jj/middleware.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module JJ
2
2
  module Middleware
3
- VERSION = "0.2.0".freeze
3
+ VERSION = "0.3.0".freeze
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ module JJ
18
18
  def logged_in?(sess)
19
19
  return false unless sess.exist?
20
20
  user = sess.fetch("user")
21
- user && user.id && user.email && user.data_api
21
+ user && user.id && user.email && user.model
22
22
  end
23
23
  end
24
24
  end
@@ -21,8 +21,7 @@ module JJ
21
21
  return redirect("/onboarding")
22
22
  end
23
23
 
24
- complete = sess.data_api["onboarding_complete"]
25
- return redirect("/onboarding") unless complete
24
+ return redirect("/onboarding") unless sess.model.onboarded
26
25
 
27
26
  @app.call(env)
28
27
  end
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-18 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler