Skip to content

Commit dfeb2a2

Browse files
author
Kevin Paulisse
committed
Get rid of dir_opts, just use options
1 parent c3808eb commit dfeb2a2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

lib/octocatalog-diff/catalog-util/bootstrap.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def self.bootstrap_directory_parallelizer(options, logger)
8282

8383
# Performs the actual bootstrap of a directory. Intended to be called by bootstrap_directory_parallelizer
8484
# above, or as part of the parallelized catalog build process from util/catalogs.
85+
# @param options [Hash] Directory options: branch, path, tag
8586
# @param logger [Logger] Logger object
86-
# @param dir_opts [Hash] Directory options: branch, path, tag
8787
def self.bootstrap_directory(options, logger)
8888
raise ArgumentError, ':path must be supplied' unless options[:path]
8989
FileUtils.mkdir_p(options[:path]) unless Dir.exist?(options[:path])
@@ -96,11 +96,11 @@ def self.bootstrap_directory(options, logger)
9696

9797
# Perform git checkout
9898
# @param logger [Logger] Logger object
99-
# @param dir_opts [Hash] Directory options: branch, path, tag
100-
def self.git_checkout(logger, dir_opts)
101-
logger.debug("Begin git checkout #{dir_opts[:basedir]}:#{dir_opts[:branch]} -> #{dir_opts[:path]}")
102-
OctocatalogDiff::CatalogUtil::Git.check_out_git_archive(dir_opts.merge(logger: logger))
103-
logger.debug("Success git checkout #{dir_opts[:basedir]}:#{dir_opts[:branch]} -> #{dir_opts[:path]}")
99+
# @param options [Hash] Options (need to contain: basedir, branch, path)
100+
def self.git_checkout(logger, options)
101+
logger.debug("Begin git checkout #{options[:basedir]}:#{options[:branch]} -> #{options[:path]}")
102+
OctocatalogDiff::CatalogUtil::Git.check_out_git_archive(options.merge(logger: logger))
103+
logger.debug("Success git checkout #{options[:basedir]}:#{options[:branch]} -> #{options[:path]}")
104104
rescue OctocatalogDiff::Errors::GitCheckoutError => exc
105105
logger.error("Git checkout error: #{exc}")
106106
raise OctocatalogDiff::Errors::BootstrapError, exc

0 commit comments

Comments
 (0)