bullet_train 1.0.3 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/account/invitations_controller.rb +1 -144
- data/app/controllers/account/memberships_controller.rb +1 -130
- data/app/controllers/account/onboarding/user_details_controller.rb +1 -61
- data/app/controllers/account/onboarding/user_email_controller.rb +1 -63
- data/app/controllers/account/teams_controller.rb +1 -120
- data/app/controllers/account/users_controller.rb +1 -57
- data/app/controllers/concerns/account/invitations/controller_base.rb +150 -0
- data/app/controllers/concerns/account/memberships/controller_base.rb +136 -0
- data/app/controllers/concerns/account/onboarding/user_details/controller_base.rb +67 -0
- data/app/controllers/concerns/account/onboarding/user_email/controller_base.rb +69 -0
- data/app/controllers/concerns/account/teams/controller_base.rb +126 -0
- data/app/controllers/concerns/account/users/controller_base.rb +63 -0
- data/app/controllers/concerns/registrations/controller_base.rb +39 -0
- data/app/controllers/concerns/sessions/controller_base.rb +15 -0
- data/app/controllers/registrations_controller.rb +9 -0
- data/app/controllers/sessions_controller.rb +3 -0
- data/app/helpers/account/buttons_helper.rb +12 -0
- data/app/helpers/account/dates_helper.rb +38 -0
- data/app/helpers/account/forms_helper.rb +67 -0
- data/app/helpers/account/locale_helper.rb +51 -0
- data/app/helpers/account/markdown_helper.rb +5 -0
- data/app/helpers/account/role_helper.rb +5 -0
- data/app/helpers/attributes_helper.rb +32 -0
- data/app/helpers/email_helper.rb +7 -0
- data/app/helpers/images_helper.rb +7 -0
- data/app/mailers/concerns/mailers/base.rb +16 -0
- data/app/mailers/devise_mailer.rb +10 -0
- data/app/mailers/user_mailer.rb +24 -0
- data/app/models/concerns/invitations/{core.rb → base.rb} +1 -1
- data/app/models/concerns/memberships/{core.rb → base.rb} +1 -1
- data/app/models/concerns/teams/{core.rb → base.rb} +1 -1
- data/app/models/concerns/users/{core.rb → base.rb} +1 -1
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +30 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +17 -0
- data/app/views/devise/passwords/new.html.erb +20 -0
- data/app/views/devise/registrations/_two_factor.html.erb +42 -0
- data/app/views/devise/registrations/edit.html.erb +43 -0
- data/app/views/devise/registrations/new.html.erb +30 -0
- data/app/views/devise/sessions/new.html.erb +59 -0
- data/app/views/devise/sessions/pre_otp.js.erb +11 -0
- data/app/views/devise/shared/_links.html.erb +21 -0
- data/app/views/devise/shared/_oauth.html.erb +9 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/config/locales/en/devise.en.yml +110 -0
- data/config/routes.rb +40 -0
- data/lib/bullet_train/version.rb +1 -1
- metadata +44 -6
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2><%= t('devise.headers.resend_unlock') %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :email %><br />
|
8
|
+
<%= f.email_field :email, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="actions">
|
12
|
+
<%= f.submit t('devise.buttons.resend_unlock') %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
titles:
|
6
|
+
reset_password: Reset Your Password
|
7
|
+
sign_in: Sign In
|
8
|
+
headers:
|
9
|
+
resend_confirm: Resend Confirmation Instructions
|
10
|
+
change_password: Change Your Password
|
11
|
+
reset_password: Reset Password
|
12
|
+
edit_registration: Edit %{resource_name}
|
13
|
+
cancel_account: Cancel My Account
|
14
|
+
create_account: Create Your Account
|
15
|
+
sign_in: Sign In
|
16
|
+
resend_unlock: Resend Unlock Instructions
|
17
|
+
labels:
|
18
|
+
wait_confirm: "Currently waiting confirmation for: %{unconfirmed_email}"
|
19
|
+
hints:
|
20
|
+
leave_blank: (leave blank if you don't want to change it)
|
21
|
+
length: '%{password_length} characters minimum'
|
22
|
+
need_password: (we need your current password to confirm your changes)
|
23
|
+
buttons:
|
24
|
+
resend_confirm: Resend Confirmation Instructions
|
25
|
+
change_password: Change My Password
|
26
|
+
reset_password: Reset Password by Email
|
27
|
+
cancel_account: Cancel My Account
|
28
|
+
resend_unlock: Resend Unlock Instructions
|
29
|
+
links:
|
30
|
+
account: Don't have an account?
|
31
|
+
have_account: Already have an account?
|
32
|
+
forgot_password: Forgot your password?
|
33
|
+
log_in: Log In
|
34
|
+
sign_up: Sign Up
|
35
|
+
new_confirm: Didn't receive confirmation instructions?
|
36
|
+
new_unlock: Didn't receive unlock instructions?
|
37
|
+
sign_in_with: Sign in with %{provider}
|
38
|
+
|
39
|
+
confirmations:
|
40
|
+
confirmed: "Your email address has been successfully confirmed."
|
41
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
42
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
43
|
+
failure:
|
44
|
+
already_authenticated: "You are already signed in."
|
45
|
+
inactive: "Your account is not activated yet."
|
46
|
+
invalid: "Invalid %{authentication_keys} or Password."
|
47
|
+
locked: "Your account is locked."
|
48
|
+
last_attempt: "You have one more attempt before your account is locked."
|
49
|
+
not_found_in_database: "Invalid %{authentication_keys} or Password."
|
50
|
+
timeout: "Your session expired. Please sign in again to continue."
|
51
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
52
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
53
|
+
mailer:
|
54
|
+
confirmation_instructions:
|
55
|
+
subject: "Confirmation instructions"
|
56
|
+
welcome: Welcome %{email}!
|
57
|
+
description: 'You can confirm your account email through the link below:'
|
58
|
+
confirm_account: Confirm my account
|
59
|
+
reset_password_instructions:
|
60
|
+
subject: "Reset password instructions"
|
61
|
+
hello: Hello %{email}!
|
62
|
+
requested_change: Someone has requested a link to change your password. You can do this through the link below.
|
63
|
+
ignore: If you didn't request this, please ignore this email.
|
64
|
+
access_change: Your password won't change until you access the link above and create a new one.
|
65
|
+
change_password: Change my password
|
66
|
+
unlock_instructions:
|
67
|
+
subject: "Unlock instructions"
|
68
|
+
hello: Hello %{email}!
|
69
|
+
account_blocked: Your account has been locked due to an excessive number of unsuccessful sign in attempts.
|
70
|
+
click_link: 'Click the link below to unlock your account:'
|
71
|
+
unlock: Unlock my account
|
72
|
+
password_change:
|
73
|
+
subject: "Password Changed"
|
74
|
+
hello: Hello %{email}!
|
75
|
+
description: We're contacting you to notify you that your password has been changed.
|
76
|
+
omniauth_callbacks:
|
77
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
78
|
+
success: "Successfully authenticated from %{kind} account."
|
79
|
+
passwords:
|
80
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
81
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
82
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
83
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
84
|
+
updated_not_active: "Your password has been changed successfully."
|
85
|
+
registrations:
|
86
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
87
|
+
signed_up: "Welcome! You have signed up successfully."
|
88
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
89
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
90
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
91
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
92
|
+
updated: "Your account has been updated successfully."
|
93
|
+
sessions:
|
94
|
+
signed_in: "Signed in successfully."
|
95
|
+
signed_out: "Signed out successfully."
|
96
|
+
already_signed_out: "Signed out successfully."
|
97
|
+
unlocks:
|
98
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
99
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
100
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
101
|
+
errors:
|
102
|
+
messages:
|
103
|
+
already_confirmed: "was already confirmed, please try signing in"
|
104
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
105
|
+
expired: "has expired, please request a new one"
|
106
|
+
not_found: "not found"
|
107
|
+
not_locked: "was not locked"
|
108
|
+
not_saved:
|
109
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
110
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/routes.rb
CHANGED
@@ -1,2 +1,42 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
+
namespace :account do
|
3
|
+
shallow do
|
4
|
+
resource :two_factor, only: [:create, :destroy]
|
5
|
+
|
6
|
+
# user-level onboarding tasks.
|
7
|
+
namespace :onboarding do
|
8
|
+
resources :user_details
|
9
|
+
resources :user_email
|
10
|
+
end
|
11
|
+
|
12
|
+
# user specific resources.
|
13
|
+
resources :users
|
14
|
+
|
15
|
+
# team-level resources.
|
16
|
+
resources :teams do
|
17
|
+
resources :invitations do
|
18
|
+
member do
|
19
|
+
get :accept
|
20
|
+
post :accept
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
resources :memberships do
|
25
|
+
member do
|
26
|
+
post :demote
|
27
|
+
post :promote
|
28
|
+
post :reinvite
|
29
|
+
end
|
30
|
+
|
31
|
+
collection do
|
32
|
+
get :search
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
member do
|
37
|
+
post :switch_to
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
2
42
|
end
|
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.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -41,16 +41,38 @@ files:
|
|
41
41
|
- app/controllers/account/onboarding/user_email_controller.rb
|
42
42
|
- app/controllers/account/teams_controller.rb
|
43
43
|
- app/controllers/account/users_controller.rb
|
44
|
+
- app/controllers/concerns/account/invitations/controller_base.rb
|
45
|
+
- app/controllers/concerns/account/memberships/controller_base.rb
|
46
|
+
- app/controllers/concerns/account/onboarding/user_details/controller_base.rb
|
47
|
+
- app/controllers/concerns/account/onboarding/user_email/controller_base.rb
|
48
|
+
- app/controllers/concerns/account/teams/controller_base.rb
|
49
|
+
- app/controllers/concerns/account/users/controller_base.rb
|
50
|
+
- app/controllers/concerns/registrations/controller_base.rb
|
51
|
+
- app/controllers/concerns/sessions/controller_base.rb
|
52
|
+
- app/controllers/registrations_controller.rb
|
53
|
+
- app/controllers/sessions_controller.rb
|
54
|
+
- app/helpers/account/buttons_helper.rb
|
55
|
+
- app/helpers/account/dates_helper.rb
|
56
|
+
- app/helpers/account/forms_helper.rb
|
44
57
|
- app/helpers/account/invitations_helper.rb
|
58
|
+
- app/helpers/account/locale_helper.rb
|
59
|
+
- app/helpers/account/markdown_helper.rb
|
45
60
|
- app/helpers/account/memberships_helper.rb
|
61
|
+
- app/helpers/account/role_helper.rb
|
46
62
|
- app/helpers/account/teams_helper.rb
|
47
63
|
- app/helpers/account/users_helper.rb
|
64
|
+
- app/helpers/attributes_helper.rb
|
65
|
+
- app/helpers/email_helper.rb
|
66
|
+
- app/helpers/images_helper.rb
|
48
67
|
- app/helpers/invitation_only_helper.rb
|
49
68
|
- app/helpers/invitations_helper.rb
|
50
|
-
- app/
|
51
|
-
- app/
|
52
|
-
- app/
|
53
|
-
- app/models/concerns/
|
69
|
+
- app/mailers/concerns/mailers/base.rb
|
70
|
+
- app/mailers/devise_mailer.rb
|
71
|
+
- app/mailers/user_mailer.rb
|
72
|
+
- app/models/concerns/invitations/base.rb
|
73
|
+
- app/models/concerns/memberships/base.rb
|
74
|
+
- app/models/concerns/teams/base.rb
|
75
|
+
- app/models/concerns/users/base.rb
|
54
76
|
- app/models/invitation.rb
|
55
77
|
- app/models/invitations.rb
|
56
78
|
- app/models/membership.rb
|
@@ -91,6 +113,22 @@ files:
|
|
91
113
|
- app/views/account/users/_form.html.erb
|
92
114
|
- app/views/account/users/edit.html.erb
|
93
115
|
- app/views/account/users/show.html.erb
|
116
|
+
- app/views/devise/confirmations/new.html.erb
|
117
|
+
- app/views/devise/mailer/confirmation_instructions.html.erb
|
118
|
+
- app/views/devise/mailer/password_change.html.erb
|
119
|
+
- app/views/devise/mailer/reset_password_instructions.html.erb
|
120
|
+
- app/views/devise/mailer/unlock_instructions.html.erb
|
121
|
+
- app/views/devise/passwords/edit.html.erb
|
122
|
+
- app/views/devise/passwords/new.html.erb
|
123
|
+
- app/views/devise/registrations/_two_factor.html.erb
|
124
|
+
- app/views/devise/registrations/edit.html.erb
|
125
|
+
- app/views/devise/registrations/new.html.erb
|
126
|
+
- app/views/devise/sessions/new.html.erb
|
127
|
+
- app/views/devise/sessions/pre_otp.js.erb
|
128
|
+
- app/views/devise/shared/_links.html.erb
|
129
|
+
- app/views/devise/shared/_oauth.html.erb
|
130
|
+
- app/views/devise/unlocks/new.html.erb
|
131
|
+
- config/locales/en/devise.en.yml
|
94
132
|
- config/locales/en/invitations.en.yml
|
95
133
|
- config/locales/en/memberships.en.yml
|
96
134
|
- config/locales/en/onboarding/user_details.en.yml
|