bullet_train 1.6.14 → 1.6.15

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: 7b48f7758eba0c5783f2958696e732d6d589bf83b530d94ccc05827c0ed13a4c
4
- data.tar.gz: 23c3b186f9fa356ae8640aecd72a735469c8904f7265b9044f4f1f00c6ac4d6c
3
+ metadata.gz: 819e2691b823804c9fd3f6f6232ac00a0dbfe247941fd4066a2d73934fa702fe
4
+ data.tar.gz: 501b4f4c0f2ba618e7376c5a101496094e5c4d825865fd25aa9a276f82fcc58d
5
5
  SHA512:
6
- metadata.gz: 5688bc76a4045b6480f59a0825a46758d2fb582fc24a3892bbcb39b2b72666f38a3fc4ffe7b0cc45e21de22097dddff5f51426a3335631a82a96b42159ca52e4
7
- data.tar.gz: 4fe8b0b5d1049d971ff98c18f9bf015abb1cd846bb6b2781eec25698a7edae35b1c05c5a67209e41695125f1c2b9586b265525f9a825db38ca9138023d2f0632
6
+ metadata.gz: be4fd85ecfee8ff681da259d3835b77c80a16ccdc295b66af2f623959f405a8214ce6f3c4572eadfed36d4eb25983cdbe79e7f93fcd2b5fbfb708cdbe097eaa2
7
+ data.tar.gz: c94171620fc2bd210ac3af1244043dbb062a57dabb1f2eb0a39b2a0d3abb22b3dcdbc6b32b0a688ad95e8ffa0673640aaacdc33b298da5d346943d132a559284
@@ -30,6 +30,10 @@ module Memberships::Base
30
30
  end
31
31
  end
32
32
 
33
+ after_create_commit :publish_changed_quantity
34
+ after_update_commit :publish_changed_quantity
35
+ after_destroy_commit :publish_changed_quantity
36
+
33
37
  after_validation :remove_user_profile_photo, if: :user_profile_photo_removal?
34
38
 
35
39
  scope :excluding_platform_agents, -> { where(platform_agent_of: nil) }
@@ -151,5 +155,9 @@ module Memberships::Base
151
155
  user_profile_photo.purge
152
156
  end
153
157
 
158
+ def publish_changed_quantity
159
+ ActiveSupport::Notifications.instrument("memberships.quantity-changed", {team:})
160
+ end
161
+
154
162
  ActiveSupport.run_load_hooks :bullet_train_memberships_base, self
155
163
  end
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.6.14"
2
+ VERSION = "1.6.15"
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.15
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-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard