From dc62136642f7fa929329cb55658619d80f6dcf45 Mon Sep 17 00:00:00 2001
From: Kuba Brecka <kuba.brecka@gmail.com>
Date: Wed, 6 Mar 2013 08:52:24 +0100
Subject: [PATCH] various typos in comments

---
 app/models/post.rb      | 2 +-
 app/models/user.rb      | 2 +-
 lib/content_buffer.rb   | 2 +-
 lib/diff_engine.rb      | 2 +-
 lib/distributed_hash.rb | 2 +-
 lib/image_optimizer.rb  | 2 +-
 lib/image_sizer.rb      | 2 +-
 lib/slug.rb             | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app/models/post.rb b/app/models/post.rb
index d8fad3970..fc42d8d21 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -443,7 +443,7 @@ class Post < ActiveRecord::Base
     self.quote_count = quoted_post_numbers.size
   end
 
-  # Process this post after comitting it
+  # Process this post after committing it
   def trigger_post_process
     args = { post_id: id }
     args[:image_sizes] = image_sizes if image_sizes.present?
diff --git a/app/models/user.rb b/app/models/user.rb
index 1300cc3d3..b32d5d9a8 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -347,7 +347,7 @@ class User < ActiveRecord::Base
   end
 
   # The following count methods are somewhat slow - definitely don't use them in a loop.
-  # They might need to be denormialzied
+  # They might need to be denormalized
   def like_count
     UserAction.where(user_id: id, action_type: UserAction::WAS_LIKED).count
   end
diff --git a/lib/content_buffer.rb b/lib/content_buffer.rb
index f448b7ce9..99d176d4c 100644
--- a/lib/content_buffer.rb
+++ b/lib/content_buffer.rb
@@ -1,4 +1,4 @@
-# this class is used to track changes to an arbirary buffer
+# this class is used to track changes to an arbitrary buffer
 
 class ContentBuffer
 
diff --git a/lib/diff_engine.rb b/lib/diff_engine.rb
index 7c9208fa4..52de01534 100644
--- a/lib/diff_engine.rb
+++ b/lib/diff_engine.rb
@@ -9,7 +9,7 @@ class DiffEngine
   # generate an html friendly diff similar to the way Stack Exchange generate
   #  html diffs
   #
-  #  retruns: html containing decorations indicating the changes
+  #  returns: html containing decorations indicating the changes
   def self.html_diff(html_before, html_after)
   end
 
diff --git a/lib/distributed_hash.rb b/lib/distributed_hash.rb
index 4d0cf658c..b53f8472d 100644
--- a/lib/distributed_hash.rb
+++ b/lib/distributed_hash.rb
@@ -1,4 +1,4 @@
-# Like a hash, just does its best to stay in sync accross the farm
+# Like a hash, just does its best to stay in sync across the farm
 #
 # Redis backed with an allowance for a certain amount of latency
 
diff --git a/lib/image_optimizer.rb b/lib/image_optimizer.rb
index 709bf68f3..13bdbf764 100644
--- a/lib/image_optimizer.rb
+++ b/lib/image_optimizer.rb
@@ -28,7 +28,7 @@ class ImageOptimizer
   def clear_local!
   end
 
-  # yeild a list of relative paths to local images cached
+  # yield a list of relative paths to local images cached
   def each_local
   end
 
diff --git a/lib/image_sizer.rb b/lib/image_sizer.rb
index 58b858adf..18e8d16d8 100644
--- a/lib/image_sizer.rb
+++ b/lib/image_sizer.rb
@@ -10,7 +10,7 @@ module ImageSizer
 
     return [w.floor, h.floor] if w < max_width
 
-    # Using the maximum width, resize the heigh retaining the aspect ratio
+    # Using the maximum width, resize the height retaining the aspect ratio
     [max_width.floor, (h * (max_width / w)).floor]
   end
 
diff --git a/lib/slug.rb b/lib/slug.rb
index 8ce5ec74b..08555448f 100644
--- a/lib/slug.rb
+++ b/lib/slug.rb
@@ -1,6 +1,6 @@
 # encoding: utf-8
 
-# Generates a slug. This is annoying beacuse it's duplicating what the javascript
+# Generates a slug. This is annoying because it's duplicating what the javascript
 # does, but on the other hand slugs are never matched so it's okay if they differ
 # a little.
 module Slug