bullet_train 1.2.23 → 1.2.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/account/invitations/controller_base.rb +11 -0
- data/app/views/account/memberships/_membership.html.erb +3 -0
- data/app/views/layouts/docs.html.erb +6 -0
- data/config/locales/en/invitations.en.yml +2 -0
- data/config/locales/en/memberships.en.yml +1 -0
- data/config/routes.rb +1 -0
- data/docs/application-options.md +12 -26
- data/docs/billing/stripe.md +2 -0
- data/docs/heroku.md +11 -1
- data/docs/index.md +1 -0
- data/lib/bullet_train/resolver.rb +3 -3
- data/lib/bullet_train/version.rb +1 -1
- data/lib/tasks/bullet_train_tasks.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 765759c0952aaff0fb5eb2d2adfab6c0abc7f40f14ab19aefebeb2cdaa60b7f1
|
4
|
+
data.tar.gz: 1c0ce7b0f8724abe0ad5a0d1c1163d25820455d8973a33422a74ef8934fd4f7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57b0fc73cde94ddd2b9f02163a5c7aa50208672de1fd4567a0d27c51ec6295e0cf84c4fb6a3d2c0c2b10af4e09563e5f484b1699060405f25489935139832873
|
7
|
+
data.tar.gz: 9e519f078ce8583947723f21099dd937d2f8c2046d8d491c4229798fdee5f2db72799be6b08ef339092b552fbd4ab791774ebb70b2e15d3de44dea2287cab510
|
@@ -73,6 +73,17 @@ module Account::Invitations::ControllerBase
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
# POST /invitations/1/resend
|
77
|
+
def resend
|
78
|
+
@invitation = Invitation.find_by(uuid: params[:id])
|
79
|
+
if @invitation
|
80
|
+
UserMailer.invited(params[:id]).deliver_later
|
81
|
+
redirect_to account_team_invitations_path(@invitation.membership.team), notice: I18n.t("invitations.notifications.resent")
|
82
|
+
else
|
83
|
+
redirect_to account_dashboard_path, alert: I18n.t("invitations.notifications.resent_error")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
76
87
|
# GET /invitations/new
|
77
88
|
def new
|
78
89
|
@invitation.build_membership
|
@@ -24,6 +24,9 @@
|
|
24
24
|
<% end %>
|
25
25
|
</td>
|
26
26
|
<td class="text-right">
|
27
|
+
<% if membership.unclaimed? %>
|
28
|
+
<%= button_to t('.buttons.resend'), resend_account_invitation_path(membership.invitation.uuid), class: 'button-secondary button-smaller' %>
|
29
|
+
<% end %>
|
27
30
|
<%= link_to t('.buttons.show'), [:account, membership], class: 'button-secondary button-smaller' %>
|
28
31
|
</td>
|
29
32
|
</tr>
|
@@ -212,6 +212,12 @@
|
|
212
212
|
<i class="fab fa-stripe-s ti ti-money"></i>
|
213
213
|
<% end %>
|
214
214
|
<% end %>
|
215
|
+
|
216
|
+
<%= render 'account/shared/menu/item', url: '/docs/billing/usage', label: 'Usage' do |p| %>
|
217
|
+
<% p.icon do %>
|
218
|
+
<i class="fal fa-gauge ti ti-ruler"></i>
|
219
|
+
<% end %>
|
220
|
+
<% end %>
|
215
221
|
<% end %>
|
216
222
|
|
217
223
|
<%= render 'account/shared/menu/section', title: 'Integration' do %>
|
@@ -56,6 +56,8 @@ en:
|
|
56
56
|
created: 'Invitation was successfully created.'
|
57
57
|
updated: 'Invitation was successfully updated.'
|
58
58
|
destroyed: 'Invitation was successfully destroyed.'
|
59
|
+
resent: 'Invitation was successfully resent.'
|
60
|
+
resent_error: Sorry, we couldn't find an invitation to resend.
|
59
61
|
doesnt_exist: Sorry, but we couldn't find your invitation. Please contact an administrator on the team to have them send you another one.
|
60
62
|
values:
|
61
63
|
name: 'Invitation to Join %{team_name}'
|
data/config/routes.rb
CHANGED
data/docs/application-options.md
CHANGED
@@ -1,31 +1,17 @@
|
|
1
1
|
# Application Options
|
2
2
|
|
3
|
-
|
3
|
+
The following configuration options are available for your Bullet Train application. For local development, you can set these values in `config/application.yml`. For hosting providers that we provide first-party support for, you can consult [Render's documentation](https://render.com/docs/environment-variables) and [Heroku's documentation](https://devcenter.heroku.com/articles/config-vars) for how to set these values.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
| Option | Type | Example | Helper Methods |
|
5
|
+
| Option | Purpose | Example Value <sup><a href="#footnote-1">1</a></sup> | Helper Methods |
|
8
6
|
| --- | --- | --- | --- |
|
9
|
-
|
|
10
|
-
|
|
11
|
-
| STRIPE_CLIENT_ID |
|
12
|
-
| CLOUDINARY_URL |
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| OPENAI_ACCESS_TOKEN | String |`your_openai_token`| `openai_enabled?` |
|
7
|
+
| `BASE_URL` | Specify the full URL where the application is hosted | `https://app.yourproduct.com` | |
|
8
|
+
| `HIDE_THINGS` | [Hide the "Creative Concept" demo model and "Tangible Thing" template model](/docs/super-scaffolding.md) | `true` | `scaffolding_things_disabled?` |
|
9
|
+
| `STRIPE_CLIENT_ID` | [Enable the example OAuth2 integration with Stripe Connect](/docs/oauth.md) | `ca_DBOenflO97IalW31IEvpvSKGHjOWhGzJ` | `stripe_enabled?` |
|
10
|
+
| `CLOUDINARY_URL` | Enable Cloudinary-powered image uploads, including profile photos | `cloudinary://9149...:3HSd...@hfytqhfzj` | `cloudinary_enabled?` |
|
11
|
+
| `INVITATION_KEYS` | [Restrict new sign-ups](/docs/authentication.md) | `89dshwxja, a9y29ihs1` | `invitation_keys` `invitation_only?` |
|
12
|
+
| `FONTAWESOME_NPM_AUTH_TOKEN` | [Enable Font Awesome Pro](/docs/font-awesome-pro.md) | `5DC62AA7-5741-4C45-874B-EA9CAA4EE085` | `font_awesome?` |
|
13
|
+
| `OPENAI_ACCESS_TOKEN` | Enable OpenAI-powered UX improvements | `sk-Tnko8PI15i6du03KkxVExTz3lbkFJV...` | `openai_enabled?` |
|
14
|
+
| `REDOCLY_ORGANIZATION_ID` | Enable Redocly-powered API documentation | `your-organization-name` | |
|
15
|
+
| `REDOCLY_API_KEY` | Enable Redocly-powered API documentation |`orgsk_lfyrXAAym8nbSrar9b8wvTN+...`| |
|
19
16
|
|
20
|
-
|
21
|
-
| --- | --- |
|
22
|
-
| HIDE_THINGS | Hides Bullet Train demo models such as `CreativeConcept` and `TangibleThing`. |
|
23
|
-
| HIDE_EXAMPLES | Hides base models such as `CreativeConcept` and `TangibleThing`.
|
24
|
-
| STRIPE_CLIENT_ID | See [Bullet Train Billing for Stripe](/docs/billing/stripe.md) for more information and related environment variables. |
|
25
|
-
| CLOUDINARY_URL | Enables use of Cloudinary for handling images. |
|
26
|
-
| TWO_FACTOR_ENCRYPTION_KEY | Enables two-factor authentication through Devise. |
|
27
|
-
| INVITATION_KEYS | See [Invitation Only](/docs/authentication.md) for more information. |
|
28
|
-
| FONTAWESOME_NPM_AUTH_TOKEN | Enables use of Font Awesome. |
|
29
|
-
| SILENCE_LOGS | Silences Super Scaffolding logs. |
|
30
|
-
| TESTING_PROVISION_KEY | Creates a test `Platform::Application` by accessing `/testing/provision?key=your_provision_key` |
|
31
|
-
| OPENAI_ACCESS_TOKEN | Enables use [OpenAI](https://openai.com/) with the [ruby-openai](https://github.com/alexrudall/ruby-openai) gem. |
|
17
|
+
<sup><a name="footnote-1"></a>1</sup> Any credentials listed here aren't real, but we wanted you to know what each looks like so you can recognize the correct value from each provider.
|
data/docs/billing/stripe.md
CHANGED
@@ -38,6 +38,8 @@ cp `bundle show --paths | grep bullet_train-billing-stripe | sort | head -n 1`/d
|
|
38
38
|
|
39
39
|
Note this is different than how many Rails engines ask you to install migrations. This is intentional, as we want to maintain the original timestamps associated with these migrations.
|
40
40
|
|
41
|
+
<aside><small>TODO Let's create a `rake bullet_train:billing:stripe:install` task.</small></aside>
|
42
|
+
|
41
43
|
### 2.4. Run Migrations
|
42
44
|
|
43
45
|
```
|
data/docs/heroku.md
CHANGED
@@ -14,7 +14,7 @@ We've included the "entry-level but production-grade" service tier across the bo
|
|
14
14
|
- [Heroku Postgres](https://elements.heroku.com/addons/heroku-postgresql)
|
15
15
|
- [Heroku Redis](https://elements.heroku.com/addons/heroku-redis) to support Sidekiq and Action Cable.
|
16
16
|
- [Memcachier](https://elements.heroku.com/addons/memcachier) to support Rails Cache.
|
17
|
-
- [
|
17
|
+
- [Bucketeer](https://elements.heroku.com/addons/bucketeer) to support off-server file uploads backed by AWS S3.
|
18
18
|
- [Cloudinary](https://cloudinary.com) to support off-server image uploads and ImageMagick processing.
|
19
19
|
- [Heroku Scheduler](https://elements.heroku.com/addons/scheduler) for cron jobs.
|
20
20
|
- [Rails Autoscale](https://railsautoscale.com) for best-of-breed reactive performance monitoring.
|
@@ -81,3 +81,13 @@ heroku certs:auto
|
|
81
81
|
```
|
82
82
|
|
83
83
|
You should be done now and your app should be available at `https://app.YOURDOMAIN.COM/account` and any hits to `https://app.YOURDOMAIN.COM` (e.g. when users sign out, etc.) will be redirected to your marketing site.
|
84
|
+
|
85
|
+
### 5. Configure CORS on Your Bucketeer S3 Bucket
|
86
|
+
|
87
|
+
Before you can upload to your freshly provisioned S3 bucket, you need to run (on Heroku) a rake task we've created for you to set the appropriate CORS settings.
|
88
|
+
|
89
|
+
```
|
90
|
+
heroku run rake aws:set_cors
|
91
|
+
```
|
92
|
+
|
93
|
+
Note: If you change `ENV["BASE_URL"]`, you need to re-run this task.
|
data/docs/index.md
CHANGED
@@ -104,7 +104,7 @@ module BulletTrain
|
|
104
104
|
|
105
105
|
if result[:absolute_path]
|
106
106
|
if result[:absolute_path].include?("/bullet_train")
|
107
|
-
regex = /#{"bullet_train-core" if result[:absolute_path].include?("bullet_train-core")}\/bullet_train[
|
107
|
+
regex = /#{"bullet_train-core" if result[:absolute_path].include?("bullet_train-core")}\/bullet_train[a-z|\-._0-9]*.*/
|
108
108
|
base_path = result[:absolute_path].scan(regex).pop
|
109
109
|
|
110
110
|
# Try to calculate which package the file is from, and what it's path is within that project.
|
@@ -152,7 +152,7 @@ module BulletTrain
|
|
152
152
|
@needle = partial_parts.join("/")
|
153
153
|
elsif @needle.match?(/bullet_train/)
|
154
154
|
# If it's a full path, we need to make sure we're getting it from the right package.
|
155
|
-
_, partial_view_package, partial_path_without_package = @needle.partition(/bullet_train-core\/bullet_train[a-z
|
155
|
+
_, partial_view_package, partial_path_without_package = @needle.partition(/(bullet_train-core\/)?bullet_train[a-z|\-._0-9]*/)
|
156
156
|
|
157
157
|
# Pop off `bullet_train-core` and the gem's version so we can call `bundle show` correctly.
|
158
158
|
partial_view_package.gsub!(/bullet_train-core\//, "")
|
@@ -165,7 +165,7 @@ module BulletTrain
|
|
165
165
|
puts "`#{@needle}`".red
|
166
166
|
puts ""
|
167
167
|
puts "Check the string one more time to see if the package name is there."
|
168
|
-
puts "i.e.: bullet_train-
|
168
|
+
puts "i.e.: bullet_train-1.2.24/app/views/layouts/devise.html.erb".blue
|
169
169
|
puts ""
|
170
170
|
puts "If you're not sure what the package name is, run `bin/resolve --interactive`, follow the prompt, and pass the annotated path."
|
171
171
|
puts "i.e.: <!-- BEGIN /your/local/path/bullet_train-base/app/views/layouts/devise.html.erb -->".blue
|
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.2.
|
4
|
+
version: 1.2.25
|
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-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|