Created
May 2, 2013 14:22
-
-
Save enriclluelles/5502532 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['~>3.2.0', '~>4.0.0rc1'].each do |ver| | |
pid = fork do | |
puts ver | |
gem 'rails', ver | |
require 'rails/all' | |
require_relative './lib/route_translator' | |
routes = ActionDispatch::Routing::RouteSet.new | |
class PeopleController < ActionController::Base | |
end | |
module I18n | |
def self.available_locales | |
[:es, :en, :fr] | |
end | |
end | |
routes.draw do | |
localized do | |
get 'foo', :to => 'people#index', :as => 'people' | |
end | |
end | |
routes.named_routes.routes.each{|k,v| puts v.path.spec.to_s} | |
puts routes.generate(action: 'index', controller: 'people', locale: 'en').inspect | |
puts routes.generate(action: 'index', controller: 'people', locale: 'es').inspect | |
puts routes.generate(action: 'index', controller: 'people', locale: 'fr').inspect | |
end | |
Process.wait pid | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment