Changeset 1218

Show
Ignore:
Timestamp:
01/08/08 20:07:44 (8 months ago)
Author:
sethrasmuss..@gmail.com
Message:

fallback on version fix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/merb/version.rb

    r1217 r1218  
    1717     
    1818    def svn_revision_from_file 
    19       File.open svn_revision_file_path, 'w' do |f| 
    20         f.print svn_revision 
     19      # This block should maybe be its own method 
     20      unless File.file? svn_revision_file_path 
     21        File.open svn_revision_file_path, 'w' do |f| 
     22          f.print svn_revision 
     23        end 
    2124      end 
    2225       
  • trunk/spec/merb/version_spec.rb

    r1217 r1218  
    1111    Merb.svn_revision_from_file 
    1212    File.file?(Merb.svn_revision_file_path).should == true 
     13  end 
     14   
     15  it 'should not try to create the file if it already exists' do 
     16    File.should_receive(:open).never 
     17    Merb.svn_revision_from_file 
    1318  end 
    1419