Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/jsdoc_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
unless String.method_defined?(:lines) then
class String
def lines
to_a
end
end
end

module JsdocHelper

# :stopdoc:
Expand Down
17 changes: 12 additions & 5 deletions lib/jsdoc_helper/rake/task/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,19 @@ def jsdoc
end

def out
@args[:out].to_a.to_s
if @args[:out].respond_to?(:lines)
@args[:out].lines.to_a.join('')
else
@args[:out].to_a.join('')
end
end

def files
@args[:files].to_a.join(' ')
if @args[:files].respond_to?(:lines)
@args[:files].lines.to_a.join(' ')
else
@args[:files].to_a.join(' ')
end
end

def template
Expand All @@ -75,9 +83,8 @@ def toolkit_path(relative_path)
end

def options
@args[:options].to_a.join(' ')
end

@args[:options].lines.to_a.join(' ')
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/jsdoc_helper/support/file_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
end

it "should produce a src prefix for documentation" do
doc_src_prefix.should =~ /^_Users_petegadomski_Developer_jsdoc_helper_test_tmp$/
doc_src_prefix.should =~ /^#{path.gsub('/', '_')}$/
end

it "should return a nice file list" do
Expand Down