Skip to content

Commit ec82960

Browse files
authored
Merge pull request #245 from rspec/testing-line-removal
Remove rspec-doc-template yard plugin + remove empty lines from HTML doc
2 parents f576bab + 4020860 commit ec82960

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Rakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def run_command(command, opts={})
2626
FileUtils.cd(path) do
2727
puts "#{'='*3} #{dir} #{'='*(40 - dir.length)}"
2828
begin
29-
Bundler.clean_system(command)
29+
Bundler.unbundled_system(command)
3030
rescue Exception => e
3131
puts e.backtrace
3232
end
@@ -65,22 +65,23 @@ task :update_docs, [:version, :branch, :website_path] do |t, args|
6565
args.with_defaults(:website_path => "../rspec.github.io")
6666
run_command "git checkout #{args[:branch]} && git pull --rebase"
6767
each_project :except => (UnDocumentedProjects + SemverUnlinkedProjects) do |project|
68+
doc_destination_path = "#{args[:website_path]}/source/documentation/#{args[:version]}/#{project}/"
6869
cmd = "bundle install && \
6970
RUBYOPT='-I#{args[:website_path]}/lib' bundle exec yard \
7071
--yardopts .yardopts \
71-
--plugin rspec-docs-template \
72-
--output-dir #{args[:website_path]}/source/documentation/#{args[:version]}/#{project}/"
72+
--output-dir #{doc_destination_path}"
7373
puts cmd
74-
Bundler.clean_system(cmd)
74+
Bundler.unbundled_system(cmd)
7575
in_place =
7676
if RUBY_PLATFORM =~ /darwin/ # if this is os x then we must modify sed
7777
"-i ''"
7878
else
7979
"-i''"
8080
end
8181

82-
Bundler.clean_system %Q{pushd #{args[:website_path]}; ag -l src=\\"\\\(?:..\/\\\)*js | xargs -I{} sed #{in_place} 's/src="\\\(..\\\/\\\)*js/src="\\\/documentation\\\/#{args[:version]}\\\/#{project}\\\/js/' {}; popd}
83-
Bundler.clean_system %Q{pushd #{args[:website_path]}; ag -l href=\\"\\\(?:..\/\\\)*css | xargs -I{} sed #{in_place} 's/href="\\\(..\\\/\\\)*css/href="\\\/documentation\\\/#{args[:version]}\\\/#{project}\\\/css/' {}; popd}
82+
Bundler.unbundled_system %Q{ag -l src=\\"\\\(?:..\/\\\)*js #{doc_destination_path} | xargs -I{} sed #{in_place} 's/src="\\\(..\\\/\\\)*js/src="\\\/documentation\\\/#{args[:version]}\\\/#{project}\\\/js/' {}}
83+
Bundler.unbundled_system %Q{ag -l href=\\"\\\(?:..\/\\\)*css #{doc_destination_path} | xargs -I{} sed #{in_place} 's/href="\\\(..\\\/\\\)*css/href="\\\/documentation\\\/#{args[:version]}\\\/#{project}\\\/css/' {}}
84+
Bundler.unbundled_system %Q{ag --html -l . #{doc_destination_path} | xargs -I{} sed #{in_place} /^[[:space:]]*$/d {}}
8485
end
8586
end
8687

0 commit comments

Comments
 (0)