2012-11-30
I’m happy to announce the release of Draper 1.0.0.beta1 today. If you use Draper, I’d appreciate you checking out the beta release in your app, kicking the tires, and letting me know what’s up.
You can get it by installing it from Rubygems:
$ gem install draper --pre
or by putting it in your Gemfile:
gem "draper", "1.0.0.beta1"
Notable changes include:
Draper::Base
to Draper::Decorator
. This is the most significant change you’ll need to upgrade your application. https://github.com/drapergem/draper/commit/025742cb3b295d259cf0ecf3669c24817d6f2df1#decorated?
method. This gives us a free RSpec matcher, is_decorated?
. https://github.com/drapergem/draper/commit/834a6fd1f24b5646c333a04a99fe9846a58965d6#decorates
is no longer needed inside your models, and should be removed. Decorators automatically infer the class they decorate. https://github.com/drapergem/draper/commit/e1214d97b62f2cab45227cc650029734160dcdfeSomeDecorator.find(1)
, for example, simply add #has_finders
to the decorator to include them. https://github.com/drapergem/draper/commit/42b6f78fda4f51845dab4d35da68880f1989d178#source
is now the preferred method. https://github.com/drapergem/draper/commit/1e84fcb4a0eab0d12f5feda6886ce1caa239cb16ActiveModel::Serialization
is included in Decorators if you’ve requred ActiveModel::Serializers
, so that decorators can be serialized. https://github.com/drapergem/draper/commit/c4b352799067506849abcbf14963ea36abda301cAnd many small bug fixes and refactorings.
Before the actual release of 1.0.0, I want to improve documentation and handle a few other things, but we currently have no confirmed and one possible bug in Draper as it stands, so your feedback as I clean up these last few things would be excellent. Please file issues on the tracker if you find anything.
Thank you! <3 <3 <3