Skip to content

Commit

Permalink
Move docs to a separate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo committed Dec 30, 2016
1 parent f4756e2 commit f2eb5f6
Show file tree
Hide file tree
Showing 27 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def generate_yard
end

def replace_existing_docs(ver)
system %|mkdir -p ../../../lib/pry-doc/core_docs_#{ ver } && cp -r .yardoc/* "$_"|
system %|mkdir -p ../../../lib/pry-doc/docs/#{ver} && cp -r .yardoc/* "$_"|
Dir.chdir(File.expand_path(File.dirname(__FILE__)))
end

Expand Down
11 changes: 5 additions & 6 deletions lib/pry-doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

module PryDoc
def self.load_yardoc(version)
path = "#{File.dirname(__FILE__)}/pry-doc/core_docs_#{version}"

if File.directory?(path)
YARD::Registry.load_yardoc(path)
else
puts "Ruby #{RUBY_VERSION} isn't supported by this pry-doc version"
path = "#{(File.dirname(__FILE__))}/pry-doc/docs/#{version}"
unless File.directory?(path)
raise "Ruby #{RUBY_VERSION} isn't supported by this pry-doc version"
end

YARD::Registry.load_yardoc(path)
end
end

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f2eb5f6

Please sign in to comment.