From 229fcc18b7e6f4245ee4fc7b48639b259934ce2b Mon Sep 17 00:00:00 2001 From: freddii Date: Thu, 28 Jan 2021 06:09:37 +0100 Subject: [PATCH] chore: fixed typos in code comments (#1701) --- Gemfile | 2 +- app/controllers/api/v1/widget/contacts_controller.rb | 2 +- app/javascript/dashboard/routes/login/Login.vue | 2 +- app/mailers/application_mailer.rb | 2 +- app/models/concerns/reauthorizable.rb | 4 ++-- spec/actions/contact_identify_action_spec.rb | 2 +- spec/controllers/api/v1/accounts/contacts_controller_spec.rb | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 7e7e6ea97..b719156ef 100644 --- a/Gemfile +++ b/Gemfile @@ -27,7 +27,7 @@ gem 'uglifier' gem 'flag_shih_tzu' # Random name generator for user names gem 'haikunator' -# Template parsing safetly +# Template parsing safely gem 'liquid' # Parse Markdown to HTML gem 'redcarpet' diff --git a/app/controllers/api/v1/widget/contacts_controller.rb b/app/controllers/api/v1/widget/contacts_controller.rb index 1fca2ee81..ad818d7ac 100644 --- a/app/controllers/api/v1/widget/contacts_controller.rb +++ b/app/controllers/api/v1/widget/contacts_controller.rb @@ -12,7 +12,7 @@ class Api::V1::Widget::ContactsController < Api::V1::Widget::BaseController def process_hmac return if params[:identifier_hash].blank? - raise StandardError, 'HMAC failed: Invalid Identifer Hash Provided' unless valid_hmac? + raise StandardError, 'HMAC failed: Invalid Identifier Hash Provided' unless valid_hmac? @contact_inbox.update(hmac_verified: true) end diff --git a/app/javascript/dashboard/routes/login/Login.vue b/app/javascript/dashboard/routes/login/Login.vue index 1dfa6625d..24541da90 100644 --- a/app/javascript/dashboard/routes/login/Login.vue +++ b/app/javascript/dashboard/routes/login/Login.vue @@ -143,7 +143,7 @@ export default { this.showAlert(this.$t('LOGIN.API.SUCCESS_MESSAGE')); }) .catch(response => { - // Reset URL Params if the authenication is invalid + // Reset URL Params if the authentication is invalid if (this.email) { window.location = '/app/login'; } diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index bfc6b249e..9513056fe 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -24,7 +24,7 @@ class ApplicationMailer < ActionMailer::Base def send_mail_with_liquid(*args) mail(*args) do |format| - # explored sending a multipart email containg both text type and html + # explored sending a multipart email containing both text type and html # parsing the html with nokogiri will remove the links as well # might also remove tags like b,li etc. so lets rethink about this later # format.text { Nokogiri::HTML(render(layout: false)).text } diff --git a/app/models/concerns/reauthorizable.rb b/app/models/concerns/reauthorizable.rb index 960e57322..6e2433482 100644 --- a/app/models/concerns/reauthorizable.rb +++ b/app/models/concerns/reauthorizable.rb @@ -1,4 +1,4 @@ -# This concern is primarily targetted for business models dependant on external services +# This concern is primarily targeted for business models dependent on external services # The auth tokens we obtained on their behalf could expire or becomes invalid. # We would be aware of it until we make the API call to the service and it throws error @@ -25,7 +25,7 @@ module Reauthorizable ::Redis::Alfred.get(authorization_error_count_key).to_i end - # action to be performed when we recieve authorization errors + # action to be performed when we receive authorization errors # Implement in your exception handling logic for authorization errors def authorization_error! ::Redis::Alfred.incr(authorization_error_count_key) diff --git a/spec/actions/contact_identify_action_spec.rb b/spec/actions/contact_identify_action_spec.rb index bb635359f..dd09f7760 100644 --- a/spec/actions/contact_identify_action_spec.rb +++ b/spec/actions/contact_identify_action_spec.rb @@ -13,7 +13,7 @@ describe ::ContactIdentifyAction do expect(ContactAvatarJob).not_to receive(:perform_later).with(contact, params[:avatar_url]) contact_identify expect(contact.reload.name).to eq 'test' - # custom attributes are merged properly without overwritting existing ones + # custom attributes are merged properly without overwriting existing ones expect(contact.custom_attributes).to eq({ 'test' => 'new test', 'test1' => 'test1', 'test2' => 'test2' }) expect(contact.reload.identifier).to eq 'test_id' end diff --git a/spec/controllers/api/v1/accounts/contacts_controller_spec.rb b/spec/controllers/api/v1/accounts/contacts_controller_spec.rb index 413b9cd94..e419656cb 100644 --- a/spec/controllers/api/v1/accounts/contacts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/contacts_controller_spec.rb @@ -217,7 +217,7 @@ RSpec.describe 'Contacts API', type: :request do expect(response).to have_http_status(:success) expect(contact.reload.name).to eq('Test Blub') - # custom attributes are merged properly without overwritting existing ones + # custom attributes are merged properly without overwriting existing ones expect(contact.custom_attributes).to eq({ 'test' => 'new test', 'test1' => 'test1', 'test2' => 'test2' }) end