Skip to content

Commit

Permalink
Run spellcheck as part of CI pipeline (mitre-cyber-academy#531)
Browse files Browse the repository at this point in the history
* Install hunspell as part of the CI pipeline
  • Loading branch information
camdenmoors authored Jul 28, 2020
1 parent 7355dc0 commit b9418f6
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 347 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
restore-keys: |
${{ runner.os }}-gems-
- name: Install hunspell library
run: |
sudo apt install hunspell
- name: Install ruby gems
run: |
bundle config path vendor/bundle
Expand All @@ -51,6 +55,7 @@ jobs:
bundle exec bundle-audit check --update --ignore CVE-2016-10735 CVE-2019-8331
bundle exec rails db:create
bundle exec rails test
bundle exec rails spellcheck
bundle exec rubocop
- name: Upload coverage results
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ end
group :test do
gem 'brakeman', require: false
gem 'bundler-audit', require: false
gem 'ffi-hunspell'
gem 'rails-controller-testing'
gem 'rubocop', require: false
gem 'rubocop-rails'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ GEM
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.13.1)
ffi-hunspell (0.5.0)
ffi (~> 1.0)
filterrific (5.2.1)
formtastic (3.1.5)
actionpack (>= 3.2.13)
Expand Down Expand Up @@ -378,6 +380,7 @@ DEPENDENCIES
devise
factory_bot_rails
faker
ffi-hunspell
filterrific
formtastic
geocoder
Expand Down
123 changes: 75 additions & 48 deletions config/locales/devise.en.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,94 @@
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n

en:
errors:
messages:
expired: "has expired, please request a new one"
not_found: "not found"
already_confirmed: "was already confirmed, please try signing in"
not_locked: "was not locked"
expired: 'has expired, please request a new one'
not_found: not found
already_confirmed: 'was already confirmed, please try signing in'
not_locked: was not locked
not_saved:
one: "1 error prohibited this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:"

one: '1 error prohibited this %{resource} from being saved:'
other: '%{count} errors prohibited this %{resource} from being saved:'
devise:
failure:
already_authenticated: 'You are already signed in.'
unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
locked: 'Your account is locked.'
invalid: 'Invalid email or password.'
invalid_token: 'Invalid authentication token.'
already_authenticated: You are already signed in.
unauthenticated: You need to sign in or sign up before continuing.
unconfirmed: You have to confirm your account before continuing.
locked: Your account is locked.
invalid: Invalid email or password.
invalid_token: Invalid authentication token.
timeout: 'Your session expired, please sign in again to continue.'
inactive: 'Your account was not activated yet.'
inactive: Your account was not activated yet.
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
signed_in: Signed in successfully.
signed_out: Signed out successfully.
passwords:
reset: 'Reset your password'
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
updated_not_active: 'Your password was changed successfully.'
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."
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."
reset: Reset your password
send_instructions: >-
You will receive an email with instructions about how to reset your
password in a few minutes.
updated: Your password was changed successfully. You are now signed in.
updated_not_active: Your password was changed successfully.
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.
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.
confirmations:
resend_email: 'Resend confirmation email'
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. Please sign in.'
resend_email: Resend confirmation email
send_instructions: >-
You will receive an email with instructions about how to confirm your
account in a few minutes.
send_paranoid_instructions: >-
If your email address exists in our database, you will receive an email
with instructions about how to confirm your account in a few minutes.
confirmed: Your account was successfully confirmed. Please sign in.
registrations:
signed_up: 'Welcome! You have signed up successfully.'
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
updated: 'You updated your account successfully.'
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
captain_tried_to_destroy: 'Team captains must promote a team member to team captain before deleting their account.'
password_needed_destroy: 'You need to provide your current password to delete your account.'
recaptcha_failed: 'Potential bot activity detected. Please ensure that Javascript is enabled in your browser and try again.'
new_user: 'Register a new user'
signed_up: Welcome! You have signed up successfully.
signed_up_but_unconfirmed: >-
A message with a confirmation link has been sent to your email address.
Please open the link to activate your account.
signed_up_but_inactive: >-
You have signed up successfully. However, we could not sign you in
because your account is not yet activated.
signed_up_but_locked: >-
You have signed up successfully. However, we could not sign you in
because your account is locked.
updated: You updated your account successfully.
update_needs_confirmation: >-
You updated your account successfully, but we need to verify your new
email address. Please check your email and click on the confirm link to
finalize confirming your new email address.
destroyed: >-
Bye! Your account was successfully canceled. We hope to see you again
soon.
captain_tried_to_destroy: >-
Team captains must promote a team member to team captain before deleting
their account.
password_needed_destroy: You need to provide your current password to delete your account.
recaptcha_failed: >-
Potential bot activity detected. Please ensure that JavaScript is
enabled in your browser and try again.
new_user: Register a new user
unlocks:
resend: 'Resend unlock instructions'
missing_instructions: "Didn't receive unlock instructions?"
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
resend: Resend unlock instructions
missing_instructions: Didn't receive unlock instructions?
send_instructions: >-
You will receive an email with instructions about how to unlock your
account in a few minutes.
unlocked: Your account has been unlocked successfully. Please sign in to continue.
send_paranoid_instructions: >-
If your account exists, you will receive an email with instructions
about how to unlock it in a few minutes.
omniauth_callbacks:
sign_in_with: "Sign in with %{provider}"
sign_in_with: 'Sign in with %{provider}'
success: 'Successfully authenticated from %{kind} account.'
failure: 'Could not authenticate you from %{kind} because "%{reason}".'
mailer:
confirmation_instructions:
subject: 'Confirmation instructions'
subject: Confirmation instructions
reset_password_instructions:
subject: 'Reset password instructions'
subject: Reset password instructions
unlock_instructions:
subject: 'Unlock Instructions'
subject: Unlock Instructions
Loading

0 comments on commit b9418f6

Please sign in to comment.