bin/include in markdown_helper-1.5.1 vs bin/include in markdown_helper-1.6.0

- old
+ new

@@ -8,11 +8,11 @@ # Save opts for use below. opts = nil parser = OptionParser.new do |_opts| opts = _opts - _opts.banner = "Usage: #{File.basename(__FILE__)} [options] template_file_path markdown_file_page" + _opts.banner = "Usage: #{File.basename(__FILE__)} [options] template_file_path markdown_file_path" _opts.on('--pristine', 'No comments added') do |_| options[:pristine] = true end _opts.on('--help', 'Display help') do usage(_opts) @@ -43,16 +43,8 @@ usage(opts) unless ARGV.size == 2 usage(opts) unless File.readable?(template_file_path) usage(opts) unless File.writable?(File.dirname(markdown_file_path)) -# This code, outside of a class, had interference from Module#include. -# So now it's in a class. -class AvoidModule - def initialize(template_file_path, markdown_file_path, options) - markdown_helper = MarkdownHelper.new(options) - markdown_helper.include(template_file_path, markdown_file_path) - end -end - -AvoidModule.new(template_file_path, markdown_file_path, options) +warn('This include is deprecated. Please use command "markdown_helper include".') +MarkdownHelper.new(options).include(template_file_path, markdown_file_path)