initial code

This commit is contained in:
Isaac Sloan 2018-02-19 20:53:47 -07:00
parent 592d0c5b7f
commit 5612dfa4df
2 changed files with 23 additions and 4 deletions

View file

@ -1,6 +1,14 @@
require "./compiled_license/*"
require "./compiled_license/version"
# TODO: Write documentation for `CompiledLicense`
module CompiledLicense
# TODO: Put your code here
module Compiled
module License
def self.display
{{ run("../compiled_license/licenses.cr").stringify }}
end
end
end
if ARGV[0]? && ARGV[0]? == "--license"
puts Amber::Support::Licenses.display
exit 0
end

View file

@ -0,0 +1,11 @@
licenses = String.build do |s|
Dir.glob("./lib/*/LICENSE", "./lib/*/license").each do |path|
s.puts path.match(/^\.\/lib\/([^\/]+)\//).try(&.[1]).to_s.capitalize
s.puts "================================================================================"
s.puts File.read(path)
s.puts "================================================================================"
s.puts "\n\n"
end
end
puts licenses