ibrain-core 0.5.10 → 0.5.12

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: 330ce67ab6f228e04d3b6ca92feeb6dd7c6d604861abe797c8e582f2b15d431d
4
- data.tar.gz: d77dc76e8f9665b905dcdc927200db46ce7cc535d730dc54a5841f0cc42fe54b
3
+ metadata.gz: 6bac2bf8a32b4d4271635b858daf8b608adde64dfee63b468afe5ee62b093537
4
+ data.tar.gz: 6143364930072c20ba64208b15482fb36b88a809c10f1e0ed01266039138d9aa
5
5
  SHA512:
6
- metadata.gz: 69a63bc198060fd596b93fbd164827950261da9bcd8105426a3f5965b2442b0141844725f6906b70c1244b1567396be548535b6916c18a4dc9a01d137edbf63d
7
- data.tar.gz: 192d6dc9fe457cd124eeb240bd111d44bab696db7e414b1ef16f3ac10b5d979c6f50d08bd010986bcd7b8b86dea51d9eeb9fd2c8a02c8b7671fb0ec39692afbe
6
+ metadata.gz: bc34b2df8d63e286d05c589f797baee4d824982147f783564acc367b2433ebfc48422929e83888851c88fa27d55a2022b4abf43546e1d48cec664c3862256342
7
+ data.tar.gz: 5e15776e2b885d468f0ee2eff619956da2e16d5f327ecaec1c3b586e663bfb824278fcdde48432b3300d94c00ac1e5dad4c198d6bdbb174fe23368e7b3a33d47
@@ -4,7 +4,7 @@ module Ibrain
4
4
  module Extentions
5
5
  class ActiveRequired < GraphQL::Schema::FieldExtension
6
6
  def resolve(object:, arguments:, **rest)
7
- raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.session.is_deactivated') if is_inactivated(object)
7
+ raise ActionController::InvalidAuthenticityToken, I18n.t('ibrain.errors.session.is_deactivated') unless is_activated(object)
8
8
 
9
9
  # yield the current time as `memo`
10
10
  yield(object, arguments, rest)
@@ -12,7 +12,7 @@ module Ibrain
12
12
 
13
13
  private
14
14
 
15
- def is_inactivated(object)
15
+ def is_activated(object)
16
16
  current_user = object.try(:context).try(:fetch, :current_user, nil)
17
17
  current_user.try(:is_activated?)
18
18
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ibrain
4
- VERSION = "0.5.10"
4
+ VERSION = "0.5.12"
5
5
 
6
6
  def self.ibrain_version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibrain-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tai Nguyen Van