chore: fixed typos in code comments (#1701)
This commit is contained in:
parent
b93388b330
commit
229fcc18b7
7 changed files with 8 additions and 8 deletions
2
Gemfile
2
Gemfile
|
@ -27,7 +27,7 @@ gem 'uglifier'
|
||||||
gem 'flag_shih_tzu'
|
gem 'flag_shih_tzu'
|
||||||
# Random name generator for user names
|
# Random name generator for user names
|
||||||
gem 'haikunator'
|
gem 'haikunator'
|
||||||
# Template parsing safetly
|
# Template parsing safely
|
||||||
gem 'liquid'
|
gem 'liquid'
|
||||||
# Parse Markdown to HTML
|
# Parse Markdown to HTML
|
||||||
gem 'redcarpet'
|
gem 'redcarpet'
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Api::V1::Widget::ContactsController < Api::V1::Widget::BaseController
|
||||||
|
|
||||||
def process_hmac
|
def process_hmac
|
||||||
return if params[:identifier_hash].blank?
|
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)
|
@contact_inbox.update(hmac_verified: true)
|
||||||
end
|
end
|
||||||
|
|
|
@ -143,7 +143,7 @@ export default {
|
||||||
this.showAlert(this.$t('LOGIN.API.SUCCESS_MESSAGE'));
|
this.showAlert(this.$t('LOGIN.API.SUCCESS_MESSAGE'));
|
||||||
})
|
})
|
||||||
.catch(response => {
|
.catch(response => {
|
||||||
// Reset URL Params if the authenication is invalid
|
// Reset URL Params if the authentication is invalid
|
||||||
if (this.email) {
|
if (this.email) {
|
||||||
window.location = '/app/login';
|
window.location = '/app/login';
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ class ApplicationMailer < ActionMailer::Base
|
||||||
|
|
||||||
def send_mail_with_liquid(*args)
|
def send_mail_with_liquid(*args)
|
||||||
mail(*args) do |format|
|
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
|
# 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
|
# might also remove tags like b,li etc. so lets rethink about this later
|
||||||
# format.text { Nokogiri::HTML(render(layout: false)).text }
|
# format.text { Nokogiri::HTML(render(layout: false)).text }
|
||||||
|
|
|
@ -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.
|
# 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
|
# 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
|
::Redis::Alfred.get(authorization_error_count_key).to_i
|
||||||
end
|
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
|
# Implement in your exception handling logic for authorization errors
|
||||||
def authorization_error!
|
def authorization_error!
|
||||||
::Redis::Alfred.incr(authorization_error_count_key)
|
::Redis::Alfred.incr(authorization_error_count_key)
|
||||||
|
|
|
@ -13,7 +13,7 @@ describe ::ContactIdentifyAction do
|
||||||
expect(ContactAvatarJob).not_to receive(:perform_later).with(contact, params[:avatar_url])
|
expect(ContactAvatarJob).not_to receive(:perform_later).with(contact, params[:avatar_url])
|
||||||
contact_identify
|
contact_identify
|
||||||
expect(contact.reload.name).to eq 'test'
|
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.custom_attributes).to eq({ 'test' => 'new test', 'test1' => 'test1', 'test2' => 'test2' })
|
||||||
expect(contact.reload.identifier).to eq 'test_id'
|
expect(contact.reload.identifier).to eq 'test_id'
|
||||||
end
|
end
|
||||||
|
|
|
@ -217,7 +217,7 @@ RSpec.describe 'Contacts API', type: :request do
|
||||||
|
|
||||||
expect(response).to have_http_status(:success)
|
expect(response).to have_http_status(:success)
|
||||||
expect(contact.reload.name).to eq('Test Blub')
|
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' })
|
expect(contact.custom_attributes).to eq({ 'test' => 'new test', 'test1' => 'test1', 'test2' => 'test2' })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue