require_relative 'include_files/include_use_case' require_relative '../../lib/string_helper' namespace :build do def camelize(snake_case_string) snake_case_string.split('_').collect(&:capitalize).join end desc 'Build use case markdown' task :use_cases do # Page that links to use cases. File.open('use_cases.md', 'w') do |use_case_file| use_case_file.puts(< %w/ reuse_text include_with_added_comments nest_inclusions include_markdown include_code_block include_highlighted_code include_text_as_comment include_text_as_pre include_generated_text diagnose_missing_includee diagnose_circular_includes /, :tables_of_contents => %w/ create_and_include_page_toc /, # :resolve => %w/ # resize_images # resolve_with_added_comments # gemify_images # /, } use_case_dirs.each_pair do |section, dir_names| # Header for section, if any dirs therein. title = StringHelper.to_title(section.to_s).sub(/ toc$/i, ' TOC') use_case_file.puts(<