What's new in Edge Rails #3
Week of January 1-7, 2012
There's still a big party going on in Rails master to get rid of Ruby 1.8-specific code; that accounted for most of the commits this week. Among other things, MiniTest is replacing Test::Unit throughout the Rails code. But there are some other significant happenings too:
- Big News: Rails plugins are deprecated in 3.2 and removed entirely in 4.0, as of dad7fdc5734a3813246f238ac5760b2076932216. This is an obvious simplification to Rails, as most add-on functionality has moved into gems. If you still need to use a plugin, you can use bundler to manage it as a file or git dependency.
- You can still use the plugin generator - it just generates a new gem in your application now. As of 8ac53db5eedca8f2605ef7f91bbc956018ae1c50 it automatically adds that new gem plugin to your Gemfile as well.
- ActionController: :TestCase gained the ability to send real documents in 5b9708840f4cc1d5414c64be43c5fc6b51d4ecbf.
-
439d3407eaef1f1b3abc94c766dedac220e59785 adds a
font_path
helper method that gets the path to a font in the public fonts directory. Personally, I wouldn't mind having Rails bake in a standard way to do cross-browser fonts. -
Logger
has morphed intoActiveSupport::Logger
. The work was completed in 00236435221a39441af3f1e76110767fba4154a8. -
904e544cc8f5846de7c31827bb5556c6a238c0de
adds a
benchmark
helper that works in ERB. This allows your views to contain things like<%= benchmark do %>Hello World<% end %>
which then puts the benchmarking results in the log. - A couple of small changes in the sprockets compiler were merged in 7cfd1bd76a41bea528c945d821a9fbc3902af479. First, you can specify in options which file types should be gzipped in your assets. Second, the default list of types to gzip now includes html, svg, txt, and xml in addition to js and css.