bullet_train 1.4.11 → 1.5.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28b3ba5f50dac3b25183a892b754c22e23ff75a757293050c3124401037e5fd9
|
4
|
+
data.tar.gz: 20c4f020b91dabe7a2bc85f006de605d187d71a943976a2f6eeb729cebb2dba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d77c764443e6de40f3ef8187c0add73aa76b4a3d1fc605dabba7335031a227b280d7db58ebf4ec5f4baf8087e9d1e1b54e3d364bccd5332337e2a23638ac74
|
7
|
+
data.tar.gz: d12805a0a7a1bfb764e867d03d898062ea67423882786805ce60407fc5176eabacc10dbc94654f96279bde26cb38d3bfdb3c20ddd5f3a73323a492df43bec6ea
|
@@ -39,11 +39,6 @@ module Memberships::Base
|
|
39
39
|
scope :current_and_invited, -> { includes(:invitation).where("user_id IS NOT NULL OR invitations.id IS NOT NULL").references(:invitation) }
|
40
40
|
scope :current, -> { where("user_id IS NOT NULL") }
|
41
41
|
scope :tombstones, -> { includes(:invitation).where("user_id IS NULL AND invitations.id IS NULL AND platform_agent IS FALSE").references(:invitation) }
|
42
|
-
|
43
|
-
# TODO Probably we can provide a way for gem packages to define these kinds of extensions.
|
44
|
-
if billing_enabled?
|
45
|
-
scope :billable, -> { current_and_invited }
|
46
|
-
end
|
47
42
|
end
|
48
43
|
|
49
44
|
def name
|
@@ -36,14 +36,6 @@ module Records::Base
|
|
36
36
|
scope :newest_updated, -> { order("updated_at DESC") }
|
37
37
|
scope :oldest_updated, -> { order("updated_at ASC") }
|
38
38
|
|
39
|
-
# TODO Probably we can provide a way for gem packages to define these kinds of extensions.
|
40
|
-
if billing_enabled?
|
41
|
-
# By default, any model in a collection is considered active for billing purposes.
|
42
|
-
# This can be overloaded in the child model class to specify more specific criteria for billing.
|
43
|
-
# See `app/models/concerns/memberships/base.rb` for an example.
|
44
|
-
scope :billable, -> { order("TRUE") }
|
45
|
-
end
|
46
|
-
|
47
39
|
# Microscope adds useful scopes targeting ActiveRecord `boolean`, `date` and `datetime` attributes.
|
48
40
|
# https://github.com/mirego/microscope
|
49
41
|
acts_as_microscope
|
@@ -22,17 +22,6 @@ module Teams::Base
|
|
22
22
|
# integrations
|
23
23
|
has_many :integrations_stripe_installations, class_name: "Integrations::StripeInstallation", dependent: :destroy if stripe_enabled?
|
24
24
|
|
25
|
-
# TODO Probably we can provide a way for gem packages to define these kinds of extensions.
|
26
|
-
if billing_enabled?
|
27
|
-
# subscriptions
|
28
|
-
has_many :billing_subscriptions, class_name: "Billing::Subscription", dependent: :destroy, foreign_key: :team_id
|
29
|
-
|
30
|
-
# TODO We need a way for `bullet_train-billing-stripe` to define these.
|
31
|
-
if defined?(Billing::Stripe::Subscription)
|
32
|
-
has_many :billing_stripe_subscriptions, class_name: "Billing::Stripe::Subscription", dependent: :destroy, foreign_key: :team_id
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
25
|
# validations
|
37
26
|
validates :name, presence: true
|
38
27
|
validates :time_zone, inclusion: {in: ActiveSupport::TimeZone.all.map(&:name)}, allow_nil: true
|
@@ -68,19 +57,5 @@ module Teams::Base
|
|
68
57
|
self
|
69
58
|
end
|
70
59
|
|
71
|
-
# TODO Probably we can provide a way for gem packages to define these kinds of extensions.
|
72
|
-
if billing_enabled?
|
73
|
-
def current_billing_subscription
|
74
|
-
# If by some bug we have two subscriptions, we want to use the one that existed first.
|
75
|
-
# The reasoning here is that it's more likely to be on some legacy plan that benefits the customer.
|
76
|
-
billing_subscriptions.active.order(:created_at).first
|
77
|
-
end
|
78
|
-
|
79
|
-
def needs_billing_subscription?
|
80
|
-
return false if freemium_enabled?
|
81
|
-
billing_subscriptions.active.empty?
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
60
|
ActiveSupport.run_load_hooks :bullet_train_teams_base, self
|
86
61
|
end
|
@@ -18,6 +18,19 @@ Then you should:
|
|
18
18
|
* Commit the updated test files
|
19
19
|
* Update to v1.5.0
|
20
20
|
|
21
|
+
### Dealing with merge conflicts after merging v1.5.0
|
22
|
+
|
23
|
+
When you update to 1.5.0 you may have rather large merge conflicts in some system test files,
|
24
|
+
especially if you've modified those files to accomodate changes to user flows in your own app.
|
25
|
+
|
26
|
+
When you're resolving conflicts you'll mostly want to pick your own version of stuff (that is,
|
27
|
+
the code on the `HEAD` side of the conflict). If you want to avoid manually sorting a conflict
|
28
|
+
and just preserve your own version of a file you can do something like this:
|
29
|
+
|
30
|
+
```
|
31
|
+
git checkout HEAD -- test/system/the_test_file_in_question.rb
|
32
|
+
```
|
33
|
+
|
21
34
|
### About this change
|
22
35
|
|
23
36
|
We've introduced a new `device_test` helper that wraps up some of the implementation
|
data/lib/bullet_train/version.rb
CHANGED