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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d9110b69050fc6e8801f6e37118a735e84978d0d67b28988b4fee47a68fc3b1
4
- data.tar.gz: 4bfc8a9ccb219b0fccf82fdc153c02a6076443cc29ed4e064a63bad97f8a2b40
3
+ metadata.gz: 765759c0952aaff0fb5eb2d2adfab6c0abc7f40f14ab19aefebeb2cdaa60b7f1
4
+ data.tar.gz: 1c0ce7b0f8724abe0ad5a0d1c1163d25820455d8973a33422a74ef8934fd4f7e
5
5
  SHA512:
6
- metadata.gz: 9f43b9c8a0185d73c230fdad54405bb480219e04ca9917964d502f6db13ade9bf26d766ae4c7d0dc8926cfb66d5d745252775585fb1059fa35cac03d29e25033
7
- data.tar.gz: a0b31fd936cd59281d3012972b682bc932bb3c70f9a6f80bdcdc0d6d1735550bf6a183b3a46699003b8bfde819894b463539c3b2799daf1d04f1a8b7e440a9c9
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}'
@@ -10,6 +10,7 @@ en:
10
10
  buttons: &buttons
11
11
  edit: Settings
12
12
  show: Details
13
+ resend: Resend
13
14
  update: Update Membership
14
15
  demote: Demote from Admin
15
16
  promote: Promote to Admin
data/config/routes.rb CHANGED
@@ -37,6 +37,7 @@ Rails.application.routes.draw do
37
37
  member do
38
38
  get :accept
39
39
  post :accept
40
+ post :resend
40
41
  end
41
42
  end
42
43
 
@@ -1,31 +1,17 @@
1
1
  # Application Options
2
2
 
3
- Bullet Train features a list of options available at your disposal to enable/disable functionalities that would otherwise take a significant amount of time to implement. Simply add any of the following environment variables to `config/application.yml` in your main Bullet Train application and restart your server for the options to apply.
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
- The helper methods below can also be directly invoked in your application if you wish to have parts of your code depend on the functionality in question.
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
- | HIDE_THINGS | Boolean | `"true"` | `scaffolding_things_disabled?` |
10
- | HIDE_EXAMPLES | Boolean | `"true"` | `scaffolding_things_disabled?` |
11
- | STRIPE_CLIENT_ID | String | `"your_stripe_client_id"` | `stripe_enabled?` |
12
- | CLOUDINARY_URL | String | `"cloudinary://your_cloudinary_token_here"` | `cloudinary_enabled?` |
13
- | TWO_FACTOR_ENCRYPTION_KEY | String | `"your_encryption_key"` | `two_factor_enabled_authentication?` |
14
- | INVITATION_KEYS | String | `"ofr9h5h9ghzeodh, ofr9h5h9ghzeodi"` | `invitation_keys` `invitation_only?` |
15
- | FONTAWESOME_NPM_AUTH_TOKEN | String | `"your_font_awesome_token"` | `font_awesome?` |
16
- | SILENCE_LOGS | Boolean | `"true"` | `silence_logs?` |
17
- | TESTING_PROVISION_KEY | String | `"asdf123"` | N/A |
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
- | Option | Description |
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.
@@ -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
- - [HDrive](https://elements.heroku.com/addons/hdrive) to support off-server file uploads backed by AWS S3.
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
@@ -37,6 +37,7 @@
37
37
 
38
38
  ## Billing
39
39
  - [Stripe](/docs/billing/stripe.md)
40
+ - [Usage Limits](/docs/billing/usage.md)
40
41
 
41
42
  ## Integration
42
43
  - [REST API](/docs/api.md)
@@ -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[.\-_a-z|0-9]*.*/
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|\-_0-9.]*/)
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-base/app/views/layouts/devise.html.erb".blue
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
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.2.23"
2
+ VERSION = "1.2.25"
3
3
  end
@@ -72,7 +72,7 @@ namespace :bullet_train do
72
72
  end
73
73
  end
74
74
 
75
- task :develop, [:all_options] => :environment do |t, arguments|
75
+ task :hack, [:all_options] => :environment do |t, arguments|
76
76
  def stream(command, prefix = " ")
77
77
  puts ""
78
78
 
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.23
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-04-01 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard