Sha256: eaae591c6c4e7dffaf685da60213206c796c719cdc5b2500d26d5cbf12f7e844
Contents?: true
Size: 671 Bytes
Versions: 9
Compression:
Stored size: 671 Bytes
Contents
directory "LICENSES" $gemspec = Gem::Specification.load(Dir["*.gemspec"][0]) file "LICENSES/.info" => "gemspec.gemspec" do |t| mkdir_p "LICENSES" licenses_dir = File.expand_path('../../share/gemspec/licenses/', `gem which gemspec`.chomp) $? == 0 or licenses_dir = File.expand_path('licenses/') $gemspec.licenses.each do |license| cp File.join(licenses_dir, license), "LICENSES/#{Shellwords.escape license}" end File.write(t.name, "This directory contains the licenses you can use with this gem\n") end desc "Fill LICENSES/ with licenses according to gemspec.gemspec and view them" task 'license' => 'LICENSES/.info' do sh "cd LICENSES/; less *" end
Version data entries
9 entries across 5 versions & 2 rubygems