bullet_train 1.3.15 → 1.3.17
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 +1 -1
- data/app/helpers/email_helper.rb +2 -2
- data/app/models/concerns/invitations/base.rb +4 -1
- data/config/locales/en/invitations.en.yml +20 -2
- data/docs/tunneling.md +1 -1
- data/lib/bullet_train/resolver.rb +1 -1
- data/lib/bullet_train/version.rb +1 -1
- data/lib/tasks/bullet_train_tasks.rake +5 -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: c51ee37f41fe5f9ca7f9532a7c17ce33bef715effb3fee84a598ebcae4900ce7
|
4
|
+
data.tar.gz: 8798d8b4a2badc16e5dcceeca245cadf4c2faf3fec55ee83a5fe8967566f128e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61e70c5ad42169a14357577569cdcb3beb1123e1029c16f98fd6c69ad7d23c3962af14db7a91de508d4e24fcbd00d630c9b41b5700986e244fb6251f34d6e8ae
|
7
|
+
data.tar.gz: 411fdfebfcb92c3a58229f42f618721f9a63c53013c9a945ebba425958a4b592f77e9751dc23c540085cbed3165b5b8a8552a9b28e49d8b9bdc11c748e0d084e
|
@@ -76,7 +76,7 @@ module Account::Invitations::ControllerBase
|
|
76
76
|
# POST /invitations/1/resend
|
77
77
|
def resend
|
78
78
|
@invitation = Invitation.find_by(uuid: params[:id])
|
79
|
-
if @invitation
|
79
|
+
if @invitation&.touch
|
80
80
|
UserMailer.invited(params[:id]).deliver_later
|
81
81
|
redirect_to account_team_invitations_path(@invitation.membership.team), notice: I18n.t("invitations.notifications.resent")
|
82
82
|
else
|
data/app/helpers/email_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module EmailHelper
|
2
|
-
def email_image_tag(image, **
|
2
|
+
def email_image_tag(image, **)
|
3
3
|
image_underscore = image.tr("-", "_")
|
4
4
|
attachments.inline[image_underscore] = File.read(Rails.root.join("app/assets/images/#{image}"))
|
5
|
-
image_tag
|
5
|
+
image_tag(attachments.inline[image_underscore].url, **)
|
6
6
|
end
|
7
7
|
end
|
@@ -5,7 +5,6 @@ module Invitations::Base
|
|
5
5
|
belongs_to :team
|
6
6
|
belongs_to :from_membership, class_name: "Membership"
|
7
7
|
has_one :membership, dependent: :nullify
|
8
|
-
has_many :roles, through: :membership
|
9
8
|
|
10
9
|
accepts_nested_attributes_for :membership
|
11
10
|
|
@@ -15,6 +14,10 @@ module Invitations::Base
|
|
15
14
|
after_create :send_invitation_email
|
16
15
|
|
17
16
|
attribute :uuid, default: -> { SecureRandom.hex }
|
17
|
+
|
18
|
+
def roles
|
19
|
+
membership.roles
|
20
|
+
end
|
18
21
|
end
|
19
22
|
|
20
23
|
def set_added_by_membership
|
@@ -13,10 +13,26 @@ en:
|
|
13
13
|
confirmations:
|
14
14
|
destroy: Are you sure you want cancel the invitation to %{invitation_name}? The invitation they've received will no longer work. This can't be undone.
|
15
15
|
fields: &fields
|
16
|
+
id:
|
17
|
+
_: &id Invitation ID
|
18
|
+
label: *id
|
19
|
+
heading: *id
|
16
20
|
email:
|
17
|
-
|
21
|
+
_: &email Email Address
|
18
22
|
label: *email
|
19
23
|
heading: *email
|
24
|
+
uuid:
|
25
|
+
name: &uuid Invitation UUID
|
26
|
+
label: *uuid
|
27
|
+
heading: *uuid
|
28
|
+
from_membership_id:
|
29
|
+
name: &from_membership_id Who sent ID
|
30
|
+
label: *from_membership_id
|
31
|
+
heading: *from_membership_id
|
32
|
+
team_id:
|
33
|
+
name: &team_id Team ID
|
34
|
+
label: *team_id
|
35
|
+
heading: *team_id
|
20
36
|
roles: &role_ids
|
21
37
|
name: &roles Special Privileges
|
22
38
|
label: *roles
|
@@ -26,6 +42,9 @@ en:
|
|
26
42
|
created_at:
|
27
43
|
name: &created_at Sent
|
28
44
|
heading: *created_at
|
45
|
+
updated_at:
|
46
|
+
name: &updated_at Updated
|
47
|
+
heading: *updated_at
|
29
48
|
index:
|
30
49
|
section: "Invitations for %{team_name}"
|
31
50
|
header: Team Member Invitations
|
@@ -59,7 +78,6 @@ en:
|
|
59
78
|
resent: 'Invitation was successfully resent.'
|
60
79
|
resent_error: Sorry, we couldn't find an invitation to resend.
|
61
80
|
doesnt_exist: Sorry, but we couldn't find your invitation. Please contact an administrator on the team to have them send you another one.
|
62
|
-
duplicate: 'Sorry, a member with the email %{user_email} has already been invited.'
|
63
81
|
values:
|
64
82
|
name: 'Invitation to Join %{team_name}'
|
65
83
|
account:
|
data/docs/tunneling.md
CHANGED
@@ -11,7 +11,7 @@ You should specifically sign up for a paid account. Although ngrok offers a free
|
|
11
11
|
Once you have ngrok installed, you can start your tunnel like so, replacing `YOUR-SUBDOMAIN` with whatever subdomain you reserved in your ngrok account:
|
12
12
|
|
13
13
|
```
|
14
|
-
ngrok http
|
14
|
+
ngrok http --domain=YOUR-SUBDOMAIN 3000
|
15
15
|
```
|
16
16
|
|
17
17
|
## Updating Your Configuration
|
@@ -160,7 +160,7 @@ module BulletTrain
|
|
160
160
|
_, partial_view_package, partial_path_without_package = @needle.partition(/(bullet_train-core\/)?bullet_train[a-z|\-._0-9]*/)
|
161
161
|
|
162
162
|
# Pop off `bullet_train-core` and the gem's version so we can call `bundle show` correctly.
|
163
|
-
partial_view_package.gsub!(
|
163
|
+
partial_view_package.gsub!("bullet_train-core/", "")
|
164
164
|
partial_view_package.gsub!(/[-|.0-9]*$/, "") if partial_view_package.match?(/[-|.0-9]*$/)
|
165
165
|
|
166
166
|
local_package_path = `bundle show #{partial_view_package}`.chomp
|
data/lib/bullet_train/version.rb
CHANGED
@@ -144,6 +144,7 @@ namespace :bullet_train do
|
|
144
144
|
puts "bin/hack --link: " + "Link all of your Bullet Train gems to `local/bullet_train-core`.".blue
|
145
145
|
puts "bin/hack --link github: " + "Link all of your Bullet Train gems to the public repositories on GitHub".blue
|
146
146
|
puts "bin/hack --link (version-number): " + "Link all of your Bullet Train gems to the version number passed.".blue
|
147
|
+
puts "bin/hack --link (custom path to package): " + "Pass a custom path to where your bullet_train-core gems are.".blue
|
147
148
|
puts "bin/hack --reset: " + "Resets all of your gems to their original definition.".blue
|
148
149
|
puts "bin/hack --watch-js: " + "Watches for any changes in JavaScript files gems that have an npm package.".blue
|
149
150
|
puts "bin/hack --clean-js: " + "Resets all of your npm packages from `local/bullet_train-core` to their original definition.".blue
|
@@ -259,7 +260,7 @@ namespace :bullet_train do
|
|
259
260
|
def set_core_gems(flag, link_flag_value, framework_packages)
|
260
261
|
packages = framework_packages.keys
|
261
262
|
gemfile_lines = File.readlines("./Gemfile")
|
262
|
-
version_regexp =
|
263
|
+
version_regexp = /^[\d|.]$/
|
263
264
|
|
264
265
|
packages.each do |package|
|
265
266
|
original_path = "gem \"#{package}\""
|
@@ -285,6 +286,9 @@ namespace :bullet_train do
|
|
285
286
|
"#{line.chomp}, git: 'http://github.com/bullet-train-co/bullet_train-core.git'\n"
|
286
287
|
elsif link_flag_value&.match?(version_regexp)
|
287
288
|
"#{line.chomp}, \"#{link_flag_value}\"\n"
|
289
|
+
elsif link_flag_value.present?
|
290
|
+
link_flag_value.gsub!(/\/$/, "") # Ensure the custom path doesn't have a slash at the end.
|
291
|
+
local_path.gsub(/path:.*/, "path: \"#{link_flag_value}/#{package}\"\n")
|
288
292
|
else
|
289
293
|
line.gsub(original_path, local_path)
|
290
294
|
end
|
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.3.
|
4
|
+
version: 1.3.17
|
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-08-
|
11
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|