Copy connect graphql test to graphql2

Copy connect graphql test to graphql2

error: pathspec 'test/com/wsscode/pathom/connect/graphql2_test.cljc' did not match any file(s) known to git

--- test/com/wsscode/pathom/connect/graphql2_test.cljc
+++ test/com/wsscode/pathom/connect/graphql2_test.cljc
@@ -0,0 +1,386 @@
+(ns com.wsscode.pathom.connect.graphql2-test
+  (:require [clojure.test :refer [is are testing]]
+            [nubank.workspaces.core :refer [deftest]]
+            [com.wsscode.pathom.core :as p]
+            [com.wsscode.pathom.connect :as pc]
+            [com.wsscode.pathom.connect.graphql2 :as pcg]))
+
+(def query-root-type
+  (pcg/normalize-schema
+    {:name   "QueryRoot"
+     :fields [{:name "banks" :args [] :type {:kind "LIST" :name nil :ofType {:kind "OBJECT" :name "Bank"}}}
+              {:name "creditCardAccount"
+               :args [{:name "customerId" :defaultValue nil :type {:kind "SCALAR" :name "ID"}}]
+               :type {:kind "OBJECT" :name "CreditCardAccount" :ofType nil}}
+              {:name "customer"
+               :args [{:name "customerId" :defaultValue nil :type {:kind "SCALAR" :name "ID"}}]
+               :type {:kind :OBJECT :name "Customer" :ofType nil}}
+              {:name "repository"
+               :args [{:name "owner" :defaultValue nil :type {:kind "SCALAR" :name "String"}}
+                      {:name "name" :defaultValue nil :type {:kind "SCALAR" :name "String"}}]
+               :type {:kind "OBJECT" :name "Repository" :ofType nil}}
+              {:name "savingsAccount"
+               :args [{:name "customerId" :defaultValue nil :type {:kind "SCALAR" :name "ID"}}]
+               :type {:kind "OBJECT" :name "SavingsAccount" :ofType nil}}
+              {:name "viewer" :args [] :type {:kind "OBJECT" :name "Customer" :ofType nil}}]}))
+
+(def customer-type
+  {:name       "Customer"
+   :kind       "OBJECT"
+   :interfaces []
+   :fields     [{:name "id" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "ID"}}}
+                {:name "cpf" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}
+                {:name "creditCardAccount" :args [] :type {:kind "OBJECT" :name "CreditCardAccount" :ofType nil}}
+                {:name "feed" :args [] :type {:kind "LIST" :name nil :ofType {:kind "NON_NULL" :name nil :ofType {:kind "INTERFACE" :name "FeedEvent"}}}}
+                {:name "name" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}
+                {:name "preferredName" :args [] :type {:kind "SCALAR" :name "String" :ofType nil}}
+                {:name "savingsAccount" :args [] :type {:kind "OBJECT" :name "SavingsAccount" :ofType nil}}]})
+
+(def repository-type
+  {:name       "Repository"
+   :kind       "OBJECT"
+   :interfaces []
+   :fields     [{:name "id" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "ID"}}}
+                {:name "name" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}]})
+
+(def feed-event-interface
+  {:name       "FeedEvent"
+   :kind       "INTERFACE"
+   :interfaces []
+   :fields     [{:name "detail" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}
+                {:name "id" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "ID"}}}
+                {:name "postDate" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "Date"}}}
+                {:name "title" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}]})
+
+(def onboarding-event-type
+  {:name       "OnboardingEvent"
+   :kind       "OBJECT"
+   :interfaces [{:name "FeedEvent" :kind "INTERFACE"}]
+   :fields     [{:name "detail" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}
+                {:name "id" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "ID"}}}
+                {:name "postDate" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "Date"}}}
+                {:name "title" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}}}]})
+
+(def mutation-type
+  {:name   "Mutation"
+   :fields [{:name "addStar"}
+            {:name "removeStar"}
+            {:name "requestReviews"}]})
+
+(def types
+  [{:name       "CreditCardBalances"
+    :kind       "OBJECT"
+    :interfaces []
+    :fields     [{:name "available" :args [] :type {:kind "SCALAR" :name "Float" :ofType nil}}
+                 {:name "due" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "Float"}}}
+                 {:name "future" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "Float"}}}
+                 {:name "open" :args [] :type {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "Float"}}}
+                 {:name "prepaid" :args [] :type {:kind "SCALAR" :name "Float" :ofType nil}}]}
+   query-root-type
+   customer-type
+   repository-type
+   feed-event-interface
+   onboarding-event-type
+   mutation-type])
+
+(def schema
+  {:__schema
+   {:queryType    {:name "QueryRoot"}
+    :mutationType {:name "Mutation"}
+    :types        types}})
+
+(def prefix "service")
+
+(deftest test-kebab-key
+  (is (= (pcg/kebab-key "FeedEvent") :feed-event)))
+
+(deftest test-index-key
+  (is (= (pcg/index-key "FeedEvent") "feed-event")))
+
+(deftest test-type-key
+  (is (= (pcg/type-key prefix "CreditCardBalances")
+         :service.types/credit-card-balances)))
+
+(deftest test-interface-key
+  (is (= (pcg/interface-key prefix "FeedEvent")
+         :service.interfaces/feed-event)))
+
+(deftest test-type->field-entry
+  (is (= (pcg/type->field-entry prefix {:kind "SCALAR" :name "Float" :ofType nil})
+         {}))
+  (is (= (pcg/type->field-entry prefix {:kind "OBJECT" :name "CreditCardAccount" :ofType nil})
+         {:service.types/credit-card-account {}}))
+  (is (= (pcg/type->field-entry prefix {:kind "INTERFACE" :name "FeedEvent" :ofType nil})
+         {:service.interfaces/feed-event {}}))
+  (is (= (pcg/type->field-entry prefix {:kind "NON_NULL" :name nil :ofType {:kind "SCALAR" :name "String"}})
+         {}))
+  (is (= (pcg/type->field-entry prefix {:kind "NON_NULL" :name nil :ofType {:kind "OBJECT" :name "CreditCardAccount" :ofType nil}})
+         {:service.types/credit-card-account {}}))
+  (is (= (pcg/type->field-entry prefix {:kind "LIST" :name nil :ofType {:kind "OBJECT" :name "Bank"}})
+         {:service.types/bank {}})))
+
+(deftest test-index-type
+  (is (= (pcg/index-type prefix customer-type)
+         {#{:service.types/customer} #:service.customer{:cpf                 {}
+                                                        :credit-card-account #:service.types{:credit-card-account {}}
+                                                        :id                  {}
+                                                        :feed                #:service.interfaces{:feed-event {}}
+                                                        :name                {}
+                                                        :preferred-name      {}
+                                                        :savings-account     #:service.types{:savings-account {}}}}))
+
+  (is (= (pcg/index-type prefix feed-event-interface)
+         {#{:service.interfaces/feed-event} #:service.feed-event{:detail    {}
+                                                                 :id        {}
+                                                                 :post-date {}
+                                                                 :title     {}}}))
+
+  (is (= (pcg/index-type prefix onboarding-event-type)
+         {#{:service.types/onboarding-event} {:service.interfaces/feed-event      {}
+                                              :service.onboarding-event/detail    {}
+                                              :service.onboarding-event/id        {}
+                                              :service.onboarding-event/post-date {}
+                                              :service.onboarding-event/title     {}}})))
+
+
+(def supposed-resolver nil)
+
+(def indexes
+  `{::pc/index-resolvers     {com.wsscode.pathom.connect.graphql-test/supposed-resolver
+                              {::pc/sym       com.wsscode.pathom.connect.graphql-test/supposed-resolver
+                               ::pc/cache?    false
+                               ::pcg/graphql? true}}
+    ::pc/index-io            {#{:service.types/credit-card-balances}
+                              {:service.credit-card-balances/available {}
+                               :service.credit-card-balances/due       {}
+                               :service.credit-card-balances/future    {}
+                               :service.credit-card-balances/open      {}
+                               :service.credit-card-balances/prepaid   {}}
+                              #{:service.types/customer}
+                              {:service.customer/id             {}
+                               :service.customer/cpf            {}
+                               :service.customer/credit-card-account
+                                                                {:service.types/credit-card-account {}}
+                               :service.customer/feed           {:service.interfaces/feed-event {}}
+                               :service.customer/name           {}
+                               :service.customer/preferred-name {}
+                               :service.customer/savings-account
+                                                                {:service.types/savings-account {}}}
+                              #{:service.interfaces/feed-event}
+                              {:service.feed-event/detail    {}
+                               :service.feed-event/id        {}
+                               :service.feed-event/post-date {}
+                               :service.feed-event/title     {}}
+                              #{:service.types/onboarding-event}
+                              {:service.onboarding-event/detail    {}
+                               :service.onboarding-event/id        {}
+                               :service.onboarding-event/post-date {}
+                               :service.onboarding-event/title     {}
+                               :service.interfaces/feed-event      {}}
+                              #{:service.types/repository}
+                              {:service.repository/id   {}
+                               :service.repository/name {}}
+                              #{}
+                              {:service/banks               {:service.types/bank {}},
+                               :service/credit-card-account {:service.types/credit-card-account {}},
+                               :service/customer            {:service.types/customer {}},
+                               :service/repository          {:service.types/repository {}},
+                               :service/savings-account     {:service.types/savings-account {}},
+                               :service/viewer              {:service.types/customer {}}}
+                              #{:service.customer/id}
+                              {:service.types/credit-card-account {}
+                               :service.types/customer            {}
+                               :service.types/savings-account     {}}
+                              #{:service.customer/name :service.repository/name}
+                              {:service.types/repository {}}}
+    ::pc/index-oir           {:service.customer/cpf                 {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/credit-card-account {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/feed                {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/id                  {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/name                {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/preferred-name      {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.customer/savings-account     {#{:service.customer/id} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.repository/id                {#{:service.customer/name :service.repository/name} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service.repository/name              {#{:service.customer/name :service.repository/name} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/banks                        {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/credit-card-account          {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/customer                     {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/repository                   {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/savings-account              {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}
+                              :service/viewer                       {#{} #{com.wsscode.pathom.connect.graphql-test/supposed-resolver}}}
+    ::pc/autocomplete-ignore #{:service.types/onboarding-event :service.interfaces/feed-event :service.types/repository
+                               :service.types/customer :service.types/credit-card-balances}
+    ::pc/idents              #{:service.customer/id}
+    ::pc/index-mutations     {com.wsscode.pathom.connect.graphql.service-mutations/service #:com.wsscode.pathom.connect{:sym com.wsscode.pathom.connect.graphql.service-mutations/service}
+                              service/add-star                                             {::pc/sym com.wsscode.pathom.connect.graphql.service-mutations/service}
+                              service/remove-star                                          {::pc/sym com.wsscode.pathom.connect.graphql.service-mutations/service}
+                              service/request-reviews                                      {::pc/sym com.wsscode.pathom.connect.graphql.service-mutations/service}}
+    ::pcg/field->ident       {:service.customer/id
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/cpf
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/credit-card-account
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/feed
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/name
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/preferred-name
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.customer/savings-account
+                              {::pcg/entity-field :service.customer/id
+                               ::pcg/ident-key    :customer/customer-id}
+                              :service.repository/id
+                              {::pcg/entity-field [:service.customer/name :service.repository/name]
+                               ::pcg/ident-key    :repository/owner-and-name}
+                              :service.repository/name
+                              {::pcg/entity-field [:service.customer/name :service.repository/name]
+                               ::pcg/ident-key    :repository/owner-and-name}}})
+
+(deftest test-index-schema
+  (is (= (-> (pcg/index-schema {::pcg/prefix    prefix ::pcg/schema schema
+                                ::pcg/ident-map {"customer"          {"customerId" ["Customer" "id"]}
+                                                 "creditCardAccount" {"customerId" ["Customer" "id"]}
+                                                 "savingsAccount"    {"customerId" ["Customer" "id"]}
+                                                 "repository"        {"owner" ["Customer" "name"]
+                                                                      "name"  ["Repository" "name"]}}
+                                ::pcg/resolver  `supposed-resolver})
+             (update-in [::pc/index-resolvers `supposed-resolver] dissoc ::pc/compute-output ::pc/resolve)
+             (update-in [::pc/index-mutations 'com.wsscode.pathom.connect.graphql.service-mutations/service] dissoc ::pc/mutate))
+         indexes)))
+
+(deftest test-alias-for-line
+  (is (= (pcg/alias-for-line "query { \ncustomer(customerId: \"123\") {\n}}" 2)
+         nil))
+
+  (is (= (pcg/alias-for-line "query { \n_customer_customer_id_123: customer(customerId: \"123\") {\n}}" 2)
+         "_customer_customer_id_123"))
+
+  (is (= (pcg/alias-for-line "query { \n_customer_customer_id_123: customer(customerId: \"123\") {\n}}" 10)
+         nil)))
+
+(comment
+  (pcg/parser-item {::p/entity               {:itemValue {:x 1 :y 2}}
+                    ::p/placeholder-prefixes #{">"}}
+    [{:itemValue [:x {:>/sub [:y]}]}]))
+
+(deftest test-parse-item
+  (is (= (pcg/parser-item {::p/entity {}} [])
+         {}))
+  (is (= (pcg/parser-item {::p/entity {:itemValue 42}}
+           [:ns/item-value])
+         {:ns/item-value 42}))
+  (is (= (pcg/parser-item {::p/entity               {:itemValue {:x 1 :y 2}}
+                           ::p/placeholder-prefixes #{">"}}
+           [{:itemValue [:x {:>/sub [:y]}]}])
+         {:itemValue {:x 1 :>/sub {:y 2}}}))
+  (is (= (pcg/parser-item {::p/entity   {:didWrong nil}
+                           ::pcg/errors (pcg/index-graphql-errors
+                                          [{:message "Forbidden"
+                                            :path    ["didWrong"]}])}
+           [{:did-wrong [:anything]}])
+         {:did-wrong ::pcg/error}))
+  (testing "capture error"
+    (let [errors* (atom {})]
+      (is (= (pcg/parser-item {::p/entity          {:_customer_customer_id_123 {:creditCardAccount nil}}
+                               ::p/errors*         errors*
+                               ::pcg/base-path     [[:service.customer/id "123"]]
+                               ::pcg/graphql-query "query \n{_customer_customer_id_123: customer(customerId: \"123\") \n{}}"
+                               ::pcg/errors        (pcg/index-graphql-errors [{:locations [{:column 123 :line 2}]
+                                                                               :message   "Forbidden"
+                                                                               :path      ["customer" "creditCardAccount"]
+                                                                               :type      "forbidden"}])}
+               [{[:customer/customer-id "123"] [{:service.customer/credit-card-account [:service.credit-card-balances/available]}]}])
+             {[:customer/customer-id "123"] {:service.customer/credit-card-account ::pcg/error}}))
+      (is (= @errors*
+             {[[:service.customer/id "123"] :service.customer/credit-card-account] {:locations [{:column 123 :line 2}]
+                                                                                :message   "Forbidden"
+                                                                                :path      ["customer" "creditCardAccount"]
+                                                                                :type      "forbidden"}})))))
+
+(deftest test-query->graphql
+  (is (= (pcg/query->graphql [{:credit-card [:number]}])
+         "query {\n  creditCard {\n    number\n  }\n}\n")))
+
+(defn q [query]
+  (p/query->ast1 [query]))
+
+(deftest test-ast->graphql
+  (is (= (pcg/ast->graphql {:ast         (q :service/banks)
+                            ::pc/indexes indexes} {})
+         [:service/banks]))
+  (is (= (pcg/ast->graphql {:ast         (q {:service/banks [:service.bank/name]})
+                            ::pc/indexes indexes} {})
+         [{:service/banks [:service.bank/name]}]))
+  (is (= (pcg/ast->graphql {:ast         (q :service.customer/cpf)
+                            ::pc/indexes indexes}
+           {:service.customer/id "123"})
+         [{[:customer/customer-id "123"] [:service.customer/cpf]}])))
+
+(defn query-env [query-attribute entity]
+  {:ast                     (q query-attribute)
+   ::p/entity               entity
+   ::p/placeholder-prefixes #{">"}
+   ::p/parent-query         [query-attribute]
+   ::pcg/prefix             prefix
+   ::pc/indexes             indexes})
+
+(deftest test-build-query
+  (testing "build global attribute"
+    (is (= (pcg/build-query (query-env :service/banks
+                              {:service.customer/id "123"}))
+           [:service/banks])))
+
+  (testing "remove pathom params"
+    (is (= (pcg/build-query (query-env '(:service/banks {:pathom/as :banks})
+                              {:service.customer/id "123"}))
+           ['(:service/banks)])))
+
+  (testing "ident join"
+    (is (= (pcg/build-query (query-env :service.customer/cpf
+                              {:service.customer/id "123"}))
+           [{[:customer/customer-id "123"] [:service.customer/cpf]}])))
+
+  (testing "ident join on multi param input"
+    (is (= (pcg/build-query (query-env :service.repository/id
+                              {:service.customer/name   "customer"
+                               :service.repository/name "repository"}))
+           [{[:repository/owner-and-name ["customer" "repository"]] [:service.repository/id]}])))
+
+  (testing "ignores ident queries"
+    (is (= (pcg/build-query (query-env {[:service.customer/id "123"] [:service.customer/name]}
+                              {:service.customer/id "123"}))
+           [])))
+
+  (testing "merge sibling queries"
+    (is (= (pcg/build-query (assoc (query-env :service.customer/id {:service.customer/id "123"})
+                              ::p/parent-query [:service.customer/id
+                                                :service.customer/cpf
+                                                :service/banks
+                                                :service.customer/name
+                                                :other/thing]))
+           [{[:customer/customer-id "123"] [:service.customer/cpf :service.customer/name]}
+            :service/banks])))
+
+  (testing "placeholder queries"
+    (is (= (pcg/build-query (assoc (query-env :service.customer/id {:service.customer/id "123"})
+                              ::p/parent-query [:service.customer/id
+                                                {:>/thing [:service.customer/cpf]}
+                                                :service/banks
+                                                :service.customer/name
+                                                :other/thing]))
+           [:service/banks
+            {[:customer/customer-id "123"] [:service.customer/name :service.customer/cpf]}]))))
+
+(deftest test-pull-idents
+  (is (= (pcg/pull-idents {:service/banks                [{:service.bank/name "Dino"}]
+                           [:customer/customer-id "123"] {:service.customer/name "Missy"}})
+         {:service/banks         [{:service.bank/name "Dino"}]
+          :service.customer/name "Missy"})))
+


Use when-not instead of when and not

Use when-not instead of when and not

--- src/cljx/cats/core.cljx
+++ src/cljx/cats/core.cljx
@@ -149,7 +149,8 @@

   Otherwise, yields nil in a monadic context."
   [b mv]
-  (when (not b) mv))
+  (when-not b
+    mv))

 (defn lift
   "Lift a value from the inner monad of a monad transformer into a value


Remove join? parameter used by jetty but not used by http-kit.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/julianespinel/directory.git/'


more Endianness

more Endianness

Clojure

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nikai3d/ce-challenges.git/'


lib.zerol.core/fixpoint - In case of an error we return original state from now on. Applying new state may throw as well. Wrap it with try to simplify debugging

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/artemyarulin/zerol.git/'


serve static files from resources/public in development env

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fhirbase/fhirterm.git/'


Notes.

Notes.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


Refactor transducer to custom volatile update logic

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dignati/om-charts.git/'


Add revisions import

Add revisions import

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


[WM] also shorten the election date in SMS msgs

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


Add a simple windowing crash test for testing log restore

error: pathspec 'test/onyx/windowing/basic_windowing_crash_test.clj' did not match any file(s) known to git


tuning parameters

tuning parameters

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jchli/jepsen-aurora.git/'


sortu/hasi/geratu/berrabiarazi

sortu/hasi/geratu/berrabiarazi

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


Match new color scheme for clojars.org on latest-svg

--- src/clojars/web/jar.clj
+++ src/clojars/web/jar.clj
@@ -173,30 +173,49 @@
                                       :version (:version v)))
                            (:version v))])]]]))

-(defn svg-template [jar-id version]
-  (let [width-px (+ 138 (* (+ (count jar-id) (count version)) 6))]
-    [:svg {:width (str (* width-px 0.044) "cm")
-           :height "0.88cm"
-           :viewBox (str "0 0 " width-px " 20")
-           :xmlns "http://www.w3.org/2000/svg"
-           :version "1.1"}
-     [:rect {:x 0, :y 0, :width width-px, :height 20,
-             :rx 3, :fill "#444444"}]
-     [:rect {:x 2, :y 2, :width (- width-px 4), :height 16,
-             :rx 3, :fill "#1f1f1f"}]
-
-     [:text {:x 7, :y 13, :font-family "monospace",
-             :font-size 10, :fill "white"}
-      [:tspan {:fill "#ffcfaf"} "["]
-      [:tspan {:fill "#ffffff"} jar-id]
-      [:tspan " "]
-      [:tspan {:fill "#cc9393"} (str \" version \")]
-      [:tspan {:fill "#ffcfaf"} "]"]]
-
-     [:text {:x (- width-px 90), :y 15, :font-family "Verdana",
-             :font-size 7, :fill "white"}
-      [:tspan "Powered by "]
-      [:tspan {:fill "#ffcfaf"} "clojars.org"]]]))
+(let [border-color "#9c92d9"
+      bg-color "#380036"
+      artifact-color  "#ffffff"
+      version-color "#27d3f1"
+      bracket-color "#ffb338"
+      powered-by-color "#ffffff"
+      clojars-color "#ffb338"]
+  (defn svg-template [jar-id version]
+    (let [width-px (+ 138 (* (+ (count jar-id) (count version)) 6))]
+      [:svg {:width (str (* width-px 0.044) "cm")
+             :height "0.90cm"
+             :viewBox (str "0 0 " width-px " 20")
+             :xmlns "http://www.w3.org/2000/svg"
+             :version "1.1"}
+       [:rect {:x 0,
+               :y 0,
+               :width width-px,
+               :height 20,
+               :rx 3,
+               :fill border-color}]
+       [:rect {:x 2,
+               :y 2,
+               :width (- width-px 4),
+               :height 16,
+               :rx 3,
+               :fill bg-color}]
+       [:text {:x 7,
+               :y 13,
+               :font-family "monospace",
+               :font-size 10,
+               :fill "#dddddd"}
+        [:tspan {:fill bracket-color} "["]
+        [:tspan {:fill artifact-color} jar-id]
+        [:tspan " "]
+        [:tspan {:fill version-color} (str \" version \")]
+        [:tspan {:fill bracket-color} "]"]]
+       [:text {:x (- width-px 55),
+               :y 14,
+               :font-family "Verdana",
+               :font-size 8,
+               :fill powered-by-color}
+        [:tspan "@"]
+        [:tspan {:fill clojars-color} "clojars.org"]]])))

 (defn make-latest-version-svg [group-id artifact-id]
   (let [jar (find-jar group-id artifact-id)]


added prelim recoverer

added prelim recoverer

error: pathspec 'src/crawler/recover.clj' did not match any file(s) known to git

--- src/crawler/recover.clj
+++ src/crawler/recover.clj
@@ -0,0 +1,83 @@
+(ns crawler.recover
+  "Module containing code to recover a sitemap")
+
+(defn crawl-stream
+  [corpus-file]
+  (let [stream (-> corpus-file
+                   clojure.java.io/reader
+                   (java.io.PushbackReader.))]
+    (take-while
+     identity
+     (repeatedly
+      #(try
+         (read stream)
+         (catch Exception e nil))))))
+
+(defn web-graph
+  [stream]
+  (map
+   #(dissoc % :body)
+   stream))
+
+(defn xpath-histogram
+  [xpaths]
+  (reduce
+   (fn [acc a-node]
+     (merge-with +' acc {(:src-xpath a-node) 1}))
+   {}
+   xpaths))
+
+(defn choose-xpaths
+  [xpath-histogram]
+  (let [scores-sum (reduce
+                    (fn [acc [xpath n]]
+                      (+ acc n))
+                    0
+                    xpath-histogram)
+
+        normalized (reverse
+                    (sort-by
+                     second
+                     (map
+                      (fn [[xpath n]]
+                        [xpath (/ n scores-sum)])
+                      xpath-histogram)))
+        hist-stuff (reduce
+                    (fn [acc [xpath count]]
+                      (if (>= (:count acc) 0.9)
+                        acc
+                        {:count (+ (:count acc) count)
+                         :xpaths (conj (:xpaths acc) xpath)}))
+                    {:count  0
+                     :xpaths []}
+                    normalized)]
+    (:xpaths hist-stuff)))
+
+(defn recover-leaves
+  "For recovery, we want to recover close to 90% of
+   threads."
+  ([corpus-file]
+     (recover-leaves nil (-> corpus-file crawl-stream web-graph)))
+
+  ([srcs corpus-stream]
+     (let [source-set    (set srcs)
+
+           stream        (web-graph corpus-stream)
+           leaves        (if (not srcs)
+                           (filter
+                           (fn [x] (:leaf? x))
+                           stream)
+                           (filter
+                            (fn [x]
+                             (some #{(:src-url x)} source-set))
+                            stream))
+
+           histogram     (xpath-histogram leaves)
+           chosen-xpaths (choose-xpaths histogram)
+           src-links     (map
+                          (fn [x] (:src-url x))
+                          (filter
+                           #(some #{(:src-xpath %)} (set chosen-xpaths))
+                           leaves))]
+
+       src-links)))


Fixing compilation error.

Fixing compilation error.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/alexflav23/clojure.git/'


Moved unit tests in from cmr-opendap.

Moved unit tests in from cmr-opendap.

error: pathspec 'test/cmr/exchange/common/tests/unit/results/errors.clj' did not match any file(s) known to git

--- test/cmr/exchange/common/tests/unit/results/errors.clj
+++ test/cmr/exchange/common/tests/unit/results/errors.clj
@@ -0,0 +1,59 @@
+(ns cmr.exchange.common.tests.unit.results.errors
+  "Note: this namespace is exclusively for unit tests."
+  (:require
+   [clojure.test :refer :all]
+   [cmr.exchange.common.results.errors :as errors]))
+
+(def test-status-map
+  (merge errors/status-map
+         {errors/server-error-code #{"Server problem"}}))
+
+;; XXX Some of these tests may need to be moved into
+;;     cmr.exchange.common.tests.unit.results.errors
+(deftest any-client-errors?
+  (is (not (errors/any-client-errors? {:errors []})))
+  (is (errors/any-client-errors? errors/status-map
+                                 {:errors ["Oops"
+                                           errors/invalid-parameter]}))
+  (is (errors/any-client-errors? errors/status-map
+                                 {:errors [errors/invalid-parameter]})))
+
+(deftest any-server-errors?
+  (is (not (errors/any-server-errors? {:errors []})))
+  (is (not (errors/any-server-errors? {:errors ["Oops"]})))
+  (is (not (errors/any-server-errors? {:errors [errors/missing-parameters]})))
+  (is (errors/any-server-errors? test-status-map
+                                 {:errors ["Oops"
+                                           errors/missing-parameters
+                                           "Server problem"]}))
+  (is (errors/any-server-errors? test-status-map
+                                 {:errors ["Server problem"]})))
+
+(deftest erred?
+  (is (errors/erred? {:error ["an error message"]}))
+  (is (errors/erred? {:errors ["an error message"]}))
+  (is (not (errors/erred? {:data "stuff"}))))
+
+(deftest any-erred?
+  (is (not (errors/any-erred? [{}])))
+  (is (not (errors/any-erred? [])))
+  (is (not (errors/any-erred? [{:data "stuff"}])))
+  (is (errors/any-erred? [{:errors ["an error message"]}]))
+  (is (errors/any-erred? [{:errors ["an error message"]}
+                          {:data "stuff"}]))
+  (is (errors/any-erred? [{:error "an error message"}
+                          {:errors ["an error message"]}])))
+
+(deftest collect
+  (is (= nil (errors/collect nil)))
+  (is (= nil (errors/collect [])))
+  (is (= nil (errors/collect {} {})))
+  (is (= nil (errors/collect {:data "stuff"})))
+  (is (= {:errors ["an error message"]}
+         (errors/collect {:errors ["an error message"]})))
+  (is (= {:errors ["an error message"]}
+         (errors/collect {:errors ["an error message"]}
+                         {:data "stuff"})))
+  (is (= {:errors ["error message 1" "error message 2"]}
+         (errors/collect {:error "error message 1"}
+                         {:errors ["error message 2"]}))))


don't run tests twice

don't run tests twice

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/JetBrains/imperative-nodejs.git/'


Move /annotations/:id out of entities

Move /annotations/:id out of entities

`/annotations/:id` needs to be available with only an annotation ID for use from the indexer service


Working the macro chapter

Working the macro chapter

error: pathspec 'brave-true/clojure-noob/src/clojure_noob/macros.clj' did not match any file(s) known to git

--- brave-true/clojure-noob/src/clojure_noob/macros.clj
+++ brave-true/clojure-noob/src/clojure_noob/macros.clj
@@ -0,0 +1,249 @@
+(ns clojure-noob.macros
+  (:require [midje.sweet :refer :all]))
+
+
+(fact "'when' is implemented in terms of 'if' and 'do':"
+  (macroexpand '(when boolean-expression
+                expression-1
+                expression-2
+                expression-3))
+ =>
+ '(if boolean-expression
+    (do expression-1
+        expression-2
+        expression-3)))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; anatomy of a macro
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defmacro postfix-notation
+  "I'm too indie for prefix notation"
+  [expression]
+  (conj (butlast expression) (last expression)))
+
+(fact "You call macros just like you would a function or special form:"
+
+  (postfix-notation (1 1 +))
+  => 2)
+
+(fact "use conj, butlast, and last functions to rearrange the list so that
+       it's something Clojure can evaluate:"
+
+  (macroexpand '(postfix-notation (1 1 +)))
+  => '(+ 1 1))
+
+;; you can use argument destructuring in macro definitions argument
+;; destructuring, just like you can with functions:
+
+(defmacro code-critic
+  "phrases are courtesy Hermes Conrad from Futurama"
+  [{:keys [good bad]}]
+  (list 'do
+        (list 'println
+              "Great squid of Madrid, this is bad code:"
+              (list 'quote bad))
+        (list 'println
+              "Sweet gorilla of Manila, this is good code:"
+              (list 'quote good))))
+
+(fact
+
+  (code-critic {:good (+ 1 1) :bad (1 + 1)})
+;;Great squid of Madrid, this is bad code: (1 + 1)
+;;Sweet gorilla of Manila, this is good code: (+ 1 1)
+  => nil)
+
+(fact  "lets look at the output of the macro"
+
+  (macroexpand '(code-critic {:good (+ 1 1) :bad (1 + 1)}))
+  =>
+  '(do (println "Great squid of Madrid, this is bad code:" (quote (1 + 1))) (println "Sweet gorilla of Manila, this is good code:" (quote (+ 1 1)))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; building lists for evaluation
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; be careful about distinguishing symbols and values
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; the postfix-notation example
+
+(defmacro postfix-notation
+  [expression]
+  (conj (butlast expression) (last expression)))
+
+(fact
+
+  (macroexpand '(postfix-notation (1 1 +)))
+  => '(+ 1 1)
+
+  (postfix-notation (1 1 +))
+  => 2)
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; simple quoting
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; a brief refresher on quoting:
+
+(fact "No quoting"
+
+  (+ 1 2)
+  => 3)
+
+(fact "Quoting returns unevaluated data structure
+       + is a symbol in the returned list"
+
+  (quote (+ 1 2))
+  => '(+ 1 2))
+
+;; Evaluating the plus symbol yields the plus function
++
+;; => #<core$_PLUS_ clojure.core$_PLUS_@47b36583>
+
+(fact "Quoting the plus symbol yields the plus symbol"
+
+  (quote +)
+  => '+)
+
+;(fact "Evaluating an unbound symbol raises an exception"
+;  sweating-to-the-oldies
+;  => (throws Exception))
+;"Unable to resolve symbol: sweating-to-the-oldies in this context"
+
+
+(fact "quoting returns a symbol regardless of whether the symbol
+       has a value associated with it"
+
+  (quote sweating-to-the-oldies)
+  => 'sweating-to-the-oldies)
+
+(fact "The single quote character is a shorthand for (quote x)
+        This example works just like (quote (+ 1 2))"
+
+  '(+ 1 2)
+  => '(+ 1 2))
+
+(fact
+
+  'dr-jekyll-and-richard-simmons
+  => 'dr-jekyll-and-richard-simmons)
+
+
+;;(defmacro when
+;;  "Evaluates test. If logical true, evaluates body in an implicit do."
+;;  {:added "1.0"}
+;;  [test & body]
+;;  (list 'if test (cons 'do body)))
+
+(fact
+  (macroexpand '(when (the-cows-come :home)
+                  (call me :pappy)
+                  (slap me :silly)))
+  =>
+  '(if (the-cows-come :home)
+     (do (call me :pappy)
+         (slap me :silly))) )
+
+(defmacro unless
+  "Inverted 'if'"
+  [test & branches]
+  (conj (reverse branches) test 'if))
+
+(fact
+  (macroexpand '(unless (done-been slapped? me)
+                        (slap me :silly)
+                        (say "I reckon that'll learn me")))
+  =>
+  '(if (done-been slapped? me)
+     (say "I reckon that'll learn me")
+     (slap me :silly)))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; syntax quoting
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defmacro code-critic-old
+  "phrases are courtesy Hermes Conrad from Futurama"
+  [{:keys [good bad]}]
+  (list 'do
+        (list 'println
+              "Great squid of Madrid, this is bad code:"
+              (list 'quote bad))
+        (list 'println
+              "Sweet gorilla of Manila, this is good code:"
+              (list 'quote good))))
+
+
+;; using syntax-quote
+(defmacro code-critic
+  "phrases are courtesy Hermes Conrad from Futurama"
+  [{:keys [good bad]}]
+  `(do (println "Great squid of Madrid, this is bad code:"
+                (quote ~bad))
+       (println "Sweet gorilla of Manila, this is good code:"
+                (quote ~good))))
+
+
+(fact "Quoting does not include a namespace unless your code
+       includes a namespace"
+  '+
+
+  => '+)
+
+(fact "Write out the namespace and it'll be returned by normal quote"
+
+  'clojure.core/+
+  => 'clojure.core/+ )
+
+
+(fact "Syntax quoting will always include the symbol's full namespace  "
+
+  `+
+  => clojure.core/+)
+
+(fact "Quoting a list"
+
+  '(+ 1 2)
+  => '(+ 1 2))
+
+(fact "Syntax-quoting a list"
+
+  `(+ 1 2)
+  => '(clojure.core/+ 1 2))
+
+
+(fact "the tilde"
+
+  `(+ 1 ~(inc 1))
+  => (clojure.core/+ 1 2))
+
+(fact "Without the unquote, syntax quote returns the unevaluated
+       form with fully qualified symbols:"
+
+  `(+ 1 (inc 1))
+  => '(clojure.core/+ 1 (clojure.core/inc 1)))
+
+(facts "three examples of building a list:"
+
+  (fact  "Building a list with the list function"
+
+    (list '+ 1 (inc 1))
+    => '(+ 1 2))
+
+  (fact "Building a list from a quoted list - super awkward"
+
+    (concat '(+ 1) (list (inc 1)))
+    => '(+ 1 2))
+
+  (fact "Building a list with unquoting"
+
+    `(+ 1 ~(inc 1))
+    => '(clojure.core/+ 1 2))  )
+
+


improve searching

improve searching

So, if we have UUID values in the identifiers,
we just pull them out and search on those, as
that gives us a lot better index performance, and
then we filter after the fact. If we don't we still
just search on the whole set.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/scheduled-message-works.git/'


Add in record namespace.

Add in record namespace.

error: pathspec 'src/smallex/records.clj' did not match any file(s) known to git

--- src/smallex/records.clj
+++ src/smallex/records.clj
@@ -0,0 +1,5 @@
+(ns smallex.records)
+
+(defrecord Grammar [rules aliases])
+
+(defrecord Expression [op args])


bumped up Selmer version

bumped up Selmer version

--- luminus/hello/project.clj
+++ luminus/hello/project.clj
@@ -6,7 +6,7 @@
    [lib-noir "0.6.6"]
    [compojure "1.1.5"]
    [ring-server "0.2.8"]
-   [selmer "0.3.6"]
+   [selmer "0.4.0"]
    [com.taoensso/timbre "1.6.0"]
    [com.postspectacular/rotor "0.1.0"]
    [com.taoensso/tower "1.5.1"]


scaling to 1000x1000

scaling to 1000x1000

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tiagoantao/turtle.git/'


Remove redundant overflow-y style

Remove redundant overflow-y style

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Reefersleep/sleepydo.git/'


type hints for cache method invocations

type hints for cache method invocations

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/transwarp.git/'


Add main.clj to handle the running and server starting

error: pathspec 'src/deadman/main.clj' did not match any file(s) known to git

--- src/deadman/main.clj
+++ src/deadman/main.clj
@@ -0,0 +1,6 @@
+(ns deadman.main
+  (:require [deadman.core :as core]
+            [ring.adapter.jetty :as jetty]))
+
+(defn -main [port]
+  (jetty/run-jetty core/app {:port (Integer. port) :join? false}))


Remove user existence leak in login and password reset endpoints

--- src/metabase/api/session.clj
+++ src/metabase/api/session.clj
@@ -20,7 +20,8 @@
    password [Required NonEmptyString]}
   (let [user (sel :one :fields [User :id :password_salt :password] :email email (korma/where {:is_active true}))]
     (checkp (not (nil? user))
-      (symbol "email") "no account found for the given email")
+    ; Don't leak whether the account doesn't exist or the password was incorrect
+      (symbol "password") "did not match stored password")
     (checkp (pass/verify-password password (:password_salt user) (:password user))
       (symbol "password") "did not match stored password")
     (let [session-id (str (java.util.UUID/randomUUID))]
@@ -51,11 +52,12 @@
   (let [{user-id :id} (sel :one User :email email)
         reset-token (java.util.UUID/randomUUID)
         password-reset-url (str origin "/auth/reset_password/" reset-token)]
-    (checkp (not (nil? user-id))
-      (symbol "email") "no account found for the given email")
-    (upd User user-id :reset_token reset-token :reset_triggered (System/currentTimeMillis))
-    (email/send-password-reset-email email server-name password-reset-url)
-    (log/info password-reset-url)))
+    ; Don't leak whether the account doesn't exist, just pretend everything is ok
+    (if (not (nil? user-id))
+      (do
+        (upd User user-id :reset_token reset-token :reset_triggered (System/currentTimeMillis))
+        (email/send-password-reset-email email server-name password-reset-url)
+        (log/info password-reset-url)))))

 (defendpoint POST "/reset_password"


Fix heartbeat interval

Fix heartbeat interval

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/tobiasbayer/eureka-client.git/'


build url

build url

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/max-neverov/ads-client.git/'


extra tests for statements

extra tests for statements

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mprokopov/privat24-manager.git/'


add bundle link

add bundle link

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fhirbase/fhirplace.git/'


Log REPL server startup.

Log REPL server startup.

--- src/riemann/repl.clj
+++ src/riemann/repl.clj
@@ -4,6 +4,7 @@
   above them. While you usually *start* a repl server from the config file, it
   is not bound to the usual config lifecycle and won't be shut down or
   interrupted during config reload."
+  (:use clojure.tools.logging)
   (:require [clojure.tools.nrepl.server :as nrepl]))

 (def server nil)
@@ -16,16 +17,18 @@
   (def server nil))

 (defn start-server!
-  "Starts a new repl server. Options:
+  "Starts a new repl server. Stops the old server first, if any. Options:

   :host (default \"127.0.0.1\")
   :port (default 5557)"
   [opts]
   (stop-server!)
-  (let [opts (apply hash-map opts)]
+  (let [opts (merge {:port 5557 :host "127.0.0.1"}
+                    (apply hash-map opts))]
     (def server (nrepl/start-server
-                  :port (get opts :port 5557)
-                  :bind (get opts :host "127.0.0.1")))))
+                  :port (:port opts)
+                  :bind (:host opts)))
+    (info "REPL server" opts "online")))

 (defn start-server
   "Starts a new REPL server, when one isn't already running."


creating a domain and setting its options works

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/narkisr/cloujsearch.git/'


remove all catalog

remove all catalog

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


add alternate search url

add alternate search url


Liburua besterik gabe gehitu

Liburua besterik gabe gehitu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.bez.git/'


[WM DG] simplify entity->instructions

[WM DG] simplify entity->instructions

...and fix voter-reg-method instructions. The failing test added in the
last commit is now a passing test.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-authority-works.git/'


Read data too, no ceremony.

Read data too, no ceremony.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/mtravers/incidents.git/'


directly :require cheshire.factory so that when we call our hack a few lines below there is no possible issues of NS not found.

--- src/metabase/middleware/format.clj
+++ src/metabase/middleware/format.clj
@@ -1,5 +1,6 @@
 (ns metabase.middleware.format
-  (:require [clojure.core.match :refer [match]]
+  (:require [cheshire.factory :require :all]
+            [clojure.core.match :refer [match]]
             [medley.core :refer [filter-vals map-vals]]
             [metabase.util :as util]))


[Add] file util_test, test reftype?

[Add] file util_test, test reftype?

error: pathspec 'test/clj_elm/util_test.clj' did not match any file(s) known to git

--- test/clj_elm/util_test.clj
+++ test/clj_elm/util_test.clj
@@ -0,0 +1,13 @@
+(ns clj-elm.core-test
+  (:require [clj-elm.util :refer :all]
+            [midje.sweet :refer :all]
+            [midje.repl :refer (autotest load-facts)]))
+
+(facts "test-reftype?"
+  (fact "(reftype? obj)"
+    (reftype? 3)
+    => false
+    (reftype? (atom 1))
+    => true
+    (reftype? (ref 3))
+    => true))


Clean up old temporary fix

Clean up old temporary fix

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-notification-works.git/'


Renames for clarity, small bugfix

Renames for clarity, small bugfix

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/turbovote-http-api.git/'


Start use raw WB data

Start use raw WB data

error: pathspec 'src/clj_simple_chart/bp/wb_raw.clj' did not match any file(s) known to git

--- src/clj_simple_chart/bp/wb_raw.clj
+++ src/clj_simple_chart/bp/wb_raw.clj
@@ -0,0 +1,62 @@
+(ns clj-simple-chart.bp.wb-raw
+  (:require [clj-http.client :as client]
+            [clojure.test :as test]
+            [clj-simple-chart.csv.csvmap :as csv]
+            [clojure.data.json :as json]))
+
+(def urls {"SP.POP.TOTL" :population
+           })
+
+(def cached-get (memoize client/get))
+
+(def cc2 (json/read-str (:body (cached-get "https://raw.githubusercontent.com/ivarref/bp-diagrams/master/data/slim-2.json"))))
+(def cc3 (json/read-str (:body (cached-get "https://raw.githubusercontent.com/ivarref/bp-diagrams/master/data/slim-3.json"))))
+
+(def cc3-to-cc2
+  (->> [cc2 cc3]
+       (flatten)
+       (group-by (fn [x] (get x "name")))
+       (vals)
+       (mapv #(reduce merge {} %))
+       (reduce (fn [o v] (assoc o (get v "alpha-3") (get v "alpha-2"))) {})))
+
+(def country-name (keyword "Country Name"))
+(def country-code (keyword "Country Code"))
+
+(defn parse-country-record [prop c]
+  (let [country (get c country-name)
+        country-code (get c country-code)]
+    (reduce (fn [o [k v]]
+              (if (or (= k country)
+                      (= k (keyword "Country"))
+                      (= k country-code)
+                      (zero? (count (name k))))
+                o
+                (let [year-value (read-string (name k))
+                      vv (if (= "" v) nil (read-string v))]
+                  (assert (integer? year-value) (str "Expected column/year to be integer, was >" year-value "<"))
+                  (conj o {:country      country
+                           :country_code (keyword (get cc3-to-cc2 country-code))
+                           :year         year-value
+                           prop          vv})))) [] c)))
+
+(defn parse-url [indicator prop]
+  (let [resp (cached-get (str "http://api.worldbank.org/countries/all/indicators/" indicator "?format=csv"))
+        expected-columns [country-code country-name]
+        csv-map (csv/csv-map (:body resp))]
+    (spit (str "./data/wb/" indicator ".csv") (:body resp))
+    (test/is (= 200 (:status resp)))
+    (println (:columns csv-map))
+    (->> csv-map
+         (csv/assert-columns expected-columns)
+         (:data)
+         (mapv (partial parse-country-record prop))
+         (flatten))))
+
+(def all-data (->> urls
+                   (mapv #(parse-url (first %) (second %)))
+                   (flatten)))
+
+;(defonce resp (client/get source-url))
+;(test/is (= 200 (:status resp)))
+;(def data (csv/csv-map (:body resp)))


moved delete team button into column

moved delete team button into column

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojurecup/cc2014-frontend.git/'


Add place-holder for chapter 8

Add place-holder for chapter 8

error: pathspec 'src/clojure/clojure_walkthrough/cjia/ch08_xx.clj' did not match any file(s) known to git

--- src/clojure/clojure_walkthrough/cjia/ch08_xx.clj
+++ src/clojure/clojure_walkthrough/cjia/ch08_xx.clj
@@ -0,0 +1,3 @@
+(ns clojure-walkthrough.cjia.ch08-xx)
+
+;; More on functional programming


Define user ports in config with schema

Define user ports in config with schema

--- dev/src/yada/dev/config.clj
+++ dev/src/yada/dev/config.clj
@@ -5,10 +5,12 @@
    [schema.core :as s]
    [aero.core :refer (read-config)]))

+(s/defschema UserPort (s/both s/Int (s/pred #(<= 1024 % 65535))))
+
 (s/defschema ConfigSchema
   {:prefix s/Str
-   :ports {:docsite (s/maybe s/Int)
-           :cors-demo (s/maybe s/Int)}})
+   :ports {:docsite UserPort
+           :cors-demo UserPort}})

 (defn config
   "Return a map of the static configuration used in the component


WIP: fault tolerance test to kill/start peers.

error: pathspec 'test/onyx/peer/fault_tolerance.clj' did not match any file(s) known to git

--- test/onyx/peer/fault_tolerance.clj
+++ test/onyx/peer/fault_tolerance.clj
@@ -0,0 +1,78 @@
+(ns onyx.peer.fault-tolerance
+  (:require [onyx.helper-env :as helper-env :refer [->TestEnv map->TestEnv]]
+            [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
+            [midje.sweet :refer :all]
+            [onyx.peer.task-lifecycle-extensions :as l-ext]
+            [onyx.extensions :as extensions]
+            [com.stuartsierra.component :as component]
+            [onyx.plugin.core-async :refer [take-segments!]]
+            [onyx.test-helper :refer [load-config]]
+            [onyx.api]))
+
+(def id (java.util.UUID/randomUUID))
+
+(def config (load-config))
+
+(def test-env (component/start (->TestEnv (:env-config config) (:peer-config config))))
+
+(def batch-size 5)
+
+(def process-middle identity)
+
+(def catalog
+  [{:onyx/name :in
+    :onyx/ident :core.async/read-from-chan
+    :onyx/type :input
+    :onyx/medium :core.async
+    :onyx/batch-size batch-size
+    :onyx/doc "Reads segments from a core.async channel"}
+
+   {:onyx/name :inc
+    :onyx/fn :onyx.peer.fault-tolerance/process-middle
+    :onyx/type :function
+    :onyx/batch-size batch-size}
+
+   {:onyx/name :out
+    :onyx/ident :core.async/write-to-chan
+    :onyx/type :output
+    :onyx/medium :core.async
+    :onyx/batch-size batch-size
+    :onyx/doc "Writes segments to a core.async channel"}])
+
+(def workflow [[:in :inc] [:inc :out]])
+
+(def in-chan (chan (inc n-messages)))
+
+(def out-chan (chan (inc n-messages)))
+
+(defmethod l-ext/inject-lifecycle-resources :in
+  [_ _] {:core.async/chan in-chan})
+
+(defmethod l-ext/inject-lifecycle-resources :out
+  [_ _] {:core.async/chan out-chan})
+
+(def incomplete
+  (atom #{}))
+
+(def n-messages-total 10000)
+
+(def load-data-fut (future
+                     (loop [ls (repeatedly n-messages-total (fn [] {:id (java.util.UUID/randomUUID)}))]
+                       (let [segment (first ls)]
+                         (swap! incomplete conj segment)
+                         (>!! in-chan segment)
+                         (recur (rest ls))))
+                     (>!! in-chan :done)
+                     (close! in-chan)))
+
+(try
+  (helper-env/add-peers test-env 5)
+  (let [job-id  (:job-id (helper-env/run-job test-env
+                                             {:catalog catalog
+                                              :workflow workflow
+                                              :task-scheduler :onyx.task-scheduler/balanced}))]
+
+    (fact (set (take-segments! out-chan)) => (conj @incomplete :done))
+    (finally
+      (component/stop test-env))))
+


Adds functions to load instance configuration settings

error: pathspec 'reports/src/reports/config.clj' did not match any file(s) known to git

--- reports/src/reports/config.clj
+++ reports/src/reports/config.clj
@@ -0,0 +1,27 @@
+(ns reports.config
+  (:import org.apache.commons.io.FileUtils
+           java.io.File)
+  (:require [clojure.java.io :as io]))
+
+
+(defn- load-properties [file]
+  "Returns a map {uploadUrl, {props}}
+   Loads a java.util.Properties file. It assumes that is an UploadConstants.properties
+   and that the `uploadUrl` key is present."
+  (with-open [is ^java.io.InputStream (io/input-stream file)]
+    (let [props (java.util.Properties.)]
+      (.load props is)
+      (assoc {} (.getProperty ^java.util.Properties props "uploadUrl") props))))
+
+(defn- list-properties-files [path]
+  "List all files in the path (including subfolders) filtering by .properties files"
+  (let [exts (into-array String ["properties"])]
+    (FileUtils/listFiles (io/file path) exts true)))
+
+(defn load-settings [path]
+  "Returns a map of all UploadConstants.properties files in a directory"
+  (loop [files (filter #(= "UploadConstants.properties" (.getName ^File %)) (list-properties-files path))
+         m {}]
+    (if-not (seq files)
+      m
+      (recur (next files) (into m (load-properties (first files)))))))


quark test

quark test

error: pathspec 'test/quark/tree_tokenizer_test.clj' did not match any file(s) known to git

--- test/quark/tree_tokenizer_test.clj
+++ test/quark/tree_tokenizer_test.clj
@@ -0,0 +1,17 @@
+(ns quark.tree-tokenizer-test
+  (:require [clojure.test :refer :all]
+            [clojure.pprint :refer [pprint]]
+            [atom-finder.constants :refer :all]
+            [atom-finder.util :refer :all]
+            [clj-cdt.clj-cdt :refer :all]
+            [clj-cdt.writer-util :refer :all]
+            [quark.tree-tokenizer :refer :all]
+            ))
+
+(when (-> system-include-paths empty? not)
+  (deftest system-include-test
+    (-> "#include <algorithm>"
+        (parse-source {:include-dirs system-include-paths})
+        write-tree empty? not is)
+    ))
+


fix unintended indenting

fix unintended indenting

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/election-mail-works.git/'


clients.foursquare - return foursquare venues unmodified

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jamppa/pushify-server.git/'


Start on Clojure Alchemy

Start on Clojure Alchemy

error: pathspec 'brave-true/clojure-noob/src/clojure_noob/alchemy.clj' did not match any file(s) known to git

--- brave-true/clojure-noob/src/clojure_noob/alchemy.clj
+++ brave-true/clojure-noob/src/clojure_noob/alchemy.clj
@@ -0,0 +1,2 @@
+(ns clojure-noob.alchemy
+  (:require [midje.sweet :refer :all]))


add property migration

add property migration


reveal ez kargatu

reveal ez kargatu


REST API: fix POST request

REST API: fix POST request

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/demas/cowl.git/'


Endpoints for creating/deleting topics (entirely in-memory)_

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jffry/imgcast.git/'


Added new file for blog-level data munging.

error: pathspec 'src/dragon/blog.clj' did not match any file(s) known to git

--- src/dragon/blog.clj
+++ src/dragon/blog.clj
@@ -0,0 +1,116 @@
+(ns dragon.blog
+  (:require [clojure.set :refer [union]]
+            [dragon.blog.files :as files]
+            [dragon.blog.post :as post]
+            [dragon.util :as util]
+            [trifl.core :refer [->int]]))
+
+(defn compare-timestamp
+  [a b]
+  (< (:timestamp-long a)
+     (:timestamp-long b)))
+
+(defn compare-category
+  [a b]
+  (compare (:category a)
+           (:category b)))
+
+(defn compare-author
+  [a b]
+  (compare (:author a)
+           (:author b)))
+
+(defn group-by-year
+  [data]
+  (group-by
+    #(->int (get-in % [:date :year]))
+    data))
+
+(defn group-by-month
+  [data]
+  (map
+    (fn [[month posts]]
+      {:month month :posts posts})
+    (group-by
+      #(->int (get-in % [:date :month]))
+      data)))
+
+(defn group-by-category
+  [data]
+  (group-by :category data))
+
+(defn group-by-tag
+  [data tag]
+  {:tag tag
+   :posts (filter #(contains? (:tags %) tag) data)})
+
+(defn group-by-author
+  [data]
+  (group-by :author data))
+
+(defn group-year-by-month
+  [[year-key  year-data]]
+  {:year year-key
+   :months (group-by-month year-data)})
+
+(defn update-category-groups
+  [[cat-key cat-data]]
+  {:category cat-key
+   :posts cat-data})
+
+(defn update-author-groups
+  [[auth-key auth-data]]
+  {:author auth-key
+   :posts auth-data})
+
+(defn get-posts
+  []
+  (map (fn [x]
+         {:file x})
+       (util/get-files "posts")))
+
+(defn process
+  [uri-base]
+  (->> (get-posts)
+       (map (partial post/process uri-base))
+       (sort compare-timestamp)))
+
+(defn tags
+  [data]
+  (->> data
+       (map :tags)
+       (apply union)))
+
+(defn data-for-archives
+  [data]
+  (->> data
+       (group-by-year)
+       (map group-year-by-month)))
+
+(defn data-for-categories
+  [data]
+  (->> data
+       (group-by-category)
+       (map update-category-groups)
+       (sort compare-category)))
+
+(defn data-for-tags
+  [data]
+  (let [all-tags (tags data)]
+    (map (partial group-by-tag data) all-tags)))
+
+(defn data-for-authors
+  [data]
+  (->> data
+       (group-by-author)
+       (map update-author-groups)
+       (sort compare-author)))
+
+(defn get-archive-routes
+  [data & {:keys [uri-base gen-func]}]
+  (let [route (format "%s/%s" uri-base (:uri-path data))
+        data (gen-func data)]
+    (->> data
+         (data-for-archives)
+         [route data]
+         (into {}))))


funstruct-base

funstruct-base

error: pathspec 'src/clj/funstructor/funstruct-base.clj' did not match any file(s) known to git

--- src/clj/funstructor/funstruct-base.clj
+++ src/clj/funstructor/funstruct-base.clj
@@ -0,0 +1,38 @@
+(ns funstructor.funstruct-base)
+
+
+(def funstructs
+  {:abs
+   "(defn abs [x] (if (pos? x) x (- x)))"
+
+   :even?
+   ""})
+
+(def id-regex "[a-zA-Z\\?\\!\\+\\-\\*\\/][a-zA-Z\\?\\!\\+\\-\\*\\/0-9]*")
+
+(defn id? [s]
+  (re-matches (re-pattern id-regex) s))
+
+(defn num? [s]
+  (try (Long/parseLong s)
+       (catch NumberFormatException e nil)))
+
+(defn token->terminal [token]
+  (let [m {"(" {:terminal :left-paren}
+           ")" {:terminal :right-paren}
+           "[" {:terminal :left-square}
+           "]" {:terminal :right-square}}
+        detected (get m token)]
+    (cond
+     detected detected
+     (id? token) {:terminal :id :value token}
+     (num? token) {:terminal :num :value token}
+     :else (throw (IllegalArgumentException.
+                   "Invalid token")))))
+
+(defn s->funstruct [s]
+  (-> (str "\\(|\\)|\\[|\\]|[0-9]+|" id-regex)
+      (re-pattern)
+      (re-seq s)
+      (#(map token->terminal %))
+      (vec)))


Day 5 md5

Day 5 md5

error: pathspec 'src/advent_2016/day_5/md5.cljs' did not match any file(s) known to git

--- src/advent_2016/day_5/md5.cljs
+++ src/advent_2016/day_5/md5.cljs
@@ -0,0 +1,9 @@
+(ns advent-2016.day-5.md5
+  (:require [goog.crypt :as gcrypt])
+  (:import (goog.crypt Md5)))
+
+(defn md5
+  [s]
+  (-> (doto (Md5.) (.update (gcrypt/stringToUtf8ByteArray s)))
+    .digest
+    gcrypt/byteArrayToHex))


show-user takes a user map, not a username string

Reported by amalloy, closes #28

--- src/clojars/web.clj
+++ src/clojars/web.clj
@@ -89,7 +89,7 @@
   (GET "/:user" {session :session {user "user"} :params}
     (if-let [user (with-db (find-user user))]
       (try-account
-       (show-user account (:user user)))
+       (show-user account user))
       :next))
   (ANY "*" {session :session}
     (html-doc (session :account) "Page not found" (not-found-doc))))


Placeholder for maps utilities

Placeholder for maps utilities

error: pathspec 'src/cljs/gtfve/utils/maps.cljs' did not match any file(s) known to git

--- src/cljs/gtfve/utils/maps.cljs
+++ src/cljs/gtfve/utils/maps.cljs
@@ -0,0 +1 @@
+(ns gtfve.utils.maps)


Simple pattern matching interop

Simple pattern matching interop

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/michaelsbradleyjr/shen.clj.git/'


avaliable → available

avaliable → available

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/piranha/rum.git/'


include :can_read and :can_write for dashboards so that we can make smarter visibility choices on the frontend.

--- src/metabase/api/dash.clj
+++ src/metabase/api/dash.clj
@@ -21,7 +21,7 @@
         :all  (sel :many Dashboard (k/where (or {:creator_id *current-user-id*}
                                                 {:public_perms [> common/perms-none]})))
         :mine (sel :many Dashboard :creator_id *current-user-id*))
-      (hydrate :creator)))
+      (hydrate :creator :can_read :can_write)))

 (defendpoint POST "/"
   "Create a new `Dashboard`."


pep-015 solved

pep-015 solved

error: pathspec 'src/pep-015/solution1.clj' did not match any file(s) known to git

--- src/pep-015/solution1.clj
+++ src/pep-015/solution1.clj
@@ -0,0 +1,10 @@
+(ns pe.pep-015.solution1)
+
+(def solve
+  (memoize
+    (fn [x y]
+      (if (or (zero? x) (zero? y))
+        1
+        (+ (solve (dec x) y) (solve x (dec y)))))))
+
+(solve 20 20)


Experiment for #1

Experiment for #1

error: pathspec 'src/clj_simple_chart/exp.clj' did not match any file(s) known to git

--- src/clj_simple_chart/exp.clj
+++ src/clj_simple_chart/exp.clj
@@ -0,0 +1,12 @@
+(ns clj-simple-chart.exp
+  (:require [clj-simple-chart.core :as sc]))
+
+(def width 1200)
+(def height 500)
+
+(sc/render-tag [:svg {:width width :height height}
+                [:circle {:cx 50 :cy 100 :r 10 :fill "yellow" :stroke "black"}]
+                [:circle {:cx 50 :cy 100 :r 1 :fill "yellow" :stroke "black"}]
+                [:line {:x1 50 :y1 100 :x2 width :y2 100 :stroke "red"}]
+                [:text {:x 50 :y 100 :dy ".335em" :font-size "200px"} "1,234567890"]
+                ])


fix docker

fix docker

fatal: unable to access 'https://github.com/fhirbase/fhirplace.git/': The requested URL returned error: 403


Adds non-persistent data store for testing

error: pathspec 'src/shurly/data.clj' did not match any file(s) known to git

--- src/shurly/data.clj
+++ src/shurly/data.clj
@@ -0,0 +1,15 @@
+(ns shurly.data)
+
+(def ^:private urls (atom {}))
+
+(defn- get-target [slug]
+  (get-in @urls [(keyword slug) :target]))
+
+(defn store-slug! [slug target]
+  (if-not (get-target slug)
+    (swap! urls #(assoc %1 (keyword slug) {:target target :redirects 0}))))
+
+(defn request-redirect! [slug]
+  (when-let [target (get-target slug)]
+    (swap! urls #(update-in %1 [(keyword slug) :redirects] (fnil inc 0)))
+    target))


do not force re-routing to invitation if URL has invitation code but is for rules, terms, privacy, or code of conduct

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/clojurecup/cc2014-frontend.git/'


testing with parts of an app

testing with parts of an app

error: pathspec 'test/check/parts_test.clj' did not match any file(s) known to git

--- test/check/parts_test.clj
+++ test/check/parts_test.clj
@@ -0,0 +1,17 @@
+(ns check.parts-test
+  (:require [mount :refer [defstate] :as m]
+            [app.nyse :refer [conn]]
+            [clojure.test :refer :all]))
+
+(defstate should-not-start :start (throw (RuntimeException. "should not have been started!")))
+
+(defn with-parts [f]
+  (m/start #'app.config/app-config #'app.nyse/conn)
+  (f)
+  (m/stop #'app.config/app-config #'app.nyse/conn))
+
+(use-fixtures :each with-parts)
+
+(deftest start-only-parts
+  (is (instance? datomic.peer.LocalConnection conn))
+  (is (instance? mount.NotStartedState should-not-start)))


Test remap-apply with non-symbol arg

Test remap-apply with non-symbol arg

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/kkroening/jackal.git/'


Update dependencies, move dev related config to `dev` profile

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/nvbn/rerenderer.git/'


non-ssl for resto because cert broke

non-ssl for resto because cert broke

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/m1dnight/a-slack-and-irc-bot.git/'


Add an example timestamp_handler.

Add an example timestamp_handler.

error: pathspec 'samples/timestamp_handler.clj' did not match any file(s) known to git

--- samples/timestamp_handler.clj
+++ samples/timestamp_handler.clj
@@ -0,0 +1,5 @@
+; When used with the --csv option this handler will result in a CSV where the total request time
+; for each individual request is associated with the time that request finished. This could be
+; useful for diagnosing intermittent request latency issues.
+(fn [total-time-in-ms response]
+  [(str (java.util.Date.)) total-time-in-ms])


test work

test work

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/CraZySacX/glitter.git/'


rename core.cljs -> infamous.cljs

rename core.cljs -> infamous.cljs

error: pathspec 'src/com/kaicode/infamous.cljs' did not match any file(s) known to git

--- src/com/kaicode/infamous.cljs
+++ src/com/kaicode/infamous.cljs
@@ -0,0 +1,182 @@
+(ns ^:figwheel-always com.kaicode.infamous
+  (:require [com.kaicode.Famous]
+            [cljs.core.async :refer [put! chan]]
+            [datascript :as d]))
+
+(enable-console-print!)
+
+(defonce famous js/famous)
+(defonce FamousEngine (.. famous -core -FamousEngine))
+(defonce Node (.. famous -core -Node))
+(defonce GestureHandler (.. famous -components -GestureHandler))
+(defonce PhysicsEngine (.. famous -physics -PhysicsEngine))
+
+(defonce physics (.. famous -physics))
+(defonce math (.. famous -math))
+
+(defonce FamousBox (.. physics -Box))
+(defonce Spring (.. physics -Spring))
+(defonce RotationalSpring (.. physics -RotationalSpring))
+(defonce Quaternion (.. math -Quaternion))
+(defonce Vec3 (.. math -Vec3))
+
+(defn get-famous-components [node]
+      (.. (:node/famous-node node) getComponents))
+
+(defn get-famous-component-by-type-name [node component-type-name]
+      (let [famous-components (get-famous-components node)]
+           (first (filter (fn [component]
+                              (let [cn (.. component -constructor -name)]
+                                   (= component-type-name cn)))
+                          famous-components))))
+
+(defonce famous-components {:DOMElement (.. famous -domRenderables -DOMElement)
+                            :Align      (.. famous -components -Align)})
+
+(defn- famous-compare [x y]
+       "Compare famous javascript objects. See https://github.com/tonsky/datascript/issues/69"
+       (let [str-x (.. js/JSON (stringify x))
+             str-y (.. js/JSON (stringify y))]
+            (compare str-x str-y)))
+
+(extend-protocol IComparable
+                 FamousBox (^number -compare [x y]
+                                             (famous-compare x y))
+                 Vec3 (^number -compare [x y]
+                                        (famous-compare x y))
+                 Quaternion (^number -compare [x y]
+                                              (famous-compare x y))
+                 Spring (^number -compare [x y]
+                                          (famous-compare x y))
+                 RotationalSpring (^number -compare [x y]
+                                                    (famous-compare x y))
+                 Node (^number -compare [x y]
+                                        (famous-compare x y)))
+
+(def schema {:node/id         {:db/unique :db.unique/identity}
+             :node/children   {:db/cardinality :db.cardinality/many
+                               :db/isComponent true
+                               :db/valueType   :db.type/ref}
+             :node/components {:db/cardinality :db.cardinality/many
+                               :db/isComponent true
+                               :db/valueType   :db.type/ref}
+             :node/physics    {:db/cardinality :db.cardinality/one
+                               :db/isComponent true
+                               :db/valueType   :db.type/ref}})
+
+(def conn (d/create-conn schema))
+
+(defn save [scene-graph]
+      (d/transact! conn [scene-graph]))
+
+(defn events->chan
+      "Given a node and event type return a channel of
+      observed events. Can supply the channel to receive events as third
+      optional argument."
+      ([node event payload-function] (events->chan node event (chan) payload-function))
+      ([node event c payload-function]
+        (let [node (if (map? node)
+                     (:node/famous-node node)
+                     node)]
+             (.. (GestureHandler. node) (on event (fn []
+                                                      (put! c (or (payload-function) event))))))
+        c))
+
+(defn create-component [component-descriptor famous-node]
+      (let [component-type (:component/type component-descriptor)]
+           (if (keyword? component-type)
+             (let [component-constructor (famous-components component-type)
+                   component (component-constructor. famous-node)
+                   properties (dissoc component-descriptor :component/type :db/id)]
+                  (doseq [p properties
+                          :let [name (name (first p))
+                                value (second p)]]
+                         (cond
+                           (= name "content") (.. component (setContent value))
+                           (= name "classes") (doseq [clz value]
+                                                     (.. component (addClass clz)))
+                           :else (do
+                                   (.. component (setProperty name value)))))
+                  component)
+             (let [component (clj->js component-descriptor)]
+                  (.. famous-node (addComponent component))
+                  component))))
+
+(defn- get-node-by-id [id]
+       (ffirst (d/q '[:find (pull ?node [*]) :in $ ?id :where [?node :node/id ?id]] @conn id)))
+
+
+(defn attach-famous-node-to-scene-graph [node]
+      (let [famous-node (Node.)
+            size-mode (clj->js (:node/size-mode node))
+            absolute-size (clj->js (:node/absolute-size node))
+            align (clj->js (:node/align node))
+            position (clj->js (:node/position node))
+            mount-point (clj->js (:node/mount-point node))
+            origin (clj->js (:node/origin node))
+            proportional-size (clj->js (:node/proportional-size node))
+            differential-size (clj->js (:node/differential-size node))
+            ]
+           (.apply (.-setSizeMode famous-node) famous-node size-mode)
+           (.apply (.-setAbsoluteSize famous-node) famous-node absolute-size)
+           (.apply (.-setAlign famous-node) famous-node align)
+           (.apply (.-setPosition famous-node) famous-node position)
+           (.apply (.-setMountPoint famous-node) famous-node mount-point)
+           (.apply (.-setOrigin famous-node) famous-node origin)
+           (.apply (.-setProportionalSize famous-node) famous-node proportional-size)
+           (.apply (.-setDifferentialSize famous-node) famous-node differential-size)
+
+           (doseq [child-node (:node/children node)
+                   :let [a-child-node (attach-famous-node-to-scene-graph child-node)
+                         a-famous-child-node (:node/famous-node a-child-node)]]
+                  (.. famous-node (addChild a-famous-child-node)))
+
+           (d/transact! conn [{:db/id            (:db/id node)
+                               :node/famous-node famous-node}])
+
+           (update-in node [:node/famous-node] #(identity famous-node))))
+
+
+(defn find-nodes-with-physics []
+      (map #(first %) (d/q '[:find (pull ?node [*]) :where [?node :node/physics _]] @conn)))
+
+
+(defn find-nodes-with-components []
+      (map #(first %) (d/q '[:find (pull ?node [*]) :where [?node :node/components _]] @conn)))
+
+(defn render-scene-graph [root-id]
+      (let [simulation (PhysicsEngine.)
+            scene-graph (attach-famous-node-to-scene-graph (get-node-by-id root-id))
+            root-node (:node/famous-node scene-graph)
+            physics-nodes (find-nodes-with-physics)
+            nodes-with-components (find-nodes-with-components)
+            context (.. FamousEngine (createScene "body"))]
+           (.. context (addChild root-node))
+
+           (doseq [{physics :node/physics} physics-nodes]
+                  (.. simulation (add (:box physics) (:spring physics) (:rotational-spring physics))))
+
+           (doseq [{components :node/components :as node} nodes-with-components
+                   :let [famous-node (:node/famous-node node)]]
+                  (doseq [component-descriptor components]
+                         (create-component component-descriptor famous-node)
+                         )
+                  )
+
+           (.. FamousEngine (requestUpdate (clj->js {:onUpdate (fn [time]
+                                                                   (.. simulation (update time))
+                                                                   (doseq [pn physics-nodes
+                                                                           :let [famous-node (:node/famous-node pn)
+                                                                                physics (:node/physics pn)
+                                                                                physics-transform (.. simulation (getTransform (:box physics)))
+                                                                                p (.. physics-transform -position)
+                                                                                r (.. physics-transform -rotation)]]
+                                                                          (.. famous-node
+                                                                              (setPosition (* 0 1446) 0 0)
+                                                                              (setRotation (nth r 0) (nth r 1) (nth r 2) (nth r 3))))
+
+                                                                   (this-as this
+                                                                            (.. FamousEngine (requestUpdateOnNextTick this)))
+                                                                   )})))
+
+           (.. FamousEngine init)))


using def-req

using def-req

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/narkisr/cloujsearch.git/'


Add params validation for primitives

Add params validation for primitives


gehitu! txukundu

gehitu! txukundu

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lnmnd/magnet.zer.git/'


Get docs UI working again

Get docs UI working again

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/physion/ovation-webapi.git/'


chore: remove comment

chore: remove comment

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-BIT/restQL-server.git/'


Add csp walkthrought file

Add csp walkthrought file

fatal: unable to access 'https://github.com/funcool/promesa.git/': The requested URL returned error: 403


Adds a simple test

Adds a simple test

error: pathspec 'test/circle/model/test_project.clj' did not match any file(s) known to git

--- test/circle/model/test_project.clj
+++ test/circle/model/test_project.clj
@@ -0,0 +1,9 @@
+(ns circle.model.test_project
+  (:use circle.model.project)
+  (:require [circle.backend.build.test-utils :as test])
+  (:use midje.sweet))
+
+(test/ensure-test-project)
+
+(fact "ssh-key-for-url finds the key for dummy project"
+  (ssh-key-for-url "https://github.com/arohner/circle-dummy-project") => truthy)


This is unnecessary holdover since ring will do the right thing

error: pathspec 'modules/web/src/main/clojure/immutant/web/ring.clj' did not match any file(s) known to git

--- modules/web/src/main/clojure/immutant/web/ring.clj
+++ modules/web/src/main/clojure/immutant/web/ring.clj
@@ -0,0 +1,49 @@
+;; Copyright 2008-2013 Red Hat, Inc, and individual contributors.
+;;
+;; This is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU Lesser General Public License as
+;; published by the Free Software Foundation; either version 2.1 of
+;; the License, or (at your option) any later version.
+;;
+;; This software is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Lesser General Public License for more details.
+;;
+;; You should have received a copy of the GNU Lesser General Public
+;; License along with this software; if not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+(ns ^{:no-doc true} immutant.web.ring
+  (:use immutant.web.internal)
+  (:require [clojure.string    :as string]
+            [ring.util.servlet :as servlet])
+  (:import (javax.servlet.http HttpServletRequest HttpServletResponse)))
+
+(defn- context [^HttpServletRequest request]
+  (str (.getContextPath request)
+       (.getServletPath request)))
+
+;; we don't use .getPathInfo since it is decoded. See IMMUTANT-195
+(defn- path-info [^HttpServletRequest request]
+  (let [path-info (.substring (.getRequestURI request)
+                              (.length (context request)))]
+    (if (.isEmpty path-info)
+      "/"
+      path-info)))
+
+(defn handle-request [servlet-name
+                      ^HttpServletRequest request
+                      ^HttpServletResponse response]
+  (let [{:keys [handler sub-context]} (get-servlet-info servlet-name)]
+    (if handler
+      (if-let [response-map (binding [current-servlet-request request]
+                              (handler
+                               (assoc (servlet/build-request-map request)
+                                 :context (context request)
+                                 :path-info (path-info request))))]
+        (servlet/update-servlet-response response response-map)
+        (throw (NullPointerException. "Handler returned nil.")))
+      (throw (IllegalArgumentException. (str "No handler function found for " servlet-name))))))
+


added basic server test

added basic server test

fatal: unable to access 'https://github.com/edbre/sushi-machine.git/': The requested URL returned error: 403


Clojure functions for Special Relativity.

Added.

fatal: unable to access 'https://github.com/defunSM/SpecialRel.git/': The requested URL returned error: 403


Temporarily moved entity update to run in on-render instead of on-timer due to timers pausing when the window loses focus; I want game logic to continue operating even if the window is in the background. Namespace hot-reloading also moved to on-render for now to see updates happen on code change even when the window is not focused.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Yoshiyuka/cthulhu.git/'


Created project.clj

Created project.clj

error: pathspec 'exercises/flatten-array/project.clj' did not match any file(s) known to git

--- exercises/flatten-array/project.clj
+++ exercises/flatten-array/project.clj
@@ -0,0 +1,4 @@
+(defproject flatten-array "0.1.0-SNAPSHOT"
+  :description "flatten-array exercise."
+  :url "https://github.com/exercism/xclojure/tree/master/exercises/flatten-array"
+  :dependencies [[org.clojure/clojure "1.8.0"]])


clean up lingering print

clean up lingering print

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/starcity-properties/odin.git/'


populate script for italiano

populate script for italiano

error: pathspec 'src/it.clj' did not match any file(s) known to git

--- src/it.clj
+++ src/it.clj
@@ -0,0 +1,42 @@
+;; Command-line usage:
+;;
+;; lein run -m it/tout
+;; lein run -m it/tout <num>
+
+(ns it)
+
+(require '[babel.writer :refer [fill-by-spec fill-verb write-lexicon]])
+(require '[babel.english :as en])
+(require '[babel.italiano :as it :refer [verbs]])
+(require '[babel.korma :refer :all])
+(require '[babel.repair :refer [process]])
+(require '[clojure.tools.logging :as log])
+(require '[dag-unify.core :refer [unify]])
+(require '[korma.core :refer :all])
+(require '[korma.db :refer :all])
+
+(defn tutti [ & [count]]
+  (let [count (if count (Integer. count) 10)]
+    (write-lexicon "it" @it/lexicon)
+    (process
+     (reduce concat
+             (map (fn [verb]
+                    (map (fn [tense]
+                           {:fill
+                            {:spec (unify {:root {:italiano {:italiano verb}}}
+                                          tense)
+                             :source-model en/small
+                             :target-model it/small
+                             :count count}})
+                         (shuffle
+                          [
+                           {:synsem {:sem {:tense :conditional}}}
+                           {:synsem {:sem {:tense :futuro}}}
+                           {:synsem {:sem {:tense :present}}}
+                           {:synsem {:sem {:aspect :perfect
+                                           :tense :past}}}
+                           ])
+                         ))
+                  (sort verbs)
+                  )))))
+


fixing rabbitmq connection config

fixing rabbitmq connection config

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/democracyworks/form-works.git/'


kata5: introduce a governing hash function

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/schaueho/clojure-codekata.git/'


NIDX contains more indices

NIDX contains more indices

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aamedina/swg.git/'


Solve Salary in clojure

Solve Salary in clojure

error: pathspec 'solutions/uri/1008/1008.clj' did not match any file(s) known to git

--- solutions/uri/1008/1008.clj
+++ solutions/uri/1008/1008.clj
@@ -0,0 +1,10 @@
+(ns main)
+
+(defn main []
+  (let [a (Integer/parseInt (read-line))
+        b (Integer/parseInt (read-line))
+        c (Double/parseDouble (read-line))]
+    (println "NUMBER =" a)
+    (println "SALARY = U$" (format "%.2f" (* c b)))))
+
+(main)


release version 2.5.1-SNAPSHOT

release version 2.5.1-SNAPSHOT

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/B2W-Digital/pdg-core.git/'


Version 1.9.1-SNAPSHOT

Version 1.9.1-SNAPSHOT


beta 2

beta 2


these are the defaults

these are the defaults

fatal: unable to access 'https://github.com/meltwater/dropwizard-logstash-encoder.git/': The requested URL returned error: 403