Sha256: 12822bb9f66142e569f5e810dc1291f170466166341cd876fbff8558a5c1ff70
Contents?: true
Size: 1021 Bytes
Versions: 5
Compression:
Stored size: 1021 Bytes
Contents
# vi: set ft=ruby: require 'optparse' require 'corundum/configuration-store' require 'rake/application' skelfiles = [ { :source => 'skel-files/rakefile', :target => 'Rakefile', :unless => Rake::Application::DEFAULT_RAKEFILES, }, { :source => 'skel-files/gemspec', :target => 'gemspec.rb', :unless => ['gemspec.rb', '*.gemspec'], }, { :source => 'skel-files/gemfile', :target => 'Gemfile', :unless => ['Gemfile'], } ] if %w{-h --help -help help}.include?(ARGV[0]) puts "Spits out skeleton files to start a gem with." puts "Files are copied from the skel-files directory out of this search path:" puts puts Corundum.configuration_store.valise exit 0 end skelfiles.each do |desc| unless (found = desc[:unless].map{|pattern| Dir.glob(pattern)}.flatten).empty? puts "Refusing to clobber existing '#{found.first}'" else File::open(desc[:target], "w") do |file| file.write(Corundum.configuration_store.loaded[desc[:source]]) end puts "Created #{desc[:target]}" end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
corundum-0.0.26 | bin/corundum-skel |
corundum-0.0.25 | bin/corundum-skel |
corundum-0.0.24 | bin/corundum-skel |
corundum-0.0.23 | bin/corundum-skel |
corundum-0.0.22 | bin/corundum-skel |