Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a :print-fallback key to *options* to fall back on pr-str #18

Merged
merged 3 commits into from
Feb 27, 2015
Merged

Add a :print-fallback key to *options* to fall back on pr-str #18

merged 3 commits into from
Feb 27, 2015

Conversation

venantius
Copy link

This commit adds a :print-fallback key (default false) to the
puget.printer/options map. Setting the value to true will cause Puget
to fall back on an object's pr-str value rather than printing its
class information.

I believe this should resolve venantius/ultra#8 once the dependency graph for Whidbey has also been updated.

This commit adds a `:print-fallback` key (default false) to the
puget.printer/*options* map. Setting the value to true will cause Puget
to fall back on an object's `pr-str` value rather than printing its
class information.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.63% when pulling a1da466 on venantius:develop into 7e523ae on greglook:develop.

@@ -121,7 +126,7 @@


(defn- illegal-when-strict!
"Throws an exception if strict mode is enabled. The error indincates that the
"Throws an exception if strict mode is enabled. The error indicates that the
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh, nice catch.

This moves `:print-fallback` from being a simple boolean to taking a
keyword value, which is checked as part of a case statement in
`unknown-document`
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.63% when pulling bcef0b4 on venantius:develop into 7e523ae on greglook:develop.

@@ -35,6 +35,11 @@
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.

`:print-fallback`
Takes a keyword argument specifying the desired string representation of
uknown documents. The keyword :print will fall back to using `pr-str`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: 'uknown' should be 'unknown'. Also, put backticks around :print.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, whoops.

@greglook
Copy link
Owner

Nice, this looks better. One more minor comment and we're good to go.

@greglook greglook self-assigned this Feb 27, 2015
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.63% when pulling 71457e5 on venantius:develop into 7e523ae on greglook:develop.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.63% when pulling 71457e5 on venantius:develop into 7e523ae on greglook:develop.

greglook added a commit that referenced this pull request Feb 27, 2015
Add a :print-fallback key to *options* to fall back on pr-str
@greglook greglook merged commit 65c0ff5 into greglook:develop Feb 27, 2015
@venantius
Copy link
Author

Any thoughts on when we might see this percolate up to Whidbey?

@greglook
Copy link
Owner

I'll release 0.7.1 in the next day or two.

@greglook
Copy link
Owner

Released whidbey 0.5.1 with a dependency on puget 0.7.1.

@venantius
Copy link
Author

Fantastic! Thanks so much :)

I should have a release for Ultra (likely 0.3.0) in the next day or so as well.

@greglook
Copy link
Owner

greglook commented Mar 1, 2015

No problem, thanks for the contribution. 👍 Ultra has certainly been good exposure for puget and whidbey. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ultra doesn't honor custom print-methods
3 participants