Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 2972

Show
Ignore:
Timestamp:
11/10/05 16:14:25 (3 years ago)
Author:
bitsweat
Message:

Better svn status matching for generators. Closes #2814.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r2967 r2972  
    11*SVN* 
     2 
     3* Better svn status matching for generators.  #2814 [François Beausoleil <francois.beausoleil@gmail.com>, Blair Zajac <blair@orcaware.com>] 
    24 
    35* Don't reload routes until plugins have been loaded so they have a chance to extend the routing capabilities [DHH] 
  • trunk/railties/lib/rails_generator/options.rb

    r2174 r2972  
    128128          opt.on('-t', '--backtrace', 'Debugging: show backtrace on errors.') { |options[:backtrace]| } 
    129129          opt.on('-h', '--help', 'Show this help message.') { |options[:help]| } 
    130           opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') { options[:svn] = Hash[*`svn status`.collect { |e| e.chop.split.reverse unless e.chop.split.size != 2 }.flatten] } 
     130          opt.on('-c', '--svn', 'Modify files with subversion. (Note: svn must be in path)') do 
     131            options[:svn] = `svn status`.inject({}) do |opt, e| 
     132              opt[e.chomp[7..-1]] = true 
     133              opt 
     134            end 
     135          end 
    131136        end 
    132137