dpickett / has_barcode

Nice class method wrapper for barby
MIT License
51 stars 18 forks source link

Explicitly require barcode type (barby no longer does this by default) #1

Closed coryschires closed 12 years ago

coryschires commented 12 years ago

Barby no longer requires the various symbology types by default, meaning that we need to explicitly require the type as part of the configuration. Following your lead, I've required the type in the same fashion that you've required the outputter. Pretty straight forward.

Also, I updated the read me to explain why this is a good gem to use with heroku. I actually tried a few options before arriving at has_barcode. I think this little addition would be helpful.

Thanks for building this! Cory

coryschires commented 12 years ago

Added another commit. It appears support or code_128 had broken. If you have a look at the most recent version of barby, you'll notice that you now need to pass a second argument specifying a type (either A, B, or C).

Honestly, I didn't bother to understand the subtly between the three types. Defaulting to A seems to do the trick.

dpickett commented 12 years ago

Thanks for your patch! This all looks awesome but I'm not sure SVG is a reasonable default. While it suits heroku, I would expect a GIF on PNG as default, no?

This lib is old an could use some love. Maybe a railtie setup or something - what version of Rails are you running it on if you don't mind me asking?

Best, Dan

coryschires commented 12 years ago

Glad you're still maintaining it. I was a bit worried there'd be no response since it hadn't been active in a while. In response to your questions:

Also, I agree. It's a good little library but it's age shows in some places. For example, I didn't mess with the tests because not having a Gemfile made tracking down the dependencies too much work. (Honestly, it probably would have been easy. I was just being lazy.) That said, I found the code easy to understand. Either way, a little TLC would be nice.

Also, maybe you should fork barby and edit the readme to give a mention to this gem. barby needs something like has_barecode. Powerful as it may be, the API seems weird and more obscure than it should be. has_barcode fixes that.

dpickett commented 12 years ago

thanks so much for your feedback! I'll try to carve out some time to make some of the adjustments and issue a pull request on barby to update his readme like you suggested!

Glad you found the lib useful!