Projects

Ticket #181: template.patch

File template.patch, 0.7 KB (added by sandor.szuecs@…, 3 years ago)

patch for lib/hotcocoa/template.rb , it changes also the assignment of short_name to a more stable File.basename() call. Aply it to macruby Versions 0.3 and 0.4.

  • lib/hotcocoa/template.rb

     
    44module HotCocoa 
    55  class Template 
    66    def self.copy_to(directory, app_name) 
     7      FileUtils.mkdir(directory) unless File.exists? directory 
    78      dir = Config::CONFIG['datadir'] 
    89      Dir.glob(File.join(dir, "hotcocoa_template", "**/*")).each do |file| 
    9         short_name = file[(dir.length+19)..-1] 
     10        short_name = File.basename(file) 
    1011        if File.directory?(file) 
    1112          FileUtils.mkdir_p File.join(directory, short_name) 
    1213        else 
     
    1920      end 
    2021    end 
    2122  end 
    22 end 
    23  No newline at end of file 
     23end