From 5d4ffafe63f2ddea6be009c7b2c31499ccc71105 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Thu, 17 Mar 2016 13:30:58 -0400 Subject: [PATCH] docs: rip out YARD tasks :thumb: --- .yardopts | 10 ---------- Rakefile | 56 ------------------------------------------------------- 2 files changed, 66 deletions(-) delete mode 100644 .yardopts diff --git a/.yardopts b/.yardopts deleted file mode 100644 index 5ad6371..0000000 --- a/.yardopts +++ /dev/null @@ -1,10 +0,0 @@ ---readme README.md ---title 'Squib API Documentation' ---markup markdown ---markup-provider=redcarpet ---api public ---asset samples:samples ---charset utf-8 -- -samples/**/*.rb -LICENSE.txt \ No newline at end of file diff --git a/Rakefile b/Rakefile index 24a6d4b..5bc0c98 100644 --- a/Rakefile +++ b/Rakefile @@ -26,14 +26,6 @@ RSpec::Core::RakeTask.new(:spec_fastonly) do |t| t.rspec_opts = "--tag ~slow" end -desc 'Build API docs' -task doc: [:yarddoc, :apply_google_analytics] - -YARD::Rake::YardocTask.new(:yarddoc) do |t| - t.files = ['lib/**/*.rb', 'samples/**/*.rb'] # optional - #t.options = ['--any', '--extra', '--opts'] # optional -end - desc 'Run some performance benchmarks' task benchmark: [:install] do require 'squib' @@ -56,51 +48,3 @@ end desc 'Run full rebuild with sanity tests' task sanity: [:install, :spec, :sanity_only] - -desc 'Insert Google Analytics into documentation build' -task :apply_google_analytics do - # The string to replace in the html document. This is chosen to be the end - # body tag. So the script can be injected as the last thing in the - # document body. - string_to_replace = "" - # This is the string to replace with. It include the google analytics script - # as well as the end tag. - string_to_replace_with = <<-EOF - - - EOF - - files = Dir.glob("doc/**/*.html") - - files.each do |html_file| - puts "Processing file: #{html_file}" - contents = "" - # Read the file contents - file = File.open(html_file) - file.each { |line| contents << line } - file.close - - # If the file already has google analytics tracking info, skip it. - if contents.include?(string_to_replace_with) - puts "Skipped..." - next - end - - # Apply google analytics tracking info to the html file - contents.gsub!(string_to_replace, string_to_replace_with) - - # Write the contents with the google analytics info to the file - file = File.open(html_file, "w") - file.write(contents) - file.close - end -end