nats-io / nats-pure.rb

Ruby client for NATS, the cloud native messaging system.
https://nats.io
Apache License 2.0
131 stars 30 forks source link

Show ellipsis when truncating data in message #112

Closed capps closed 1 year ago

capps commented 1 year ago

After accusing the sender of sending incomplete messages, I realized it was on my end...

Indicating the truncation would've saved me a little time... and animosity -- see how useful ellipses are?

I couldn't find any specs for inspect method, so figured you were cool w/manual testing

It works fine w/ > 10

<NATS::Msg(subject: "v1...", reply: "", data: "YAMOUSSOUK...")>

and with exactly 10

<NATS::Msg(subject: "v1...", reply: "", data: "COPENHAGEN")>

and with less

<NATS::Msg(subject: "v1...", reply: "", data: "BANGKOK")>