bullet_train 1.6.14 → 1.6.16

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: 7b48f7758eba0c5783f2958696e732d6d589bf83b530d94ccc05827c0ed13a4c
4
- data.tar.gz: 23c3b186f9fa356ae8640aecd72a735469c8904f7265b9044f4f1f00c6ac4d6c
3
+ metadata.gz: 1d96fd2409f0928522da1b82b8a060b156055a8318af4b4bc6f67a3ae96ebb52
4
+ data.tar.gz: 8bd4feb0a2c13e94299f613d52ac2bb62e8edc1d1a5c8a3f2f5041e7888f0b04
5
5
  SHA512:
6
- metadata.gz: 5688bc76a4045b6480f59a0825a46758d2fb582fc24a3892bbcb39b2b72666f38a3fc4ffe7b0cc45e21de22097dddff5f51426a3335631a82a96b42159ca52e4
7
- data.tar.gz: 4fe8b0b5d1049d971ff98c18f9bf015abb1cd846bb6b2781eec25698a7edae35b1c05c5a67209e41695125f1c2b9586b265525f9a825db38ca9138023d2f0632
6
+ metadata.gz: b562b4c033b7c1a194d9d8520a93dc68e7d490672c1d8c677da5766539c4dcf569c6b1686854e69586bb206c73c94dd866d462f4439876553d62d4ad473e7aa2
7
+ data.tar.gz: 97d63dc0faa2ffb342d2b6ff6a47e709781599e8bc0f94be3161f46be1c4e9531347318951d1a810b323814f17685860dc732a937e799666a70e418f3ef4f617
@@ -30,6 +30,8 @@ module Memberships::Base
30
30
  end
31
31
  end
32
32
 
33
+ after_commit :publish_changed_quantity
34
+
33
35
  after_validation :remove_user_profile_photo, if: :user_profile_photo_removal?
34
36
 
35
37
  scope :excluding_platform_agents, -> { where(platform_agent_of: nil) }
@@ -151,5 +153,9 @@ module Memberships::Base
151
153
  user_profile_photo.purge
152
154
  end
153
155
 
156
+ def publish_changed_quantity
157
+ ActiveSupport::Notifications.instrument("memberships.quantity-changed", {team:})
158
+ end
159
+
154
160
  ActiveSupport.run_load_hooks :bullet_train_memberships_base, self
155
161
  end
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.6.14"
2
+ VERSION = "1.6.16"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -81,7 +81,7 @@ def inbound_email_enabled?
81
81
  end
82
82
 
83
83
  def billing_enabled?
84
- ENV["STRIPE_SECRET_KEY"].present? && defined?(BulletTrain::Billing)
84
+ (ENV["STRIPE_SECRET_KEY"].present? || ENV["PADDLE_SECRET_KEY"].present?) && defined?(BulletTrain::Billing)
85
85
  end
86
86
 
87
87
  # TODO This should be in an initializer or something.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.14
4
+ version: 1.6.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 6.0.0
41
- - !ruby/object:Gem::Dependency
42
- name: bullet_train-fields
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bullet_train-roles
57
43
  requirement: !ruby/object:Gem::Requirement