Reading Time: 2 minutes
Sinatra is a well-known open source framework written in Ruby. It is one of the main alternatives to Ruby on Rails and it is finally ready to introduce to the public the long-awaited pre-release of version 2.0. Let’s have a look at what they have prepared for us.
Those who work with Sinatra have been waiting for this update since the release of Ruby on Rails 5.0.
Sinatra creators had to come through a number of hurdles, but now they are finally ready to show the world the beta version of what Sinatra 2.0 would look like. Like always with betas, some bugs might appear, but this pre-release version will definitely let us to get a sneak peek of what we should expect from this framework.
So let’s have a look at the main features it offers.
1. Rack 2.0 support
From now on Sinatra 2.0 will not only support Rack 2.0 version, but will also stop supporting younger versions. This way if you are using an old Rack for your webservers, it is high time to go for some updates.
2. Ruby 2.2+ support
Obviously, Sinatra couldn’t pass by major Ruby update. And, to be frank, this might be the major reason, why we even see Sinatra 2.0 pre-release version. The new version of Sinatra will support Ruby 2.2+ versions. At the same time it will stop working with any of the younger Ruby versions.
3. Mustermann introduced
The pre-release shows that now Mustermann will replace Sinatra router. Mustermann is a very powerful library. Besides, it is compatible params parsing interface. It will add some new patterns and make easier working with some old ones.
Where can I download it?
All gems for the pre-release version can be found at rubygems.org. The list includes:
- sinatra: v2.0.0.beta2
- sinatra-contrib: v2.0.0.beta2
- mustermann: v1.0.0.beta2
- mustermann-contrib: v1.0.0.beta2
- rack-protection: v2.0.0.beta2
As you see, there are a number of things to have a look at in the new version of Sinatra. You can find more details here. We in Rubyroid Labs enjoy working with Sinatra and use it for some of our projects.
And what do you think about it? Share with us in the comments.