Skip to content

Commit e597fad

Browse files
authored
Merge pull request #1510 from fatfreecrm/improve-hooks
Add codespell to devcontainer
2 parents b4fea41 + 61d7f5d commit e597fad

29 files changed

Lines changed: 75 additions & 64 deletions

.codespellrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
skip = *.log,*.cache,./tmp/*,./config/locales/*,./vendor/*,./lib/tasks/ffcrm/update_data.rake
4+
5+
# Comma separated list of words to be ignored. Words must be lowercased.
6+
ignore-words-list = uncomplete,outter,isnt,rememberable

.devcontainer/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ sudo add-apt-repository -y ppa:mozillateam/ppa
44

55
echo -e "Package: firefox*\nPin: release o=LP-PPA-mozillateam-ppa\nPin-Priority: 550\n\nPackage: firefox*\nPin: release o=Ubuntu\nPin-Priority: -1" | sudo tee /etc/apt/preferences.d/99-mozillateamppa
66

7+
cp script/sample_hooks/pre-commit/ .git/hooks/
8+
79
sudo apt-get update
810

911
sudo apt install -y libpq-dev # Not strictly needed, but easier than explaining to users to constantly pass DB=sqlite
1012
sudo apt install -y firefox
13+
sudo apt install -y codespell
1114

1215
bundle
1316

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Sat Apr 21, 2018 (0.18.0)
248248
#665 Support for Ruby 2.3 has been dropped, with test coverage for 2.4 and 2.5 enabled.
249249

250250
#### Swap to FactoryBot
251-
If you consume fat free crm as an engine and re-use any factories, you'll need to [upgrade to FactoryBot](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md).
251+
If you consume fat free crm as an engine and reuse any factories, you'll need to [upgrade to FactoryBot](https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md).
252252

253253
#### Removed methods
254254
`Lead.update_with_permissions` is removed, use user_ids and group_ids inside attributes instead and call lead.update_with_account_and_lead_counters
@@ -366,7 +366,7 @@ Be aware of https://github.com/rails/sprockets/issues/426 if you were using FFCR
366366

367367
Thu Feb 23, 2017 (0.15.0-beta.2)
368368
---------------------------------------------------------------------
369-
This release is aimed at minor updates and ruby 2.4 compatability via
369+
This release is aimed at minor updates and ruby 2.4 compatibility via
370370
the relevant rails updates.
371371

372372
Other improvements include:
@@ -460,7 +460,7 @@ https://github.com/fatfreecrm/fat_free_crm/compare/v0.13.2...v0.13.3
460460
---------------------------------------------------------------------
461461
- Lock down routes.
462462
- Remove stub hook
463-
- Remove unneccessary function
463+
- Remove unnecessary function
464464
- Don't spam gmail by default
465465
- consider_all_requests_local should be off by default in production mode
466466
- Remove pysch by default (optimise for ruby 2 now)
@@ -694,7 +694,7 @@ Thu, Aug 5, 2010
694694

695695
Wed, Aug 4, 2010
696696
---------------------------------------------------------------------
697-
- Made dropbox email address comparision was case-insensitve (thanks, Ralf!)
697+
- Made dropbox email address comparison was case-insensitive (thanks, Ralf!)
698698
- Removed duplicate association Opportunity#account (was: has_one + belongs_to) (thanks, Ralf!)
699699
- Multiple fixes for Rails 2.3.8 upgrade (thanks, Ralf!)
700700

@@ -772,7 +772,7 @@ Tue, Jun 8, 2010
772772

773773
Fri, Jun 4, 2010
774774
---------------------------------------------------------------------
775-
- Initial prototype of seleting related asset from the asset's landing page.
775+
- Initial prototype of selecting related asset from the asset's landing page.
776776
- Added discard action related specs.
777777

778778
Fri, May 28, 2010
@@ -2340,7 +2340,7 @@ Sun, Dec 14, 2008
23402340

23412341
Sat, Dec 13, 2008
23422342
---------------------------------------------------------------------
2343-
- Insalled [annotate_models] plugin and generated model annotations.
2343+
- Installed [annotate_models] plugin and generated model annotations.
23442344
- Generated campaign fixtures.
23452345
- Updated [Campaign] model to include actual vs. targets.
23462346
- Added permissions to [Campaign/New].
@@ -2359,7 +2359,7 @@ Wed, Dec 10, 2008
23592359

23602360
Tue, Dec 9, 2008
23612361
---------------------------------------------------------------------
2362-
- Implemented [Campaing/New] with dates validation and status set.
2362+
- Implemented [Campaign/New] with dates validation and status set.
23632363

23642364
Mon, Dec 8, 2008
23652365
---------------------------------------------------------------------

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ gem 'mini_magick'
115115
gem 'image_processing', '~> 1.2'
116116
gem 'jquery-ui-rails', git: 'https://github.com/jquery-ui-rails/jquery-ui-rails.git', tag: 'v7.0.0' # See https://github.com/jquery-ui-rails/jquery-ui-rails/issues/146
117117

118-
# Ruby 3.4 explict dependencies
118+
# Ruby 3.4 explicit dependencies
119119
gem 'bigdecimal'
120120
gem 'mutex_m'
121121
gem 'drb'

app/controllers/comments_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def create
5959

6060
# PUT /comments/1
6161
# PUT /comments/1.json
62-
# PUT /comments/1.xml not implemened
62+
# PUT /comments/1.xml not implemented
6363
#----------------------------------------------------------------------------
6464
def update
6565
@comment = Comment.find(params[:id])

app/controllers/home_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def activity_event
130130

131131
#----------------------------------------------------------------------------
132132
# TODO: this is ugly, ugly code. It's being security patched now but urgently
133-
# needs refactoring to use user id instead. Permuations based on name or email
133+
# needs refactoring to use user id instead. Permutations based on name or email
134134
# yield incorrect results.
135135
def activity_user
136136
return nil if current_user.pref[:activity_user] == "all_users"

app/controllers/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
77
#------------------------------------------------------------------------------
88
class UsersController < ApplicationController
9-
before_action :set_current_tab, only: %i[show opportunities_overview] # Don't hightlight any tabs.
9+
before_action :set_current_tab, only: %i[show opportunities_overview] # Don't highlight any tabs.
1010

1111
check_authorization
1212

app/helpers/application_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def size_from_style!(options)
319319

320320
# Entities can have associated avatars or gravatars. Only calls Gravatar
321321
# in production env. Gravatar won't serve default images if they are not
322-
# publically available: https://en.gravatar.com/site/implement/images
322+
# public: https://en.gravatar.com/site/implement/images
323323
#----------------------------------------------------------------------------
324324
def avatar_for(model, args = {})
325325
args = { class: 'gravatar', size: :large }.merge(args)

app/mailers/subscription_mailer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def comment_notification(user, comment)
1414
@comment = comment
1515
@user = comment.user
1616

17-
# If entity has tags, join them and wrap in parantheses
17+
# If entity has tags, join them and wrap in parentheses
1818
subject = "RE: [#{@entity_type.downcase}:#{@entity.id}] #{@entity_name}"
1919
subject += " (#{@entity.tags.join(', ')})" if @entity.tags.any?
2020

app/models/observers/opportunity_observer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def after_update(item)
2525
update_campaign_revenue(item.campaign, item.amount.to_f - item.discount.to_f)
2626
item.update_attribute(:probability, 100) # Set probability to 100% if won
2727
log_activity(item, :won)
28-
elsif original.stage == "won" && item.stage != "won" # :won to :other -- substract from total campaign revenue.
28+
elsif original.stage == "won" && item.stage != "won" # :won to :other -- subtract from total campaign revenue.
2929
update_campaign_revenue(original.campaign, -(original.amount.to_f - original.discount.to_f))
3030
elsif original.stage != "lost" && item.stage == "lost"
3131
item.update_attribute(:probability, 0) # Set probability to 0% if lost

0 commit comments

Comments
 (0)