auth1 0.6.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: ab62e55c9216be06974fa4dd54b5d003c7821a45f3ffa89718e83199579c54f0
4
- data.tar.gz: d59a75ac60f21c8771a4f2081aa69307b3b5c4158e6dd52cb42c0a260df141e3
3
+ metadata.gz: 81bf338779bcb9bdcd845b3f94694f01ca02ffcdb3a84327ea95becd922a41f4
4
+ data.tar.gz: be0da299fbaeca8eebf539f9b546e81b668076cfec79d7116e556271dadf4058
5
5
  SHA512:
6
- metadata.gz: 0bdf1f388ebe93068d18595a65d32d6bf73a9d0848b562a50f88983978985d2c345fd8145836fd66c6bda9bd104c3a80765acf075bc592c57542970ddf8586e1
7
- data.tar.gz: 2e536940f599dc60555758accd786c561f5f3f8d023877e121b9147d220b9ca544d5273da7b497000a340475a31fd48fd67ac1579be0feefbcff58d00e8d190a
6
+ metadata.gz: 764fbf8f015239583cdf2bbf60d0ace7e63350d0c117bbd39385a52e06b606aba79747a6e9f4811ed97c72cde78c966d72e76dbfa2ab28dd1a8627ec414b47a6
7
+ data.tar.gz: 2f9acae1169921cf828d7ae7a14b290dd12cf3048520ee9326df89f88fb9248c9c8f97a93469f82038b0af66a591e9d2676dbb3b7a01222ceebb394da8bfe8a6
data/README.md CHANGED
@@ -7,7 +7,7 @@ Auth1 is a [Rails Engine](https://guides.rubyonrails.org/engines.html) for [Auth
7
7
 
8
8
  #### Link Helpers
9
9
  ```ruby
10
- <% if user_signed_in? -%>
10
+ <% if logged_in? -%>
11
11
  <%= logout_link %>
12
12
  <% else -%>
13
13
  <%= login_link %>
@@ -19,7 +19,7 @@ Auth1 is a [Rails Engine](https://guides.rubyonrails.org/engines.html) for [Auth
19
19
 
20
20
  #### Button Helpers
21
21
  ```ruby
22
- <% if user_signed_in? -%>
22
+ <% if logged_in? -%>
23
23
  <%= logout_button %>
24
24
  <% else -%>
25
25
  <%= login_button %>
@@ -17,7 +17,7 @@ module Auth1
17
17
  end
18
18
 
19
19
  def login_or_logout_button(name = %w[Login Logout], options = [nil, nil], html_options = [nil, nil], &block)
20
- if user_signed_in?
20
+ if logged_in?
21
21
  logout_html_options = html_options[1] || {}
22
22
  logout_html_options[:method] = :get
23
23
  logout_button(name[1], options[1], logout_html_options, &block)
@@ -43,7 +43,7 @@ module Auth1
43
43
  end
44
44
 
45
45
  def login_or_logout_link(name = %w[Login Logout], options = [nil, nil], html_options = [nil, nil], &block)
46
- if user_signed_in?
46
+ if logged_in?
47
47
  logout_html_options = html_options[1] || {}
48
48
  logout_html_options[:method] = :get
49
49
  logout_link(name[1], options[1], logout_html_options, &block)
@@ -54,8 +54,12 @@ module Auth1
54
54
  end
55
55
  end
56
56
 
57
- def user_signed_in?
57
+ def logged_in?
58
58
  session['userinfo'].present?
59
59
  end
60
+
61
+ def logged_out?
62
+ !logged_in?
63
+ end
60
64
  end
61
65
  end
data/lib/auth1/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Auth1
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joon Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-auth0