Sha256: e00f190b516c069f3fe183b2df5acb72667b74a08f65dfe3910f9e6ba59b9088
Contents?: true
Size: 846 Bytes
Versions: 3
Compression:
Stored size: 846 Bytes
Contents
class FasterGemScripts def self.overwrite full_path contents_should_be = File.read File.dirname(__FILE__) + '/template' if File.file?(full_path) puts 'faster_gem_scripts: optimizing ' + full_path + '...' File.open(full_path, 'wb') do |f| f.write(contents_should_be); end bin_loc = full_path + '_bin_location' File.delete(bin_loc) if File.exist?(bin_loc) else puts "unable to find the binary:" + full_path + " you may want to find it and overwrite it yourself using C:\>faster_gem_script file_name (no .bat)" end end def self.clear_caches! # I only know about one type... bin_dir = Gem.ruby.split('/')[0..-2].join('/') # strip off ruby.exe Dir[bin_dir = '/*_bin_location'].each{|file| puts 'faster_gem_scripts clearing cached file ' + file File.delete file } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
faster_gem_script-0.2.1 | lib/faster_gem_scripts.rb |
faster_gem_script-0.2.0 | lib/faster_gem_scripts.rb |
faster_gem_script-0.1.6 | lib/faster_gem_scripts.rb |