ditty 0.7.0.pre.rc1 → 0.7.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
  SHA256:
3
- metadata.gz: 3c189c1afda14a46a7d4011c7d2ea9a675c3efaf8800287379e66b2d0a8f7938
4
- data.tar.gz: 788dfa56d302d52afca0ff0d42bd1769abb78b5e991c586edf4a6b6a38430384
3
+ metadata.gz: 16ed8ef74d24cd5afd39d1cf3b5fc396d317809f56b4968b51433193202a9716
4
+ data.tar.gz: a8a21a36396f59a455613c21541974a26b4eaf0fbadc21bb3899ff720bf9c356
5
5
  SHA512:
6
- metadata.gz: fddf3ffc9c33965ecc3e093c0fc21f4ce689eb110ab351f1a331cd7a9477bea416e3d6bbdc6141e9858d55db4d5cf48ad15c1e22bb930462fd245b0853cde042
7
- data.tar.gz: 2bb572a73c374592ee7c526a7fb0df708bf43ed533ca4898dddd347f2b06afba687662dc234b0e1566856161b8d44de656eca567cdd0da2d0b17925afc01346b
6
+ metadata.gz: ef3c10b9867a2c2077ecf2cea14462ec32d811db7d83625fdba64aac5b8016da2e8276f0b14cb52d1f5ebe74e5b0a10191e28542c088d498da3538ad3581baab
7
+ data.tar.gz: 1d87b3e5aaa54320259e0031215a6cdd4d41b5ebbf9eef8d349fdd3c2cbb75d42da529b65a9f36aee3aa50aaf8f60379b435d14abfae4cd0621a525aa80c4926
@@ -9,12 +9,13 @@ module Ditty
9
9
  module Authentication
10
10
  def current_user
11
11
  return anonymous_user if current_user_id.nil?
12
- User[current_user_id]
12
+ @current_user ||= User[current_user_id]
13
13
  end
14
14
 
15
15
  def current_user=(user)
16
16
  env['rack.session'] = {} if env['rack.session'].nil?
17
17
  env['rack.session']['user_id'] = user.id if user
18
+ @current_user = user
18
19
  end
19
20
 
20
21
  def current_user_id
data/lib/ditty/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ditty
4
- VERSION = '0.7.0-rc1'.freeze
4
+ VERSION = '0.7.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ditty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.pre.rc1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurgens du Toit
@@ -532,9 +532,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
532
532
  version: '0'
533
533
  required_rubygems_version: !ruby/object:Gem::Requirement
534
534
  requirements:
535
- - - ">"
535
+ - - ">="
536
536
  - !ruby/object:Gem::Version
537
- version: 1.3.1
537
+ version: '0'
538
538
  requirements: []
539
539
  rubyforge_project:
540
540
  rubygems_version: 2.7.7