cats_core 1.4.38 → 1.4.39

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: c9686d605fc55bee82820925cab018c53333b5d35885fddcb98bd211c61f6547
4
- data.tar.gz: 938a5caa85d500edde7ae4302293beffc06cea17930cabffd2272e38861227cd
3
+ metadata.gz: a86860a6e6a86d7d133ab9a050bffdd675d00c1fad85e9af8b9fabf24183711d
4
+ data.tar.gz: 23001d95a8ce470d196ab560dd72d782f080ed8fed7e9067a12674b06084cf35
5
5
  SHA512:
6
- metadata.gz: dd42170550910db72d5056a21e126faebbbb285eadd135ec57acc09f76e1919c1768525eacae9068466472a88ca87dffca1cb33bd8a74533cf48bc6214e83ca5
7
- data.tar.gz: be577e0ea6605492474c01825bb12e7a179aeddbb96fc0c6778e3a3c6a19813543715fa7a01b6e28e03e628b504b6f83cc6a37b2f5418039e16e47a037690bc2
6
+ metadata.gz: 10324cc46243b87345e485e9f176cd1b4a9acc277d8c26aa5b1372c3dc211fa4e4a3f473e81ad94c1bcba0f67c8a9cbb988b5648f4bd70063ab10da0c4865636
7
+ data.tar.gz: 0c530f68241d07329f96a399b2fcac5cffc30bb549c5ddb605739a49db2150cbef97b24e290459232d05f4bf67390ecf66c706bc2f552628743853b4d7bec86b
@@ -14,6 +14,15 @@ module Cats
14
14
  render json: { error: 'Unauthorized' }, status: 401 if current_user.nil?
15
15
  end
16
16
 
17
+ # In case we want to disable bullet for specific controller actions
18
+ def skip_bullet
19
+ previous_value = Bullet.enable?
20
+ Bullet.enable = false
21
+ yield
22
+ ensure
23
+ Bullet.enable = previous_value
24
+ end
25
+
17
26
  private
18
27
 
19
28
  def serialize(data)
@@ -4,6 +4,7 @@ module Cats
4
4
  include Common
5
5
  skip_before_action :authenticate, only: %i[start_with_pin]
6
6
  before_action :set_service, only: %i[create_receipt_authorization approve start start_with_pin search confirm]
7
+ around_action :skip_bullet, if: -> { defined?(Bullet) }, only: %i[search start_with_pin]
7
8
 
8
9
  def index
9
10
  super do
@@ -4,6 +4,7 @@ module Cats
4
4
  include Common
5
5
 
6
6
  before_action :set_service, only: %i[approve generate remove_items generate_round_needs]
7
+ around_action :skip_bullet, if: -> { defined?(Bullet) }, only: %i[generate generate_round_needs remove_items]
7
8
 
8
9
  def index
9
10
  super do
@@ -3,6 +3,8 @@ module Cats
3
3
  class UsersController < ApplicationController
4
4
  include Common
5
5
 
6
+ around_action :skip_bullet, if: -> { defined?(Bullet) }, only: %i[stores]
7
+
6
8
  def index
7
9
  super do
8
10
  User.joins(:application_module).where(cats_core_application_modules: { prefix: params[:prefix] })
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.4.38'.freeze
3
+ VERSION = '1.4.39'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.38
4
+ version: 1.4.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.