Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1101 Bytes
1 | desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.' |
2 | task :routes => :environment do |
3 | all_routes = ENV['CONTROLLER'] ? ActionController::Routing::Routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : ActionController::Routing::Routes.routes |
4 | routes = all_routes.collect do |route| |
5 | name = ActionController::Routing::Routes.named_routes.routes.index(route).to_s |
6 | verb = route.conditions[:method].to_s.upcase |
7 | segs = route.segments.inject("") { |str,s| str << s.to_s } |
8 | segs.chop! if segs.length > 1 |
9 | reqs = route.requirements.empty? ? "" : route.requirements.inspect |
10 | {:name => name, :verb => verb, :segs => segs, :reqs => reqs} |
11 | end |
12 | name_width = routes.collect {|r| r[:name]}.collect {|n| n.length}.max |
13 | verb_width = routes.collect {|r| r[:verb]}.collect {|v| v.length}.max |
14 | segs_width = routes.collect {|r| r[:segs]}.collect {|s| s.length}.max |
15 | routes.each do |r| |
16 | puts "#{r[:name].rjust(name_width)} #{r[:verb].ljust(verb_width)} #{r[:segs].ljust(segs_width)} #{r[:reqs]}" |
17 | end |
18 | end |