昨日の時点でTwitterでは話題になっていましたが、 正式にRails-2.3.2のリリースがアナウンスされたようです。

Rails 2.3: Templates, Engines, Rack, Metal, much more!

Rails 2.3 is finally done and out the door. This is one of the most substantial upgrades to Rails in a very long time.

今回のリリースの主な特徴は、

  • Templates: 自分好みのRailsアプリケーションのひな形を作る機能。 沢山Railsアプリを作ってる人には便利そう。
  • Engines: Railsアプリをコンポーネント化して再利用する仕組み。MerbのSliceのような印象。render_componentが無くなったので、代わりにこれを使うと良いらしい。
  • Rack: Rackに対応。
  • Metal: 色々と省略して高速なレスポンスを実現する仕組み。
  • Nested forms: 頭痛への処方箋。かなり嬉しい。

全体的な印象として、Merb-1.1との差が少なくなってきた感じですね。 Rails-3(あるいはMerb-2)への道筋が見えてきた気がします。

See Also

posted by Png genki on Tue 17 Mar 2009 at 09:30

Ruby-1.9.1がリリースされて以来、 @maiha さんと一緒にMerbのRuby-1.9.1対応のための作業を続けてきましたが、 ようやくMerbアプリケーションをRuby-1.9.1で動かす事ができました。

ss http://merbi.st

決定的に重要だったのは、@ko1_twitterさんが作ってくれた methoparaです。 これによって、merbが抱えていたmerb-action-argsに関する問題を解決するための道が開かれ、Ruby-1.9.1対応を行うためのモチベーションが高まりました。

今回のRuby-1.9.1対応のために作ったパッチや、修正版のGemなどの多くは github上に残っています (http://github.com/maiha, http://github.com/genki) 残りは、http://merbi.st/pluginsで公開されています。

Good luck!

posted by Png genki on Sat 14 Feb 2009 at 15:06

The ruby-1.9.1 had come to the world, and several days went by...

@maiha and I have worked for making the merb to be correspond to the ruby-1.9.1. And now we are very happy, because we can announce there is the first child of Merb and ruby-1.9.1.

http://merbi.st is the site which is running on merb with ruby-1.9.1.

ss

Our efforts are remaining at several places. Most of them are in github (see http://github.com/maiha, http://github.com/genki). Others are published on here http://merbi.st/plugins

Good luck!

posted by Png takiuchi on Sat 14 Feb 2009 at 14:42

methopara is a gem that enables us to use Method#parameters with Ruby-1.9.1. It was originally made by @ko1_twitter, the creater of YARV, at the previous meet-up of asakusa.rb.

And this time, I added an interface to use it for UnboundMethod. Now you can use UnboundMethod#parameters with new methopara, like this.

   1  require 'rubygems'
   2  require 'methopara'
   3  
   4  class Foo
   5    def foo(a,b) end
   6  end
   7  Foo.instance_method(:foo).parameters
   8  #=> [[:req, :a], [:req, :b]]

Enjoy!

posted by Png takiuchi on Wed 11 Feb 2009 at 16:26

ss

Yay! I am looking forward to it very much!

Merbはmerb-action-argsが無くても動くのだけど、 あの格好良さを知ってしまうとね・・・。

posted by Png genki on Fri 6 Feb 2009 at 06:02

Getting ready for Ruby 1.9.1

We are excited about Ruby 1.9.1. Of course, with all the performance improvements, who wouldn’t be? Unfortunately a large number of Ruby libraries and extensions still don’t work on 1.9.1, so Ruby 1.9 cannot be considered production-ready yet.

しばらくは大きなプロジェクトのRuby-1.9.1対応がにぎやかになりそうですね。 安定板のリリースは重要だな。

Merbはまだaction-argsの問題があるけど、 1.9.1でMethod#parametersが出なかったので、 ParseTreeあたりが1.9.1に対応する感じで進化して対応される気がする。 せめてProc#to_sourceがあればripperを使ってなんとか出来たと思うんだけどなー。

posted by Png genki on Tue 3 Feb 2009 at 10:24

Ruby-1.9.1リリースおめでとうございます。 バージョン番号からすると想像しにくいですが、これはRuby-1.9系の最初の安定版リリースであり、新しいRubyの時代の幕開けです。

[ANN] Ruby 1.9.1リリース

Ruby 1.9はRubyの新しい系統です。近代的に、高速に、文法も明確に、多言語化 され、多くの改善がなされました。Ruby 1.8系統は2003年以来利用され、多くの 素晴らしい製品を生み出しました。本日、1.9の歴史が始まります。

関係者の皆様、お疲れさまでした。

posted by Png genki on Sat 31 Jan 2009 at 08:32

I released the merb_full_url plugin that provides URL which has origin (scheme, host and port)

You can install this gem like this;

   1  % sudo gem install merb_full_url --source http://merbi.st

And you get full URLs by calling full_url/full_resource methods instead of url/resource.

But I think, it is better for merb to become providing such methods in advance :-)

posted by Png takiuchi on Sat 24 Jan 2009 at 02:30

Mattettiさんから連絡があって、 forkして開発していたmerb_babel本家に取り込んでもらいました。 以下のような機能を追加しています。

  • Merb::Requestからの国コード判別機能
  • YAMLを利用した階層化ローカライゼーション
  • 時刻のローカライゼーション

将来的には、merb-sliceの形にして、ローカライズファイルの オンライン編集が出来るようにしたい。

posted by Png genki on Sat 17 Jan 2009 at 04:54

DataMapper用のバージョン管理プラグイン、 dm-has-versions をリリースしました。

dm-is-versionedというライブラリが既にあるのですが、Railsで慣れ親しんだacts_as_versionedと微妙に挙動が違うのと、revert_toやversion=ができないなど、細かいところが足りない感じがしたので作りました。

USAGE:

以下のコードをご覧の通りです。

   1  class Story
   2    include DataMapper::Resource
   3          
   4    property :id, Integer, :serial => true
   5    property :title, String
   6    property :updated_at, DateTime
   7  
   8    has_versions :ignore => [:updated_at]
   9  end
  10  
  11  Story.auto_upgrade!
  12  
  13  story = Story.create(:title => 'hello')
  14  story.version #=> 0
  15  story.update_attributes :title => 'good night'
  16  story.version #=> 1
  17  story.title #=> 'good night'
  18  story.version = 0
  19  story.title #=> 'hello'

auto_upgrade!は最初に一回だけ必要です。

posted by Png genki on Fri 16 Jan 2009 at 03:42