bullet_train 1.4.10 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/memberships/base.rb +0 -5
- data/app/models/concerns/records/base.rb +0 -8
- data/app/models/concerns/teams/base.rb +0 -25
- data/docs/upgrades/notable-versions.md +63 -0
- data/docs/upgrades/options.md +4 -0
- data/docs/upgrades/yolo-130.md +2 -0
- data/docs/upgrades/yolo-140.md +2 -0
- data/docs/upgrades.md +2 -0
- data/lib/bullet_train/resolver.rb +2 -11
- data/lib/bullet_train/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab2b266dbfce24f8790dbee6a5f2236dd54c4d91e4064c87a82c44b38c05e3d0
|
4
|
+
data.tar.gz: 4380916c8f6ebc3666d49b34c6fa8034801b3f340e1f4eabd23c790cbe3ded37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cbb12faf56930279a8c08d5ba282e11471e22ae1f64e4e0e71db6f51390dd19c8d1697bda2084abf996ccd8419fae509e2e7feb8e1612dbade1350c7b21862a
|
7
|
+
data.tar.gz: 6b27c9f2330243b736aee06122afd9b28b4a7cc7af793ded4a051fa925b1f2e2024a4a2fd040def10efbee0b705ea8194483d78f34d0d408ab3b0bc344b5149b
|
@@ -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
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Notable Versions
|
2
|
+
|
3
|
+
## v1.4.11 / v1.5.0
|
4
|
+
|
5
|
+
In v1.5.0 we made some fairly big changes to the format of system tests. In order to ease the
|
6
|
+
transition we shipped a helper in 1.4.11 that you can use to modify your copy of the tests before
|
7
|
+
you merge in version 1.5.0. Doing this should reduce the chances for merge conflicts.
|
8
|
+
|
9
|
+
To use the helper to modify your tests run this in a console (after updating to v1.4.11):
|
10
|
+
|
11
|
+
```
|
12
|
+
bin/update/system_tests/use_device_test
|
13
|
+
```
|
14
|
+
|
15
|
+
Then you should:
|
16
|
+
|
17
|
+
* Run the tests to make sure they still pass
|
18
|
+
* Commit the updated test files
|
19
|
+
* Update to v1.5.0
|
20
|
+
|
21
|
+
### About this change
|
22
|
+
|
23
|
+
We've introduced a new `device_test` helper that wraps up some of the implementation
|
24
|
+
details about running system tests on a variety of devices.
|
25
|
+
|
26
|
+
It simplifies the way that we write system tests like this:
|
27
|
+
|
28
|
+
```diff
|
29
|
+
- @@test_devices.each do |device_name, display_details|
|
30
|
+
- test "user can so something on a #{device_name}" do
|
31
|
+
- resize_for(display_details)
|
32
|
+
- # actual tests here
|
33
|
+
- end
|
34
|
+
- end
|
35
|
+
+ device_test "user can do something" do
|
36
|
+
+ # actual test code
|
37
|
+
+ end
|
38
|
+
```
|
39
|
+
|
40
|
+
The specific changes are:
|
41
|
+
|
42
|
+
* Remove the enclosing @@test_devices.each do block
|
43
|
+
* Remove one level of indentation from test inside those blocks
|
44
|
+
* Remove the resize_for(display_details) from tests in those blocks
|
45
|
+
* Use `device_test` helper to handle running the test on different devices
|
46
|
+
|
47
|
+
|
48
|
+
## v1.3.22
|
49
|
+
|
50
|
+
In version 1.3.22 we added an `Address` model. If your app already had an `Address` model you'll
|
51
|
+
probably want to reject some of the updates made to the starter repo in this version.
|
52
|
+
|
53
|
+
TODO: Can we offer more direction here?
|
54
|
+
|
55
|
+
|
56
|
+
## v1.3.0
|
57
|
+
|
58
|
+
Version 1.3.0 is when we started explicitly bumping the Bullet Train gems within the starter repo
|
59
|
+
every time that we release a new version of the `core` gems. Unfortunately, at that time we were
|
60
|
+
only making changes to Gemfile.lock which kind of hides the dependencies, and is often a source of
|
61
|
+
merge conflicts that can be hard to sort out.
|
62
|
+
|
63
|
+
[See the upgrade guide for getting your app to version 1.3.0](/docs/upgrades/yolo-130)
|
data/docs/upgrades/options.md
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
* [Upgrade from any version to `1.4.0`](/docs/upgrades/yolo-140.md)
|
8
8
|
* [Upgrade from any version to `1.3.0`](/docs/upgrades/yolo-130.md)
|
9
9
|
* [Upgrade from `1.3.x` to `1.4.0`](/docs/upgrades/yolo-140.md)
|
10
|
+
* [Notable versions](/docs/upgrades/notable-versions)
|
11
|
+
|
10
12
|
|
11
13
|
## About the upgrade process
|
12
14
|
|
@@ -27,6 +29,8 @@ which is less hidden and is not as prone to having merge conflicts as `Gemfile.l
|
|
27
29
|
As a result of these changes, there are a few different ways that you might choose to upgrade your application
|
28
30
|
depending on which version you're currently on.
|
29
31
|
|
32
|
+
[Be sure to check our Notable Versions list to see if there's anything tricky about the version you're moving to.](/docs/upgrades/notable-versions)
|
33
|
+
|
30
34
|
## How to find your current version
|
31
35
|
|
32
36
|
You can easily find your current version by running `bundle show | grep "bullet_train "`.
|
data/docs/upgrades/yolo-130.md
CHANGED
@@ -173,6 +173,8 @@ Before doing this you should have already followed the instructions above to get
|
|
173
173
|
|
174
174
|
For purposes of this example we'll assume that you're stepping up from `1.3.0` to `1.3.1`.
|
175
175
|
|
176
|
+
[Be sure to check our Notable Versions list to see if there's anything tricky about the version you're moving to.](/docs/upgrades/notable-versions)
|
177
|
+
|
176
178
|
### 1. Make sure you're working with a clean local copy.
|
177
179
|
|
178
180
|
```
|
data/docs/upgrades/yolo-140.md
CHANGED
data/docs/upgrades.md
CHANGED
@@ -36,6 +36,8 @@ your application.
|
|
36
36
|
|
37
37
|
For the purposes of these instructions we'll assume that you're on version `1.4.0` and are going to upgrade to version `1.4.1`.
|
38
38
|
|
39
|
+
[Be sure to check our Notable Versions list to see if there's anything tricky about the version you're moving to.](/docs/upgrades/notable-versions)
|
40
|
+
|
39
41
|
### 2. Make sure you're working with a clean local copy.
|
40
42
|
|
41
43
|
```
|
@@ -58,17 +58,8 @@ module BulletTrain
|
|
58
58
|
# Look for showcase preview.
|
59
59
|
file_name = source_file[:absolute_path].split("/").last
|
60
60
|
showcase_partials = Dir.glob(`bundle show bullet_train-themes-light`.chomp + "/app/views/showcase/**/*.html.erb")
|
61
|
-
|
62
|
-
|
63
|
-
showcase_partials.each do |partial|
|
64
|
-
has_showcase_preview = partial.match?(/#{file_name}$/)
|
65
|
-
if has_showcase_preview
|
66
|
-
showcase_partial = partial
|
67
|
-
break
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
if has_showcase_partial
|
61
|
+
showcase_preview = showcase_partials.find { _1.end_with?(file_name) }
|
62
|
+
if showcase_preview
|
72
63
|
puts "Ejecting showcase preview for #{source_file[:relative_path]}"
|
73
64
|
partial_relative_path = showcase_preview.scan(/(?=app\/views\/showcase).*/).last
|
74
65
|
directory = partial_relative_path.split("/")[0..-2].join("/")
|
data/lib/bullet_train/version.rb
CHANGED
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.
|
4
|
+
version: 1.5.0
|
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
|
+
date: 2023-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -753,6 +753,7 @@ files:
|
|
753
753
|
- docs/trademark.md
|
754
754
|
- docs/tunneling.md
|
755
755
|
- docs/upgrades.md
|
756
|
+
- docs/upgrades/notable-versions.md
|
756
757
|
- docs/upgrades/options.md
|
757
758
|
- docs/upgrades/yolo-130.md
|
758
759
|
- docs/upgrades/yolo-140.md
|