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

Update ShowExceptions to suit latest rack master #907

Merged
merged 1 commit into from Aug 11, 2014

Conversation

kgrz
Copy link
Member

@kgrz kgrz commented Jul 24, 2014

  • Post 893a2c50 in rack/rack, the #pretty method used while generating
    the HTML error markup, implemented in Rack::ShowExceptions, returns a
    String instead of an Array. This change uses Array() to
    convert the exception string in both plain text and HTML modes
    to an array.
  • Should fix tests fail with rack master #906

* Post 893a2c50 in rack/rack, the #pretty method used while generating
  the HTML error markup, implemented in Rack::ShowExceptions, returns a
  String instead of an Array. This change uses Array() to
  convert the exception string in both plain text and HTML modes
  to an array.
@kgrz
Copy link
Member Author

kgrz commented Jul 24, 2014

Although this seems to fix that error, the discussion in that commit is suggesting me that it's better to implement the pretty method in Sinatra than using the one provided in Rack. Thoughts?

@kytrinyx
Copy link
Contributor

This is tricky. Did rack master really make a breaking change? Are they going to make a major version change? (Sorry, I've not been following this issue, so I'm pretty ignorant about the situation. If nobody knows off the top of their head I'll go look for some answers myself).

@rkh
Copy link
Member

rkh commented Jul 25, 2014

I think this might not be a public Rack API we're using here. Also, Rack will not have a major release any time soon. Though I don't think Rack officially follows semantic versioning (this is further complicated by the Rack version being related to the Rack specification version).

@vipulnsward
Copy link
Contributor

Yes it is not public API and meant to change in future. We should instead do a custom implementation, instead of handling for different versions.

else
content_type = "text/html"
body = pretty(env, e)
exception_string = pretty(env, e)
Copy link
Member

Choose a reason for hiding this comment

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

FYI pretty() is not meant to be public so this may bite us again, but I'm ok with merging it for now.

zzak pushed a commit that referenced this pull request Aug 11, 2014
Update ShowExceptions to suit latest rack master
@zzak zzak merged commit a43ba2c into sinatra:master Aug 11, 2014
joshuap pushed a commit to honeybadger-io/honeybadger-ruby that referenced this pull request Dec 29, 2014
ghost pushed a commit to flapjack/flapjack that referenced this pull request Jan 12, 2015
@philostler
Copy link

Can anyone tell me when this will make it into a release? I get a lot of breaking specs from this

@rkh
Copy link
Member

rkh commented Jan 20, 2015

Will cut a new release later this week or early next.

@philostler
Copy link

Thanks, appreciated! 👍

@ringe
Copy link

ringe commented Feb 10, 2015

Is the new release far away?

rubys added a commit to rubys/wunderbar that referenced this pull request Feb 10, 2015
@aldanor
Copy link

aldanor commented Feb 20, 2015

Will this be released soon?

@kytrinyx
Copy link
Contributor

We're working on it. We have one potential blocker for the release: #721

zzak pushed a commit that referenced this pull request Sep 11, 2015
Update ShowExceptions to suit latest rack master
@sinatra sinatra deleted a comment from Sweepstakesoffers Aug 10, 2020
@sinatra sinatra deleted a comment Aug 22, 2020
@sinatra sinatra deleted a comment Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests fail with rack master
8 participants