lib/giblish/buildindex.rb in giblish-0.2.3 vs lib/giblish/buildindex.rb in giblish-0.2.5
- old
+ new
@@ -39,10 +39,11 @@
# Base class with common functionality for all index builders
class BasicIndexBuilder
# set up the basic index building info
def initialize(path_manager)
@paths = path_manager
+ @nof_missing_titles = 0
@added_docs = []
@src_str = ""
end
# creates a DocInfo instance, fills it with basic info and
@@ -303,21 +304,20 @@
# Builds an index of the generated documents and includes some git metadata
# repository
class GitRepoIndexBuilder < BasicIndexBuilder
def initialize(path_manager, git_repo_root)
super path_manager
+
+ # initialize state variables
@git_repo_root = git_repo_root
# no repo root given...
return unless @git_repo_root
begin
# Make sure that we can "talk" to git if user feeds us
# a git repo root
@git_repo = Git.open(@git_repo_root)
-
- # initialize state variables
- @nof_missing_titles = 0
rescue Exception => e
Giblog.logger.error { "No git repo! exception: #{e.message}" }
end
end