From b16cf5d7c9f9f7ebfc7655da10355094eb58c660 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 8 Mar 2017 12:30:45 -0800 Subject: [PATCH 01/37] put pronoun examples in meta description for #56 --- src/pronouns/pages.clj | 6 ++++-- src/pronouns/util.clj | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index a9301e3..4940207 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -118,16 +118,18 @@ (defn format-pronoun-examples [pronoun-declensions] (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) - title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples")] + title (str "Pronoun Island: " (prose-comma-list sub-objs) " examples") + examples (map #(apply examples-block %) pronoun-declensions)] (html [:html [:head [:title title] [:meta {:name "viewport" :content "width=device-width"}] + [:meta {:name "description" :content (u/strip-markup examples)}] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (header-block title) - (map #(apply examples-block %) pronoun-declensions) + examples (footer-block)]]))) (defn lookup-pronouns [pronouns-string] diff --git a/src/pronouns/util.clj b/src/pronouns/util.clj index a000201..3db3c35 100644 --- a/src/pronouns/util.clj +++ b/src/pronouns/util.clj @@ -103,3 +103,7 @@ is already in a sequence for which vector? is false, this will add another layer of nesting." (if (vector? x) x [x])) + +(defn strip-markup [form] + (s/join " " (filter string? (flatten form)))) + From 368c73b55e1964834e562d7b5466506fb6ffc4bd Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 8 Mar 2017 22:48:40 -0800 Subject: [PATCH 02/37] put an icon on the page so preview cards can grab it for #56 --- resources/images/purple-flag64.png | Bin 0 -> 3717 bytes src/pronouns/pages.clj | 3 ++- src/pronouns/web.clj | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 resources/images/purple-flag64.png diff --git a/resources/images/purple-flag64.png b/resources/images/purple-flag64.png new file mode 100644 index 0000000000000000000000000000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f app-routes + (wrap-resource "images") + wrap-content-type + wrap-not-modified logger/wrap-with-logger wrap-error-page trace/wrap-stacktrace From 414909ac229ce42945e2ca834805f00d16b34bd0 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 8 Mar 2017 22:53:34 -0800 Subject: [PATCH 03/37] add the svg version of the logo, we will want it later #56 --- resources/images/purple-flag.svg | 112 +++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 resources/images/purple-flag.svg diff --git a/resources/images/purple-flag.svg b/resources/images/purple-flag.svg new file mode 100644 index 0000000..c8e231c --- /dev/null +++ b/resources/images/purple-flag.svg @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Openclipart + + + + + + + + + + + + From acbea12b93ddfa47cf9f1c1ebf3b339ea15977c6 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Thu, 9 Mar 2017 00:27:51 -0800 Subject: [PATCH 04/37] add meta tags needed for twitter preview card. this needs additional cleanup #56 --- src/pronouns/pages.clj | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index f9939c3..b9ac11b 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -116,6 +116,12 @@ (defn footer-block [] [:footer (usage-block) (contact-block)]) +;; +;; +;; +;; +;; + (defn format-pronoun-examples [pronoun-declensions] (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) @@ -127,6 +133,11 @@ [:title title] [:meta {:name "viewport" :content "width=device-width"}] [:meta {:name "description" :content (u/strip-markup examples)}] + [:meta {:name "twitter:card" :content (u/strip-markup examples)}] + [:meta {:name "twitter:site" :content "@morganastra"}] + [:meta {:name "twitter:title" :content title}] + [:meta {:name "twitter:description" :content (u/strip-markup examples)}] + [:meta {:name "twitter:image" :content "https://pronoun.is/purple-flag64.png"}] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (header-block title) From 3c933e42581c30e4fb4c43c12fa1816073f510e6 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Thu, 9 Mar 2017 18:10:38 -0800 Subject: [PATCH 05/37] remove unnecessary twitter card meta tags #56 --- src/pronouns/pages.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index b9ac11b..e33893f 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -121,6 +121,7 @@ ;; ;; ;; +;; not all of these are required! (defn format-pronoun-examples [pronoun-declensions] @@ -133,11 +134,9 @@ [:title title] [:meta {:name "viewport" :content "width=device-width"}] [:meta {:name "description" :content (u/strip-markup examples)}] - [:meta {:name "twitter:card" :content (u/strip-markup examples)}] - [:meta {:name "twitter:site" :content "@morganastra"}] + [:meta {:name "twitter:card" :content "summary"}] [:meta {:name "twitter:title" :content title}] [:meta {:name "twitter:description" :content (u/strip-markup examples)}] - [:meta {:name "twitter:image" :content "https://pronoun.is/purple-flag64.png"}] [:link {:rel "stylesheet" :href "/pronouns.css"}]] [:body (header-block title) From 79a95150e4f865c0e47c7b55a7c5f212b22e4835 Mon Sep 17 00:00:00 2001 From: Marie Hogebrandt Date: Fri, 24 Mar 2017 20:16:09 +0100 Subject: [PATCH 06/37] Update pronouns.tab Adding fey and xie pronouns --- resources/pronouns.tab | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index b6e00dd..8707b4a 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -29,3 +29,5 @@ zie hir hir hirs hirself si hyr hyr hyrs hyrself kit kit kits kits kitself ne nem nir nirs nemself +fey feym feir feirs feirself +xie xer xer xers xerself From 8836c832f8c43fbd10d9c7fe1fe7ce2fbf8abc42 Mon Sep 17 00:00:00 2001 From: Marie Hogebrandt Date: Fri, 24 Mar 2017 20:17:52 +0100 Subject: [PATCH 07/37] Update pronouns.tab Tabs. --- resources/pronouns.tab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 8707b4a..07fd63b 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -29,5 +29,5 @@ zie hir hir hirs hirself si hyr hyr hyrs hyrself kit kit kits kits kitself ne nem nir nirs nemself -fey feym feir feirs feirself -xie xer xer xers xerself +fey feym feir feirs feirself +xie xer xer xers xerself From 028416f1017494b072331f5e62ad3e4b88afdb8e Mon Sep 17 00:00:00 2001 From: Diana Thayer Date: Sun, 21 May 2017 22:08:33 -0700 Subject: [PATCH 08/37] add links to readme for the location of relevant files and dependencies --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f4bdae5..963725a 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ pull request (see the next section for details) ### The database -The pronouns "database" is a tab-delimited file with fields and -example values as follows: +The pronouns "database" is a tab-delimited file located in [resources/pronouns.tab][pronoun-database] with fields and example values as follows: subject|object|possessive-determiner|possessive-pronoun|reflexive -------|------|---------------------|------------------|--------- @@ -30,10 +29,12 @@ tab characters in that file (a thing your editor might normally be configured not to do!) In Emacs, you can input real tabs by doing Ctrl+q +[pronoun-database]: https://github.com/witch-house/pronoun.is/blob/develop/resources/pronouns.tab + ### Running the app in a dev environment -You can launch the app on your own computer by running the following -command: +First, install [leiningen](https://leiningen.org/). Then you can launch the app +on your own computer by running the following command: ``` $ lein ring server From d4597632c2fe5aa23d1e89bd89dfdb1a8a406b97 Mon Sep 17 00:00:00 2001 From: Diana Thayer Date: Sun, 21 May 2017 22:22:27 -0700 Subject: [PATCH 09/37] http->https --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f4bdae5..0eb7191 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -**[pronoun.is](http://pronoun.is) is a website for personal pronoun usage examples** +**[pronoun.is](https://pronoun.is) is a website for personal pronoun usage examples** ## For users You can use any pronouns you like simply by filling them into the -url path. For example, http://pronoun.is/ze/zir/zir/zirs/zirself +url path. For example, https://pronoun.is/ze/zir/zir/zirs/zirself That's pretty unwieldy! Fortunately you can also give it only the -first pronoun or two: http://pronoun.is/she/her or http://pronoun.is/they +first pronoun or two: https://pronoun.is/she/her or https://pronoun.is/they Automatically filling in the rest from only one or two forms only works for pronouns in the [database](resources/pronouns.tab). If the @@ -45,7 +45,7 @@ This will launch a server running the app and open your default web browser to t Pronoun.is aims foremost and exclusively to be a useful resource for people to communicate the personal pronoun they use for themselves. -It is possible to use these example sentences to demonstrate the usage of words that are not personal pronouns, or even cleverly insert an [entire story](http://pronoun.is/she/or%20they,%20those%20ships%20who%20were%20docked%20and%20still%20equipped%20with%20ancillaries,%20arranged%20to%20share%20the%20duty%20of%20monitoring%20our%20guest%20as%20it%20fit%20into%20their%20routines;%20that%20was%20the%20agreement,%20despite%20it%20being%20less%20convenient%20for%20me%20to%20participate%20at%20all,%20on%20the%20grounds%20that%20certain%20visitors%20might%20prefer%20a%20constant%20individual%20companion%20to%20what%20might%20seem,%20depending%20on%20their%20past%20experiences,%20to%20be%20undue%20attention%20from%20every%20soldier%20they%20passed.%20As%20usual,%20then,%20I%20took%20the%20first%20shift/the%20one%20possession%20of%20hers%20that%20Station%20Security%20hadn't%20confiscated,%20a/knowingly%20left%20with%20her.%20What%20a%20Presger%20frisbee%20might%20do%20or%20even%20look%20like%20I%20couldn't%20say.%20She%20hadn't%20seemed%20the%20sort%20to%20have%20alien%20technology,%20but,%20then%20again,%20neither%20had%20I/another%20unremarkable%20stranger,%20quite%20a%20ways%20down%20the%20concourse,%20who%20caught%20it%20with%20a%20degree%20of%20coordination%20that%20most%20would%20have%20overlooked.%20It%20did%20not%20escape%20my%20notice,%20however.%20"Cousin,"%20I%20said,%20enough%20to%20convey%20-%20unless%20our%20visitor%20were%20quite%20ignorant,%20but,%20of%20course,%20at%20this%20point%20I%20was%20certain%20that%20she%20couldn't%20be%20-%20both%20that%20I%20knew%20what%20she%20was%20not%20and%20that%20I%20was%20giving%20her%20the%20benefit%20of%20the%20doubt%20as%20to%20what,%20or%20who,%20she%20was)! However, as a policy we will not include such entries in the database. +It is possible to use these example sentences to demonstrate the usage of words that are not personal pronouns, or even cleverly insert an [entire story](https://pronoun.is/she/or%20they,%20those%20ships%20who%20were%20docked%20and%20still%20equipped%20with%20ancillaries,%20arranged%20to%20share%20the%20duty%20of%20monitoring%20our%20guest%20as%20it%20fit%20into%20their%20routines;%20that%20was%20the%20agreement,%20despite%20it%20being%20less%20convenient%20for%20me%20to%20participate%20at%20all,%20on%20the%20grounds%20that%20certain%20visitors%20might%20prefer%20a%20constant%20individual%20companion%20to%20what%20might%20seem,%20depending%20on%20their%20past%20experiences,%20to%20be%20undue%20attention%20from%20every%20soldier%20they%20passed.%20As%20usual,%20then,%20I%20took%20the%20first%20shift/the%20one%20possession%20of%20hers%20that%20Station%20Security%20hadn't%20confiscated,%20a/knowingly%20left%20with%20her.%20What%20a%20Presger%20frisbee%20might%20do%20or%20even%20look%20like%20I%20couldn't%20say.%20She%20hadn't%20seemed%20the%20sort%20to%20have%20alien%20technology,%20but,%20then%20again,%20neither%20had%20I/another%20unremarkable%20stranger,%20quite%20a%20ways%20down%20the%20concourse,%20who%20caught%20it%20with%20a%20degree%20of%20coordination%20that%20most%20would%20have%20overlooked.%20It%20did%20not%20escape%20my%20notice,%20however.%20"Cousin,"%20I%20said,%20enough%20to%20convey%20-%20unless%20our%20visitor%20were%20quite%20ignorant,%20but,%20of%20course,%20at%20this%20point%20I%20was%20certain%20that%20she%20couldn't%20be%20-%20both%20that%20I%20knew%20what%20she%20was%20not%20and%20that%20I%20was%20giving%20her%20the%20benefit%20of%20the%20doubt%20as%20to%20what,%20or%20who,%20she%20was)! However, as a policy we will not include such entries in the database. ## License @@ -62,5 +62,5 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License -along with this program. If not, see +along with this program. If not, see From 7ce17063e5b39c4a6cbccca796a29810ff38be6f Mon Sep 17 00:00:00 2001 From: Diana Thayer Date: Sun, 21 May 2017 22:23:31 -0700 Subject: [PATCH 10/37] oh, it *was* documented :| --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 963725a..32eb9ad 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ That's pretty unwieldy! Fortunately you can also give it only the first pronoun or two: http://pronoun.is/she/her or http://pronoun.is/they Automatically filling in the rest from only one or two forms only -works for pronouns in the [database](resources/pronouns.tab). If the +works for pronouns in the [database][pronoun-database]. If the pronouns you or a friend uses aren't supported, please let us know and we'll add them. Alternatively you could add them yourself and submit a pull request (see the next section for details) @@ -29,7 +29,7 @@ tab characters in that file (a thing your editor might normally be configured not to do!) In Emacs, you can input real tabs by doing Ctrl+q -[pronoun-database]: https://github.com/witch-house/pronoun.is/blob/develop/resources/pronouns.tab +[pronoun-database]: resources/pronouns.tab ### Running the app in a dev environment From 054925bbc03601eea918429e6d1c3b8a8881239c Mon Sep 17 00:00:00 2001 From: Andrew Stiles Date: Tue, 21 Nov 2017 17:01:40 -0600 Subject: [PATCH 11/37] Add some v* pronoun variants --- resources/pronouns.tab | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 07fd63b..5451804 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -31,3 +31,5 @@ kit kit kits kits kitself ne nem nir nirs nemself fey feym feir feirs feirself xie xer xer xers xerself +vi ver ver vers verself +vi vim vir virs vimself From 19a9d576e791922577ba0380e55ba3676229602e Mon Sep 17 00:00:00 2001 From: Claire C <15915950+claiire@users.noreply.github.com> Date: Mon, 29 Jan 2018 20:49:24 -0800 Subject: [PATCH 12/37] Update pronouns.tab --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 07fd63b..cc2cee2 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -5,6 +5,7 @@ he him his his himself they them their theirs themselves they them their theirs themself xey xem xyr xyrs xemself +xey xem xeir xeirs xemself sie hir hir hirs hirself it it its its itself ey em eir eirs eirself From f357e476bb7c46e06887ee7044c407cbf36f0151 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 3 Mar 2018 17:25:56 -0500 Subject: [PATCH 13/37] added vi/vim pronouns --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index cc2cee2..ea267f5 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -32,3 +32,4 @@ kit kit kits kits kitself ne nem nir nirs nemself fey feym feir feirs feirself xie xer xer xers xerself +vi vim vim vims vimself From 55c81599aaf127feba0773873b1231ed3a379c9b Mon Sep 17 00:00:00 2001 From: Jack Willis Date: Sun, 1 Apr 2018 16:24:42 -0500 Subject: [PATCH 14/37] Add 'yo' pronoun --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index cc2cee2..075f702 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -32,3 +32,4 @@ kit kit kits kits kitself ne nem nir nirs nemself fey feym feir feirs feirself xie xer xer xers xerself +yo yo yos yos yosself From 046a82bde7ed48e91b54270984bc911318c43f16 Mon Sep 17 00:00:00 2001 From: Zzyzx Wolfe Date: Sun, 15 Apr 2018 16:24:20 -0700 Subject: [PATCH 15/37] Add shi/hir/hir/hirs/hirself. shi/hir is a common variant of sie/hir. --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index cc2cee2..a303c94 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -32,3 +32,4 @@ kit kit kits kits kitself ne nem nir nirs nemself fey feym feir feirs feirself xie xer xer xers xerself +shi hir hir hirs hirself From 21b3dd9407110049dc7272e4e73c0c807466ccaa Mon Sep 17 00:00:00 2001 From: Fernando Correa de Oliveira Date: Tue, 31 Jul 2018 15:32:06 -0300 Subject: [PATCH 16/37] Add how to insert a real tab using Vi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64b9cfa..a037e48 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ they | them | their | theirs | themselves If you edit it with a text editor, make sure your editor inputs real tab characters in that file (a thing your editor might normally be configured not to do!) In Emacs, you can input real tabs by doing -Ctrl+q +Ctrl+q . In Vi you can use Ctrl+v . [pronoun-database]: resources/pronouns.tab From 19a9edb7b09eb19cc2029169cee1f10d6617f008 Mon Sep 17 00:00:00 2001 From: aliengeo <34959047+aliengeo@users.noreply.github.com> Date: Sat, 15 Sep 2018 23:01:29 -0500 Subject: [PATCH 17/37] added ae/aer/aers pronouns --- resources/pronouns.tab | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index cc2cee2..b316424 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -32,3 +32,4 @@ kit kit kits kits kitself ne nem nir nirs nemself fey feym feir feirs feirself xie xer xer xers xerself +ae aer aer aers aerself From 05a2d8fcff181a09ca7f79ad7590dab24575ab0d Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 12:48:47 -0800 Subject: [PATCH 18/37] Fix docstrings --- src/pronouns/util.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pronouns/util.clj b/src/pronouns/util.clj index 3db3c35..01571b6 100644 --- a/src/pronouns/util.clj +++ b/src/pronouns/util.clj @@ -19,8 +19,9 @@ (defn print-and-return "for debugging" [x] (println x) x) -(defn slurp-tabfile [path] - "read a tabfile from a filesystem as a table" +(defn slurp-tabfile + "Read a tabfile from a filesystem as a table" + [path] (let [lines (s/split (slurp path) #"\n")] (map #(s/split % #"\t") lines))) @@ -98,10 +99,11 @@ [table] (map (partial shortest-unambiguous-path table) table)) -(defn vec-coerce [x] +(defn vec-coerce "wrap a value in a vector if it is not already in one. note that if is already in a sequence for which vector? is false, this will add another layer of nesting." + [x] (if (vector? x) x [x])) (defn strip-markup [form] From 4321ec5e39bdb817fbcc61cc40a42b5a23a0a1ce Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 12:49:17 -0800 Subject: [PATCH 19/37] Update deps to modern versions and remove midje --- project.clj | 14 ++++++-------- src/pronouns/web.clj | 6 +++--- test/pronouns/pages_test.clj | 16 +++++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/project.clj b/project.clj index b14ac4e..bcb1454 100644 --- a/project.clj +++ b/project.clj @@ -2,18 +2,16 @@ :description "Pronoun.is is a website for personal pronoun usage examples" :url "http://pronoun.is" :license "GNU Affero General Public License 3.0" - :dependencies [[org.clojure/clojure "1.6.0"] - [compojure "1.1.8"] - [ring/ring-jetty-adapter "1.2.2"] - [ring.middleware.logger "0.5.0"] - [ring/ring-devel "1.2.2"] - [environ "0.5.0"] + :dependencies [[org.clojure/clojure "1.9.0"] + [compojure "1.6.1"] + [ring/ring-jetty-adapter "1.7.1"] + [ring/ring-devel "1.7.1"] + [environ "1.1.0"] [hiccup "1.0.5"]] :min-lein-version "2.0.0" :plugins [[environ/environ.lein "0.2.1"] [lein-ring "0.9.7"]] :hooks [environ.leiningen.hooks] :uberjar-name "pronouns-standalone.jar" - :profiles {:production {:env {:production true}} - :dev {:dependencies [[midje "1.6.3"]]}} + :profiles {:production {:env {:production true}}} :ring {:handler pronouns.web/app}) diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 69ad6ae..872a6aa 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -20,13 +20,13 @@ [compojure.route :as route] [clojure.string :as s] [clojure.java.io :as io] - [ring.middleware.logger :as logger] + [ring.adapter.jetty :as jetty] + ;[ring.middleware.logger :as logger] [ring.middleware.stacktrace :as trace] [ring.middleware.params :as params] [ring.middleware.resource :refer [wrap-resource]] [ring.middleware.content-type :refer [wrap-content-type]] [ring.middleware.not-modified :refer [wrap-not-modified]] - [ring.adapter.jetty :as jetty] [environ.core :refer [env]] [pronouns.util :as u] [pronouns.pages :as pages])) @@ -64,7 +64,7 @@ (wrap-resource "images") wrap-content-type wrap-not-modified - logger/wrap-with-logger + ;logger/wrap-with-logger wrap-error-page trace/wrap-stacktrace params/wrap-params)) diff --git a/test/pronouns/pages_test.clj b/test/pronouns/pages_test.clj index 04c14ce..e32a2ee 100644 --- a/test/pronouns/pages_test.clj +++ b/test/pronouns/pages_test.clj @@ -1,10 +1,12 @@ (ns pronouns.pages-test (:require [pronouns.pages :as pages] - [midje.sweet :refer :all])) + [clojure.test :refer [deftest testing is are]])) -(fact "prose-comma-list turns a list of strings into a prose list with commas" - (pages/prose-comma-list ["foo"]) => "foo" - (pages/prose-comma-list ["foo" "bar"]) => "foo and bar" - (pages/prose-comma-list ["foo" "bar" "baz"]) => "foo, bar, and baz" - (pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) => "foo, bar, baz, and bobble" - (pages/prose-comma-list []) => "") +(deftest prose-comma-list + (testing "prose-comma-list turns a list of strings into a prose list" + (are [call result] (= call result) + (pages/prose-comma-list ["foo"]) "foo" + (pages/prose-comma-list ["foo" "bar"]) "foo and bar" + (pages/prose-comma-list ["foo" "bar" "baz"]) "foo, bar, and baz" + (pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) "foo, bar, baz, and bobble" + (pages/prose-comma-list []) ""))) From a8e745b5fdbfdf3079dedb9cee541982a8a8d493 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 12:54:50 -0800 Subject: [PATCH 20/37] Clean up lein profiles --- project.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project.clj b/project.clj index bcb1454..5a67479 100644 --- a/project.clj +++ b/project.clj @@ -5,7 +5,6 @@ :dependencies [[org.clojure/clojure "1.9.0"] [compojure "1.6.1"] [ring/ring-jetty-adapter "1.7.1"] - [ring/ring-devel "1.7.1"] [environ "1.1.0"] [hiccup "1.0.5"]] :min-lein-version "2.0.0" @@ -13,5 +12,8 @@ [lein-ring "0.9.7"]] :hooks [environ.leiningen.hooks] :uberjar-name "pronouns-standalone.jar" - :profiles {:production {:env {:production true}}} + ;; FIXME morgan.astra <2018-11-14 Wed> + ;; Is this production profile used for anything? + :profiles {:production {:env {:production true}} + :dev {:dependencies [[ring/ring-devel "1.7.1"]]}} :ring {:handler pronouns.web/app}) From 80e1c5eb26a0d0d2a732f7634a51e94bdcd9029a Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 13:00:58 -0800 Subject: [PATCH 21/37] Update copyright year --- README.md | 2 +- resources/images/purple-flag.svg | 112 ----------------------------- resources/images/purple-flag64.png | Bin 3717 -> 0 bytes src/pronouns/config.clj | 2 +- src/pronouns/pages.clj | 4 +- src/pronouns/util.clj | 2 +- src/pronouns/web.clj | 2 +- 7 files changed, 6 insertions(+), 118 deletions(-) delete mode 100644 resources/images/purple-flag.svg delete mode 100644 resources/images/purple-flag64.png diff --git a/README.md b/README.md index a037e48..2d3cf06 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ It is possible to use these example sentences to demonstrate the usage of words ## License -Copyright © 2014-2017 Morgan Astra +Copyright © 2014-2018 Morgan Astra This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as diff --git a/resources/images/purple-flag.svg b/resources/images/purple-flag.svg deleted file mode 100644 index c8e231c..0000000 --- a/resources/images/purple-flag.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - Openclipart - - - - - - - - - - - - diff --git a/resources/images/purple-flag64.png b/resources/images/purple-flag64.png deleted file mode 100644 index ba63aeee0b6509efb837cc324c1fadfd40dde14c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3717 zcmV;04tnv4P)Z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 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 5a67479..1cc3d8d 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject witch-house/pronouns "1.11.0-SNAPSHOT" +(defproject witch-house/pronouns "1.12.0-SNAPSHOT" :description "Pronoun.is is a website for personal pronoun usage examples" :url "http://pronoun.is" :license "GNU Affero General Public License 3.0" From 9a7112784ea22b6c5595bb9879205d073b1c4253 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 13:46:38 -0800 Subject: [PATCH 23/37] Add test to catch common errors in pronouns.tab --- test/pronouns/resource_test.clj | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/pronouns/resource_test.clj diff --git a/test/pronouns/resource_test.clj b/test/pronouns/resource_test.clj new file mode 100644 index 0000000..38ee4e3 --- /dev/null +++ b/test/pronouns/resource_test.clj @@ -0,0 +1,12 @@ +(ns pronouns.resource-test + (:require [pronouns.util :as util] + [clojure.test :refer [deftest testing is]])) + +(deftest valid-pronouns-table + (let [table (util/slurp-tabfile "resources/pronouns.tab")] + (is table "pronouns.tab exists and is non-empty") + (doseq [row table] + (is (= (count row) 5) + "row has five elements") + (is (re-matches #".*sel(f|ves)$" (last row)) + "final element is reflexive")))) From 2083d66ddb7d34d18eb18b4917265f7d8dfe4a4e Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 14:11:18 -0800 Subject: [PATCH 24/37] Add tests for table lookup functions --- src/pronouns/util.clj | 2 -- test/pronouns/util_test.clj | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 test/pronouns/util_test.clj diff --git a/src/pronouns/util.clj b/src/pronouns/util.clj index fa14698..424e0f1 100644 --- a/src/pronouns/util.clj +++ b/src/pronouns/util.clj @@ -17,8 +17,6 @@ (ns pronouns.util (:require [clojure.string :as s])) -(defn print-and-return "for debugging" [x] (println x) x) - (defn slurp-tabfile "Read a tabfile from a filesystem as a table" [path] diff --git a/test/pronouns/util_test.clj b/test/pronouns/util_test.clj new file mode 100644 index 0000000..031f0f9 --- /dev/null +++ b/test/pronouns/util_test.clj @@ -0,0 +1,33 @@ +(ns pronouns.util-test + (:require [pronouns.util :as util] + [clojure.test :refer [deftest testing is]])) + +(def test-table [ + ["ze" "hir" "hir" "hirs" "hirself"] + ["ze" "zir" "zir" "zirs" "zirself"] + ["she" "her" "her" "hers" "herself"] + ["he" "him" "his" "his" "himself"] + ["they" "them" "their" "theirs" "themselves"] + ["they" "them" "their" "theirs" "themself"]]) + +(deftest table-filters + (testing "table-front-filter" + (are [arg return] (= (table-front-filter arg test-table) return) + ["she"] [["she" "her" "her" "hers" "herself"]] + ["ze"] [["ze" "hir" "hir" "hirs" "hirself"] + ["ze" "zir" "zir" "zirs" "zirself"]] + ["ze" "zir"] [["ze" "zir" "zir" "zirs" "zirself"]])) + + (testing "table-end-filter" + (are [arg return] (= (table-end-filter arg test-table) return) + ["themself"] [["they" "them" "their" "theirs" "themself"]] + ["themselves" [["they" "them" "their" "theirs" "themselves"]]]))) + +(deftest table-lookup + (are [arg return] (= (table-lookup arg test-table) return) + ["she"] ["she" "her" "her" "hers" "herself"] + ["ze"] ["ze" "hir" "hir" "hirs" "hirself"] + ["ze" "zir"] ["ze" "zir" "zir" "zirs" "zirself"] + ["they"] ["they" "them" "their" "theirs" "themselves"] + ["they" "..." "themself"] ["they" "them" "their" "theirs" "themself"])) + From fde31a129a1f2c0dac15ab3f16053465930225cb Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 14:16:18 -0800 Subject: [PATCH 25/37] Fix all remaining http self-links to https --- project.clj | 2 +- src/pronouns/pages.clj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index 1cc3d8d..a3d6bcf 100644 --- a/project.clj +++ b/project.clj @@ -1,6 +1,6 @@ (defproject witch-house/pronouns "1.12.0-SNAPSHOT" :description "Pronoun.is is a website for personal pronoun usage examples" - :url "http://pronoun.is" + :url "https://pronoun.is" :license "GNU Affero General Public License 3.0" :dependencies [[org.clojure/clojure "1.9.0"] [compojure "1.6.1"] diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index d4051ac..6f7321a 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -90,7 +90,7 @@ (defn usage-block [] [:div {:class "section usage"} [:p "Full usage: " - [:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] + [:tt "https://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] " displays examples of your pronouns."] [:p "This is a bit unwieldy. If we have a good guess we'll let you use" " just the first one or two."]]) @@ -102,7 +102,7 @@ [:p "Written by " (twitter-name "morganastra") ", whose " - (href "http://pronoun.is/ze/zir?or=she" "pronoun.is/ze/zir?or=she")] + (href "https://pronoun.is/she" "pronoun.is/she")] [:p "pronoun.is is free software under the " (href "https://www.gnu.org/licenses/agpl.html" "AGPLv3") "! visit the project on " From b507619c7c676dbf1fde09994b48a2211b4f61ee Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 14:17:47 -0800 Subject: [PATCH 26/37] Move license links to https --- COPYING | 2 +- src/pronouns/config.clj | 2 +- src/pronouns/pages.clj | 2 +- src/pronouns/util.clj | 2 +- src/pronouns/web.clj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/COPYING b/COPYING index 29c3097..84592c6 100644 --- a/COPYING +++ b/COPYING @@ -2,7 +2,7 @@ Version 3, 19 November 2007 -Copyright © 2007 Free Software Foundation, Inc. Everyone is +Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble diff --git a/src/pronouns/config.clj b/src/pronouns/config.clj index ecde59f..3a07c36 100644 --- a/src/pronouns/config.clj +++ b/src/pronouns/config.clj @@ -12,7 +12,7 @@ ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License -;; along with this program. If not, see +;; along with this program. If not, see (ns pronouns.config (:require [pronouns.util :as u])) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 6f7321a..5782df4 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -12,7 +12,7 @@ ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License -;; along with this program. If not, see +;; along with this program. If not, see (ns pronouns.pages (:require [clojure.string :as s] diff --git a/src/pronouns/util.clj b/src/pronouns/util.clj index 424e0f1..7469dcf 100644 --- a/src/pronouns/util.clj +++ b/src/pronouns/util.clj @@ -12,7 +12,7 @@ ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License -;; along with this program. If not, see +;; along with this program. If not, see (ns pronouns.util (:require [clojure.string :as s])) diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 2e8184a..83a184d 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -12,7 +12,7 @@ ;; GNU Affero General Public License for more details. ;; You should have received a copy of the GNU Affero General Public License -;; along with this program. If not, see +;; along with this program. If not, see (ns pronouns.web (:require [compojure.core :refer [defroutes GET PUT POST DELETE ANY]] From 41a9133d3d02c2d2948fbfe7599c10bfbd2aed2d Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 14:28:15 -0800 Subject: [PATCH 27/37] Add fixme notes --- src/pronouns/pages.clj | 4 ++++ src/pronouns/web.clj | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 5782df4..2ae6b4e 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -34,6 +34,8 @@ [url text] [:a {:href url} text]) +;; FIXME morgan.astra <2018-11-14 Wed> +;; use a div for this instead of a plain bold tag (defn wrap-pronoun [pronoun] [:b pronoun]) @@ -90,6 +92,8 @@ (defn usage-block [] [:div {:class "section usage"} [:p "Full usage: " + ;; FIXME morgan.astra <2018-11-14 Wed> + ;; This looks really ugly in the browser [:tt "https://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"] " displays examples of your pronouns."] [:p "This is a bit unwieldy. If we have a good guess we'll let you use" diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 83a184d..15057c2 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -21,7 +21,9 @@ [clojure.string :as s] [clojure.java.io :as io] [ring.adapter.jetty :as jetty] - ;[ring.middleware.logger :as logger] + ;; FIXME morgan.astra <2018-11-14 Wed> + ;; make this logger work or use another one + ;; [ring.middleware.logger :as logger] [ring.middleware.stacktrace :as trace] [ring.middleware.params :as params] [ring.middleware.resource :refer [wrap-resource]] @@ -66,9 +68,13 @@ (def app (-> app-routes - (wrap-resource "images") + ;; FIXME morgan.astra <2018-11-14 Wed> + ;; use this resource or delete it + ;; (wrap-resource "images") wrap-content-type wrap-not-modified + ;; FIXME morgan.astra <2018-11-14 Wed> + ;; make this logger work or use another one ;logger/wrap-with-logger wrap-error-page wrap-gnu-natalie-nguyen From c45042893905d3ffd227f37a24ad135d766063e1 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 14:39:46 -0800 Subject: [PATCH 28/37] Make front page shorter Since this was currently the only place with a full list of all pronouns in the database, we should add a new page to serve that purpose (perhaps formatted into multiple columns so it isn't so incredibly long) --- src/pronouns/pages.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 2ae6b4e..218caab 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -156,7 +156,7 @@ [:li (href link label)])) (defn front [] - (let [abbreviations (u/abbreviate *pronouns-table*) + (let [abbreviations (take 10 (u/abbreviate *pronouns-table*)) links (map make-link abbreviations) title "Pronoun Island"] (html From 67f0a0768750ff98715a48aefc44f315c4875c8c Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 21:47:31 -0800 Subject: [PATCH 29/37] Fix ns issues --- project.clj | 2 +- test/pronouns/util_test.clj | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/project.clj b/project.clj index a3d6bcf..a0f77fd 100644 --- a/project.clj +++ b/project.clj @@ -15,5 +15,5 @@ ;; FIXME morgan.astra <2018-11-14 Wed> ;; Is this production profile used for anything? :profiles {:production {:env {:production true}} - :dev {:dependencies [[ring/ring-devel "1.7.1"]]}} + :test {:dependencies [[ring/ring-devel "1.7.1"]]}} :ring {:handler pronouns.web/app}) diff --git a/test/pronouns/util_test.clj b/test/pronouns/util_test.clj index 031f0f9..3aecc2a 100644 --- a/test/pronouns/util_test.clj +++ b/test/pronouns/util_test.clj @@ -1,9 +1,8 @@ (ns pronouns.util-test (:require [pronouns.util :as util] - [clojure.test :refer [deftest testing is]])) + [clojure.test :refer [deftest testing is are]])) -(def test-table [ - ["ze" "hir" "hir" "hirs" "hirself"] +(def test-table [["ze" "hir" "hir" "hirs" "hirself"] ["ze" "zir" "zir" "zirs" "zirself"] ["she" "her" "her" "hers" "herself"] ["he" "him" "his" "his" "himself"] @@ -12,19 +11,19 @@ (deftest table-filters (testing "table-front-filter" - (are [arg return] (= (table-front-filter arg test-table) return) + (are [arg return] (= (util/table-front-filter arg test-table) return) ["she"] [["she" "her" "her" "hers" "herself"]] ["ze"] [["ze" "hir" "hir" "hirs" "hirself"] ["ze" "zir" "zir" "zirs" "zirself"]] ["ze" "zir"] [["ze" "zir" "zir" "zirs" "zirself"]])) (testing "table-end-filter" - (are [arg return] (= (table-end-filter arg test-table) return) + (are [arg return] (= (util/table-end-filter arg test-table) return) ["themself"] [["they" "them" "their" "theirs" "themself"]] - ["themselves" [["they" "them" "their" "theirs" "themselves"]]]))) + ["themselves"] [["they" "them" "their" "theirs" "themselves"]]))) (deftest table-lookup - (are [arg return] (= (table-lookup arg test-table) return) + (are [arg return] (= (util/table-lookup arg test-table) return) ["she"] ["she" "her" "her" "hers" "herself"] ["ze"] ["ze" "hir" "hir" "hirs" "hirself"] ["ze" "zir"] ["ze" "zir" "zir" "zirs" "zirself"] From 1af3772aa720663c81c08706a0ecf172283bc2ca Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 21:51:20 -0800 Subject: [PATCH 30/37] Fix trailing whitespace in pronouns.tab The new test cases caught a real issue!!! --- resources/pronouns.tab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index c5b6788..492f63c 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -5,7 +5,7 @@ he him his his himself they them their theirs themselves they them their theirs themself xey xem xyr xyrs xemself -xey xem xeir xeirs xemself +xey xem xeir xeirs xemself sie hir hir hirs hirself it it its its itself ey em eir eirs eirself From 8628d9705526e91664886e6b2588d4972716a8a5 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 22:12:23 -0800 Subject: [PATCH 31/37] Highly top five pronoun sets on the front page --- resources/pronouns.tab | 56 +++++++++++++++++++++--------------------- src/pronouns/pages.clj | 2 +- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 492f63c..03c521b 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -1,40 +1,40 @@ -ze hir hir hirs hirself -ze zir zir zirs zirself she her her hers herself he him his his himself they them their theirs themselves -they them their theirs themself +ze hir hir hirs hirself xey xem xyr xyrs xemself -xey xem xeir xeirs xemself -sie hir hir hirs hirself -it it its its itself -ey em eir eirs eirself +ae aer aer aers aerself e em eir eirs emself -hu hum hus hus humself -peh pehm peh's peh's pehself -per per per pers perself -thon thon thons thons thonself -jee jem jeir jeirs jemself -ve ver vis vis verself -xe xem xyr xyrs xemself -zie zir zir zirs zirself -ze zem zes zes zirself -zie zem zes zes zirself -ze mer zer zers zemself -se sim ser sers serself -zme zmyr zmyr zmyrs zmyrself -ve vem vir virs vemself -zee zed zeta zetas zedself +ey em eir eirs eirself fae faer faer faers faerself -zie hir hir hirs hirself -si hyr hyr hyrs hyrself +fey fem feir feirs feirself +hu hum hus hus humself +it it its its itself +jee jem jeir jeirs jemself kit kit kits kits kitself ne nem nir nirs nemself -fey fem feir feirs feirself -xie xer xer xers xerself +peh pehm peh's peh's pehself +per per per pers perself +sie hir hir hirs hirself +se sim ser sers serself +shi hir hir hirs hirself +si hyr hyr hyrs hyrself +they them their theirs themself +thon thon thons thons thonself +ve ver vis vis verself +ve vem vir virs vemself vi ver ver vers verself vi vim vir virs vimself vi vim vim vims vimself +xie xer xer xers xerself +xe xem xyr xyrs xemself +xey xem xeir xeirs xemself yo yo yos yos yosself -shi hir hir hirs hirself -ae aer aer aers aerself +ze zir zir zirs zirself +ze zem zes zes zirself +ze mer zer zers zemself +zee zed zeta zetas zedself +zie zir zir zirs zirself +zie zem zes zes zirself +zie hir hir hirs hirself +zme zmyr zmyr zmyrs zmyrself diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 218caab..6d08519 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -156,7 +156,7 @@ [:li (href link label)])) (defn front [] - (let [abbreviations (take 10 (u/abbreviate *pronouns-table*)) + (let [abbreviations (take 5 (u/abbreviate *pronouns-table*)) links (map make-link abbreviations) title "Pronoun Island"] (html From 8238eb6e0cbf71db6f2efe86ed4942253ebab9b6 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 22:22:15 -0800 Subject: [PATCH 32/37] Add all-pronouns page --- src/pronouns/pages.clj | 24 +++++++++++++++++++++--- src/pronouns/web.clj | 6 ++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 6d08519..3b808fb 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -168,9 +168,27 @@ [:body (header-block title) [:div {:class "section table"} - [:p "pronoun.is is a website for personal pronoun usage examples"] - [:p "here are some pronouns the site knows about:"] - [:ul links]]] + [:p "pronoun.is is a website for personal pronoun usage examples"] + [:p "here are some pronouns the site knows about:"] + [:ul links] + [:p [:small (href "all-pronouns" "see all pronouns in the database")]]]] + (footer-block)]))) + +(defn all-pronouns [] + (let [abbreviations (u/abbreviate *pronouns-table*) + links (map make-link abbreviations) + title "Pronoun Island"] + (html + [:html + [:head + [:title title] + [:meta {:name "viewport" :content "width=device-width"}] + [:link {:rel "stylesheet" :href "/pronouns.css"}]] + [:body + (header-block title) + [:div {:class "section table"} + [:p "All pronouns the site knows about:"] + [:ul links]]] (footer-block)]))) (defn not-found [] diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 15057c2..ab887d0 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -39,6 +39,12 @@ :headers {"Content-Type" "text/html"} :body (pages/front)}) + (GET "/all-pronouns" [] + {:status 200 + :headers {"Content-Type" "text/html"} + :body (pages/all-pronouns)}) + + (GET "/pronouns.css" [] {:status 200 :headers {"Content-Type" "text/css"} From 6550a2e413d6b0c83d462c3f11dc0358679e5c89 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 23:09:06 -0800 Subject: [PATCH 33/37] Make front page include ze/zir also Per feedback from Tavy, ze/zir is at least as common as ze/hir in modern usage, so it should be visible on the first page as well. --- resources/pronouns.tab | 2 +- src/pronouns/pages.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/pronouns.tab b/resources/pronouns.tab index 03c521b..7f788b2 100644 --- a/resources/pronouns.tab +++ b/resources/pronouns.tab @@ -2,6 +2,7 @@ she her her hers herself he him his his himself they them their theirs themselves ze hir hir hirs hirself +ze zir zir zirs zirself xey xem xyr xyrs xemself ae aer aer aers aerself e em eir eirs emself @@ -30,7 +31,6 @@ xie xer xer xers xerself xe xem xyr xyrs xemself xey xem xeir xeirs xemself yo yo yos yos yosself -ze zir zir zirs zirself ze zem zes zes zirself ze mer zer zers zemself zee zed zeta zetas zedself diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 3b808fb..7fcbcbe 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -156,7 +156,7 @@ [:li (href link label)])) (defn front [] - (let [abbreviations (take 5 (u/abbreviate *pronouns-table*)) + (let [abbreviations (take 6 (u/abbreviate *pronouns-table*)) links (map make-link abbreviations) title "Pronoun Island"] (html From de6929bb04d2a815e1012ba5119fd6e186dc0374 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 23:31:46 -0800 Subject: [PATCH 34/37] Update readme --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2d3cf06..a14cd99 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,50 @@ subject|object|possessive-determiner|possessive-pronoun|reflexive -------|------|---------------------|------------------|--------- they | them | their | theirs | themselves -If you edit it with a text editor, make sure your editor inputs real -tab characters in that file (a thing your editor might normally be -configured not to do!) In Emacs, you can input real tabs by doing -Ctrl+q . In Vi you can use Ctrl+v . +The top 6 pronouns are displayed on the front page. Please don't edit these +without talking to me, they've been hand-curated based on usage frequency. +Below the top 6, the remaining pronouns are sorted in alphabetical order by +subject and then in roughly frequency order for sets that have the same subject +pronoun. If you're adding a set that shares the same object pronoun as other +set(s) already in the database, please insert it immediately below those ones. + +If you edit the database with a text editor, make sure your editor inputs real +tab characters in that file (a thing your editor might normally be configured +not to do!) In Emacs, you can input real tabs by doing Ctrl+q . +In Vi you can use Ctrl+v . [pronoun-database]: resources/pronouns.tab +### The code + +The top-level logic for running the server lives in [`pronouns.web`](src/pronouns/web.clj) + +Page rendering markup is in [`pronouns.pages`](src/pronouns/pages.clj), it uses +[hiccup](https://github.com/weavejester/hiccup) for rendering HTML from Clojure +datastructures. + +[`pronouns.config`](src/pronouns/config.clj) is currently used only for loading +the [pronouns database][pronoun-database] + +The unfortunately-named [`pronouns.util`](src/pronouns/util.clj) includes both +actual utility functions used elsewhere in the code, but also what you might +think of as "controllers" if you're used to the MVC model of web design - code +that does the computations necessary for the `pages` (analogous to "views") +to render themselves. We should probably break up `util` into (at least) two +namespaces and be a little more deliberate about where everything currently +in that namespace should live! + +### Tests + +Run the suite with `lein test` + +Test coverage is not great but getting better. Please run the tests and +confirm that everything passes before merging changes, and please include +tests with any new logic you introduce in a PR! + +Goals for the future include setting up automated CI to run the tests for +us on every PR branch + ### Running the app in a dev environment First, install [leiningen](https://leiningen.org/). Then you can launch the app From f00ebc56b582bea2cfd1911403c342dca9247890 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 23:33:39 -0800 Subject: [PATCH 35/37] Remove superfluous comments --- src/pronouns/pages.clj | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj index 7fcbcbe..1226ea9 100644 --- a/src/pronouns/pages.clj +++ b/src/pronouns/pages.clj @@ -116,13 +116,6 @@ (defn footer-block [] [:footer (usage-block) (contact-block)]) -;; -;; -;; -;; -;; -;; not all of these are required! - (defn format-pronoun-examples [pronoun-declensions] (let [sub-objs (map #(s/join "/" (take 2 %)) pronoun-declensions) From 5cd81135dc572e453939be6b4f95007b8bd65ee1 Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 23:39:53 -0800 Subject: [PATCH 36/37] Update readme --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a14cd99..d306cc1 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,20 @@ on your own computer by running the following command: $ lein ring server ``` -This will launch a server running the app and open your default web browser to the index page. The server will automatically reload files as you edit them. +This will launch a server running the app and open your default web browser to +the index page. The server will automatically reload files as you edit them - +with the unfortunate exception of `pronouns.tab`, which is loaded as a resource +and requires an app restart to reload. + +### The git repo + +For most of this project's history we had separate `master` and `develop` +branches but that's proven to be more trouble than it's worth. Going +forward we'll be doing all development in feature branches off of `master`, +and PRs should be issued against `master`. + +Please follow [this guide](https://chris.beams.io/posts/git-commit/) +for writing good commit messages :) ## Philosophy on pronoun inclusion From 4e6941768364d3337bff6ac2e2be5c8db5df197b Mon Sep 17 00:00:00 2001 From: Morgan Astra Date: Wed, 14 Nov 2018 23:57:46 -0800 Subject: [PATCH 37/37] Add circleci config --- .circleci/config.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..f3e8a34 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,42 @@ +# Clojure CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-clojure/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: circleci/clojure:lein-2.7.1 + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/repo + + environment: + LEIN_ROOT: "true" + # Customize the JVM maximum heap limit + JVM_OPTS: -Xmx3200m + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "project.clj" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: lein deps + + - save_cache: + paths: + - ~/.m2 + key: v1-dependencies-{{ checksum "project.clj" }} + + # run tests! + - run: lein test