From 63b5566025eadfb359119e987a415cc7efbf9a8b Mon Sep 17 00:00:00 2001 From: Ursa Americanus Kermodei Date: Sat, 7 Nov 2015 15:50:51 -0800 Subject: [PATCH] [docs] Updating README, CHANGELOG, CONTRIBUTING Also updating the `project.clj` --- CHANGELOG.md | 5 +-- CONTRIBUTING.md | 4 +++ README.md | 84 +++++++++++++++++++++++++++++++++++-------------- project.clj | 6 ++-- 4 files changed, 70 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5755e9e..0f757af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.3.5 - * Fixed the diff-dispatching interface to correctly diff types +## 0.4.0 + * Fixed the diff-dispatching interface to correctly diff types - in particular, resolves a bug when diffing hash-maps and array-maps. * Changed the behavior of `source` at the REPL to be colorized. + * Adds support for custom whidbey/puget options, including specifying the width. * Updated dependencies. ## 0.3.4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c98b0b..a4220de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,3 +10,7 @@ In addition, it's helpful to include the following information: - Your JDK version - Your Leiningen version - Which version of Ultra you're using + +## Tests + +I will be the first person to admit that this library is quite short on test coverage. That has become something of a problem over time, with PRs being submitted with breaking changes in other, unexpected areas. My policy going forward is going to be to require tests as part of a pull request; I simply can't keep accepting pull requests that I have to go back and re-write later because the original author didn't test the new behavior thoroughly enough. diff --git a/README.md b/README.md index 14aa617..1734352 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,18 @@ I've written a blog post describing Ultra in greater depth [here](http://blog.ve ## Installation -To install and configure Ultra, add something like the following to your `~/.lein/profiles.clj` +To install Ultra, just add the following to your `~/.lein/profiles.clj` ```clojure -{:user {:plugins [[venantius/ultra "0.3.5"]] - :ultra {:color-scheme :solarized_dark}}} +{:user {:plugins [[venantius/ultra "0.4.0"]]}} ``` ### Requirements -Leiningen version 2.5.2+ +As of Ultra `0.4.0`, Clojure 1.7.x is required due to reader conditional usage in Ultar's dependencies. +Ultra `0.3.4` is the last version supporting Clojure 1.6.x + +Leiningen version 2.5.2+ JDK 7+ #### ClojureScript Support @@ -45,14 +47,13 @@ For a detailed list of features, check out the [wiki](https://github.com/venanti ## Configuration -All of the above features are enabled by default, but can be turned off by setting a `false` flag in your profile. If you wanted Ultra to essentially no-op, your profile would look like this: +All of the above features are enabled by default, but can be turned off by setting a `false` flag in your profile. If you wanted Ultra to essentially no-op, your configuration map would look like this: ```clojure -{:user {:plugins [[venantius/ultra "0.3.5"]] - :ultra {:repl false - :stacktraces false - :tests false - :java false}}} +{:ultra {:repl false + :stacktraces false + :tests false + :java false}}}} ``` ### Color schemes @@ -64,22 +65,57 @@ At the moment Ultra supports the following color schemes: If you want to set the colors yourself instead of using a theme you can configure them directly, e.g.: ```clojure -{:user {:plugins [[venantius/ultra "0.3.5"]] - :ultra {:color-scheme {:delimiter [:red] - :tag [:red] - :nil [:cyan] - :boolean [:cyan] - :number [:cyan] - :string [:cyan] - :character [:cyan] - :keyword [:green] - :symbol nil - :function-symbol [:blue] - :class-delimiter [:blue] - :class-name nil - :exception nil}}}} +{:ultra {:color-scheme {:delimiter [:red] + :tag [:red] + :nil [:cyan] + :boolean [:cyan] + :number [:cyan] + :string [:cyan] + :character [:cyan] + :keyword [:green] + :symbol nil + :function-symbol [:blue] + :class-delimiter [:blue] + :class-name nil + :exception nil}}} ``` +### Additional REPL Configuration + +Ultra uses [Whidbey](https://github.com/greglook/whidbey) as its pretty-printing engine, and supports all of Whidbey's configuration flags. + +```clojure +{:ultra {:repl {:width 180 + :map-delimiter "" + :extend-notation true + :print-meta true + ...}}} +``` + +###### `:width` + +Number of characters to try to wrap pretty-printed forms at. + +###### `:print-meta` + +If true, metadata will be printed before values. + +###### `:sort-keys` + +Print maps and sets with ordered keys. Defaults to true, which will sort all collections. If a number, counted collections will be sorted up to the set size. Otherwise, collections are not sorted before printing. + +###### `:map-delimiter` + +The text placed between key-value pairs in a map. + +###### `:map-coll-separator` + +The text placed between a map key and a collection value. The keyword :line will cause line breaks if the whole map does not fit on a single line. + +###### `:seq-limit` + +If set to a positive number, then lists will only render at most the first n elements. This can help prevent unintentional realization of infinite lazy sequences. + ## Contributing Please open an issue here before submitting pull requests; I prefer to have documentation and consensus that either of our time will be well spent by working on it. When opening an issue -- particularly for bugs -- please refer to [CONTRIBUTING.md](https://github.com/venantius/ultra/blob/master/CONTRIBUTING.md) diff --git a/project.clj b/project.clj index c975d1c..8c0dae8 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject venantius/ultra "0.4.0-SNAPSHOT" +(defproject venantius/ultra "0.4.0" :description "Ultra: A Leiningen plugin for a superior development environment" :url "http://github.com/venantius/ultra" :license {:name "Eclipse Public License" @@ -6,10 +6,10 @@ :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/tools.nrepl "0.2.11"] - [io.aviso/pretty "0.1.18"] - [mvxcvi/whidbey "1.1.1"] [im.chit/hara.class "2.2.11"] [im.chit/hara.reflect "2.2.11"] + [io.aviso/pretty "0.1.18"] + [mvxcvi/whidbey "1.1.1"] [mvxcvi/puget "0.9.2"] [org.clojars.brenton/google-diff-match-patch "0.1"] [robert/hooke "1.3.0"]