specs
This commit is contained in:
parent
5612dfa4df
commit
09fdd517bd
4 changed files with 30 additions and 5 deletions
|
@ -3,12 +3,12 @@ require "./compiled_license/version"
|
|||
module Compiled
|
||||
module License
|
||||
def self.display
|
||||
{{ run("../compiled_license/licenses.cr").stringify }}
|
||||
{{ run("./compiled_license/licenses.cr").stringify }}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ARGV[0]? && ARGV[0]? == "--license"
|
||||
puts Amber::Support::Licenses.display
|
||||
puts Compiled::License.display
|
||||
exit 0
|
||||
end
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
licenses = String.build do |s|
|
||||
if File.exists?("./LICENSE")
|
||||
s.puts Dir.current.split("/").last.capitalize
|
||||
s.puts "================================================================================"
|
||||
s.puts File.read("./LICENSE")
|
||||
s.puts "================================================================================"
|
||||
s.puts "\n\n"
|
||||
end
|
||||
|
||||
Dir.glob("./lib/*/LICENSE", "./lib/*/license").each do |path|
|
||||
s.puts path.match(/^\.\/lib\/([^\/]+)\//).try(&.[1]).to_s.capitalize
|
||||
s.puts "================================================================================"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue