Skip to content

Commit

Permalink
Remove --without-search option
Browse files Browse the repository at this point in the history
This feature was never really used.

Since we inherit RDoc::JsonIndex behavior, we always generate these files.

I'm happy to add it back if anyone wants, or if this causes any issues.
  • Loading branch information
Zachary Scott committed Apr 23, 2017
1 parent 8fb1ff7 commit 73ace36
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
14 changes: 0 additions & 14 deletions lib/sdoc/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class RDoc::Generator::SDoc

def self.setup_options(options)
@github = false
options.search_index = true

opt = options.option_parser
opt.separator nil
Expand All @@ -134,18 +133,6 @@ def self.setup_options(options)
end
opt.separator nil

opt.on("--without-search", "-s",
"Do not generate index file for search engines.",
"SDoc uses javascript to reference individual documentation pages.",
"Search engine crawlers are not smart enough to find all the",
"referenced pages.",
"To help them SDoc generates a static file with links to every",
"documentation page. This file is not shown to the user."
) do
options.search_index = false
end
opt.separator nil

end

def initialize(store, options)
Expand Down Expand Up @@ -175,7 +162,6 @@ def generate
generate_file_files
generate_class_files
generate_index_file
generate_search_index if @options.search_index
end

def class_dir
Expand Down
22 changes: 0 additions & 22 deletions spec/rdoc_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,4 @@
err.wont_match(/^invalid options/)
@options.github.must_equal true
end

it "should parse no search engine index option" do
@options.search_index.must_equal true

_, err = capture_io do
@parser.parse %w[--without-search]
end

err.wont_match(/^invalid options/)
@options.search_index.must_equal false
end

it "should parse search-index shorthand option" do
@options.search_index.must_equal true
_, err = capture_io do
@parser.parse %w[-s]
end

err.wont_match(/^invalid options/)
@options.search_index.must_equal false
end

end

0 comments on commit 73ace36

Please sign in to comment.