From e00c6a01498da089ede3913698530d29aa0a7844 Mon Sep 17 00:00:00 2001 From: Adrian Sieber Date: Sat, 29 Sep 2018 10:55:57 +0000 Subject: [PATCH] Replace incorrect usage of "ordering" with "order" --- README.md | 4 ++-- doc/guide/010-routes.markdown | 2 +- doc/guide/020-data-backends.markdown | 4 ++-- src/Web/Sprinkles/Backends/Spec.hs | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c7fc0e0..0b68452 100644 --- a/README.md +++ b/README.md @@ -142,11 +142,11 @@ specs as-is; the full Ginger language is at your disposal here. #### Supported Backend Types -All backend specifications support at least the `type`, `fetch`, and `ordering` +All backend specifications support at least the `type`, `fetch`, and `order` keys in long-hand mode. `type` determines the backend type, `fetch` is one of `one`, `all`, or an integer for a fixed maximum number of items. `all` and numbered return a list of records, `one` returns just one record. For -`ordering`, the following are allowed: +`order`, the following are allowed: - "arbitrary": do not reorder, use whatever the backend produces - "random": random-shuffle results diff --git a/doc/guide/010-routes.markdown b/doc/guide/010-routes.markdown index 26d9a29..3cc02e3 100644 --- a/doc/guide/010-routes.markdown +++ b/doc/guide/010-routes.markdown @@ -49,7 +49,7 @@ rules: - # The "User Guide" section is also special, because it has a Table Of # Contents on every page, and the pages themselves have numbers prefixed so - # that ordering them by filename gives us the right ordering for the TOC. We + # that ordering them by filename gives us the right order for the TOC. We # don't want the numbering to appear in links / URLs though, so there's a bit # of magic added to make that possible. # diff --git a/doc/guide/020-data-backends.markdown b/doc/guide/020-data-backends.markdown index 4a55aaf..7783d84 100644 --- a/doc/guide/020-data-backends.markdown +++ b/doc/guide/020-data-backends.markdown @@ -13,11 +13,11 @@ options. # Supported Backend Types -All backend specifications support at least the `type`, `fetch`, and `ordering` +All backend specifications support at least the `type`, `fetch`, and `order` keys in long-hand mode. `type` determines the backend type, `fetch` is one of `one`, `all`, or an integer for a fixed maximum number of items. `all` and numbered return a list of records, `one` returns just one record. For -`ordering`, the following are allowed: +`order`, the following are allowed: - "arbitrary": do not reorder, use whatever the backend produces - "random": random-shuffle results diff --git a/src/Web/Sprinkles/Backends/Spec.hs b/src/Web/Sprinkles/Backends/Spec.hs index e3a72ee..5c1725c 100644 --- a/src/Web/Sprinkles/Backends/Spec.hs +++ b/src/Web/Sprinkles/Backends/Spec.hs @@ -183,15 +183,15 @@ instance ExpandableM Text BackendSpec where -- - n (numeric value): Fetch up to n items, as a list -- "fetch": fetchMode, -- --- // ordering. One of: +-- // order. One of: -- // - "arbitrary": do not reorder, use whatever the backend produces -- // - "random": random-shuffle results -- // - "shuffle": same as "random" -- // - "name": order by name -- // - "mtime": order by modification time --- // The ordering can be preceded with a "+" or "-" sign to indicate --- // ascending or descending ordering. --- "order": ordering, +-- // The order can be preceded with a "+" or "-" sign to indicate +-- // ascending or descending order. +-- "order": order, -- -- // The rest of the structure depends on the type. -- @@ -350,7 +350,7 @@ instance FromJSON FetchMode where parseJSON _ = fail "Invalid fetch mode (want 'one' or 'all')" -- | By which field should we order results? -data FetchOrderField = ArbitraryOrder -- ^ Do not impose any ordering at all +data FetchOrderField = ArbitraryOrder -- ^ Do not impose any order at all | RandomOrder -- ^ Shuffle randomly | OrderByName -- ^ Order by reported name | OrderByMTime -- ^ Order by modification time @@ -373,7 +373,7 @@ instance Default AscDesc where data FetchOrder = FetchOrder { fetchField :: FetchOrderField -- ^ By which field? - , fetchAscDesc :: AscDesc -- ^ Reverse ordering? + , fetchAscDesc :: AscDesc -- ^ Reverse order? } deriving (Show, Read, Eq, Generic)