Show
Ignore:
Timestamp:
12/11/07 00:16:14 (13 months ago)
Author:
walf443
Message:

lang/ruby/coderepos_stat: I think it better to do this for reading code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/coderepos_stat/coderepos-commit-ping.rb

    r3014 r3022  
    1818  y = YAML.load(yaml) 
    1919 
    20   dir = "data/#{y['date'][0..9]}" # YYYYMMDD 
    21   time = "#{y['date'][11..12]}#{y['date'][14..15]}#{y['date'][17..18]}" # HHMMSS 
     20  date = Time.parse(y['date'], '%Y-%m-%d %H:%M:%S %Z') 
     21  dir = "data/#{date.strftime('%Y%m%d')}" 
    2222  Dir.mkdir(dir) unless FileTest.exist?(dir) 
    2323 
    24   file = "#{dir}/commit-#{time}.yaml" 
     24  file = "#{dir}/commit-#{date.strftime('%H%M%S')}.yaml" 
    2525  File.open(file, 'w') do |f| 
    2626    f.print yaml