Padrino

EuRuKo 2011 is coming, who's up for a meeting?

EuRuKo is great fun. It would be even more fun with more Padrino action, so let’s meet up!

EuRuKo 2011 and (hopefully) Eurocamp are drawing close (May 28-29). Are there any Padrino users/hackers/interested third-parties present in Berlin around that date? If so, we could organize a spontaneous meeting/drink-up somewhere in town. If anyone is interested in meeting, please send me a note, I’ll try to organize something. If nothing dedicated comes together, we still have a list of people to contact and move as a group.

Also, if you have never been to Berlin and need a few pointers on what to do, feel free to ask me for advice as well.

If you are interested please drop me a note (either through the contact details or using this list) and maybe include:

  • the time of your stay in Berlin (so that I know when it makes sense to contact you)
  • your email address and twitter username (if you have one), maybe github
  • the kind of activity you are interested in (just eating, just drinking, seeing berlin, hacking, q&a or any combination of the former)

My contact details: name: Florian Gilcher email: florian.gilcher@asquera.de twitter: @Argorak github: skade phone: ask and ye might receive


Padrino 0.9.27 - Project settings, routing, compatibility and bug fixes

Today, we released a new version of Padrino bringing us to 0.9.27. This release is only a week after our last hotfix release because we wanted to keep up the speed as we approach our 0.10.0 release that will coincide with the Sinatra 1.3 release.

We have also significantly improved our release processes as we approach 1.0 and now the continuous integration measures we put in place run all of our tests on every ruby version, a set of elaborate integration tests as well as full web benchmarks to measure our requests per second versus other ruby frameworks.

This release is primarily compatibility and bug fixes but also contains a few new features involving project-wide settings, reverse route recognition, and offline and test generation updates. Details of the features and fixes are below.

If you want to hear more about Padrino, a podcast was recently released on Rubiverse.

Project-wide Settings

In this release, we have added the notion of ‘project’ settings that are inherited by every Padrino application within the project. This can be used to set any properties but is particularly useful for sharing sessions across your apps. These project-wide settings are intended to live in config/apps.rb and are generated in every new application.

# config/apps.rb
# Set the global project settings for your apps.
# These settings are inherited by your subapps.
# You can override these settings in each of your sub apps.
Padrino.configure_apps do
  enable :sessions
  set :foo, "bar"
end

Using this is optional and you can override these settings on a per-app basis as well. Commits are here, here, and here.

Reverse Route Recognition

We have occasionally had the need to access the current route from within a template in order to create links or determine the current page.

Given we have a route such as

# controllers.rb
controller :some do
  get :other, :map => "/custom/url/with-:foo" do; end
end

We have added the ability to recognize a url and retrieve the route:

# my_view.haml
url(:some, :other, :foo => :bar)
# => /custom/url/with-bar

We have also added the ability to get the current page:

# in a path like /posts/?search=bar&name=foo
= link_to "Sort by Name", current_path("sort" => :name)
= link_to "Sort by Date", current_path("sort" => :date)

Commits for this are here and here.

Compatibility Fixes

  • Upgrade to Sinatra 1.2.6 dependency from 1.2.4 by default
  • Make logger Sinatra 1.3 compatible commit
  • SCSS needs to rely on ‘sass’ gem instead of ‘haml’ commit
  • Use CouchRest::Model in favor of deprecated CouchRest::ExtendedDocument. Thanks to Burgestrand! commit
  • Use the sqlite3 gem as dependency for generated projects commit
  • Use SecureRandom to generate session secret commit
  • Partials can now be used directly with Sinatra from Padrino::Helpers commit, example
  • Adds MongoMapper rake task for dropping the database commit

Bug Fixes

  • Fix YAML by using ‘syck’ to parse by default commit
  • Fix to slim template in admin for destroy session commit
  • Offline generation of static js commit

  • Prev Page
  • Next Page