lib/sdoc/github.rb in sdoc-0.3.16 vs lib/sdoc/github.rb in sdoc-0.3.17

- old
+ new

@@ -25,27 +25,27 @@ end def commit_sha1(path) return false unless have_git? name = File.basename(path) - s = Dir.chdir(File.join(basedir, File.dirname(path))) do + s = Dir.chdir(File.join(base_dir, File.dirname(path))) do `git log -1 --pretty=format:"commit %H" #{name}` end m = s.match(/commit\s+(\S+)/) m ? m[1] : false end def repository_url(path) return false unless have_git? - s = Dir.chdir(File.join(basedir, File.dirname(path))) do + s = Dir.chdir(File.join(base_dir, File.dirname(path))) do `git config --get remote.origin.url` end m = s.match(%r{github.com[/:](.*)\.git$}) m ? "https://github.com/#{m[1]}/blob/" : false end def path_relative_to_repository(path) - absolute_path = File.join(basedir, path) + absolute_path = File.join(base_dir, path) root = path_to_git_dir(File.dirname(absolute_path)) absolute_path[root.size..absolute_path.size] end def path_to_git_dir(path)