From 10d5504961c6a2196bf29ec95630e2ddafdc1413 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 28 Oct 2024 20:02:10 +0100 Subject: [PATCH] Fix typos (#108) Found with ``` codespell **/*.rb **/*.md ``` --- CHANGELOG.md | 10 +++++----- README.md | 4 ++-- lib/active_record_extended/query_methods/json.rb | 2 +- spec/sql_inspections/arel/array_spec.rb | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e88043..909a6c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,11 +153,11 @@ Overall Examples: # 1.2.0 - August 11th 2019 ## Changes -- Introduce `.foster_select` a helper for select statements that can handel aliasing and provides casting options for many common aggregate functions. +- Introduce `.foster_select` a helper for select statements that can handle aliasing and provides casting options for many common aggregate functions. Supports any aggregate that does not require multiple arguments (`COUNT`, `AVG`, `MAX`, `ARRAY_AGG`, etc..): [Aggregate Functions](https://www.postgresql.org/docs/current/functions-aggregate.html) - Supports Aggregate `DISTINCT` and `ORDER BY` inner expressions. - Reduced the code foot-print for declaring new Arel functions -- Introduce new `Arel::Nodes::AggregateFunctionName` for dealing with inline-ing `ORDER BY` (will be expanded to handel `FILTER` next) +- Introduce new `Arel::Nodes::AggregateFunctionName` for dealing with inline-ing `ORDER BY` (will be expanded to handle `FILTER` next) - Code cleanup and some minor performance tweaks ##### Changes to `.select_row_to_json` @@ -196,7 +196,7 @@ Add support for Postgres Union types and refactor Arel building process into a s - or `.union.as` - `order_union` (ORDER BY) - or `.union.order` -- `.reorder_union` (overides previously set `.order_union`) +- `.reorder_union` (overrides previously set `.order_union`) - or `union.reorder` ## JSON Query Commands @@ -208,7 +208,7 @@ Add support for Postgres Union types and refactor Arel building process into a s # 0.7.0 - September 22nd 2018 -Add support for Postgres Commend Table Expression (CTE) methods. +Add support for Postgres Common Table Expression (CTE) methods. - `.with/1` - `.with.recursive/1` @@ -291,7 +291,7 @@ Added ActiveRecord Where Chain Functionality: Major thanks to [Dan McClain author of Postgres Ext](https://github.com/dockyard/postgres_ext) -Added ActiveRecord Base Extentions +Added ActiveRecord Base Extensions - .either_order/2 - .either_join/2 diff --git a/README.md b/README.md index 10836bb..c0ca16a 100644 --- a/README.md +++ b/README.md @@ -560,7 +560,7 @@ As a means for taking complex query logic and transform them into a single or m **Options:** - `as`: [Symbol or String] (defaults to `"results"`): What the column will be aliased to - - `value`: [Symbol or String] (defaults to `key` argument): How the response should handel the json value return + - `value`: [Symbol or String] (defaults to `key` argument): How the response should handle the json value return See the included example on [Row To JSON](#row-to-json) to see it in action. @@ -606,7 +606,7 @@ There's an issue with providing a single union clause and chaining it with a dif This is due to requirements of grouping SQL statements. The issue is being working on, but with no ETA. This issue only applies to the first initial set of unions and is recommended that you union two relations right off the bat. -Afterwords you can union/chain single relations. +Afterwards you can union/chain single relations. Example diff --git a/lib/active_record_extended/query_methods/json.rb b/lib/active_record_extended/query_methods/json.rb index 5e44c24..92c6605 100644 --- a/lib/active_record_extended/query_methods/json.rb +++ b/lib/active_record_extended/query_methods/json.rb @@ -263,7 +263,7 @@ def select_row_to_json(from = nil, **options, &block) # - as: [Symbol or String] (default="results"): What the column will be aliased to # # - # - value: [Symbol or String] (defaults=[key]): How the response should handel the json value return + # - value: [Symbol or String] (defaults=[key]): How the response should handle the json value return # # Example: # diff --git a/spec/sql_inspections/arel/array_spec.rb b/spec/sql_inspections/arel/array_spec.rb index f69951d..9b1340a 100644 --- a/spec/sql_inspections/arel/array_spec.rb +++ b/spec/sql_inspections/arel/array_spec.rb @@ -55,7 +55,7 @@ expect(query).to match_regex(/'tag' = ALL\("users"\."tags"\)/) end - it "create all predicates that contain a interger value" do + it "create all predicates that contain a integer value" do query = arel_table.where(arel_table[:tags].all(2)).to_sql expect(query).to match_regex(/2 = ALL\("users"\."tags"\)/) end