whoward/cadenza

View on GitHub
bin/cadenza

Summary

Maintainability
Test Coverage
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')

require 'cadenza'
require 'cadenza/cli'

options = Cadenza::Cli::Options.parse!
path = ARGV[0]

begin
  $stdout.puts Cadenza::Cli.run!(path, options)
rescue Cadenza::TemplateNotFoundError => e
  warn "Couldn't find template - #{e.message}"
  exit 66
rescue Cadenza::Error => e
  warn e.backtrace.to_s
  exit 1
end