def __init__()

in aws_lambda_builders/workflows/ruby_bundler/workflow.py [0:0]


    def __init__(self, source_dir, artifacts_dir, scratch_dir, manifest_path, runtime=None, osutils=None, **kwargs):
        super(RubyBundlerWorkflow, self).__init__(
            source_dir, artifacts_dir, scratch_dir, manifest_path, runtime=runtime, **kwargs
        )

        if osutils is None:
            osutils = OSUtils()

        self.actions = [CopySourceAction(source_dir, artifacts_dir, excludes=self.EXCLUDED_FILES)]

        if self.download_dependencies:
            # installed the dependencies into artifact folder
            subprocess_bundler = SubprocessBundler(osutils)
            bundle_install = RubyBundlerInstallAction(artifacts_dir, subprocess_bundler=subprocess_bundler)
            bundle_deployment = RubyBundlerVendorAction(artifacts_dir, subprocess_bundler=subprocess_bundler)
            self.actions.append(bundle_install)
            self.actions.append(bundle_deployment)

            # if dependencies folder exists, copy dependencies into dependencies into dependencies folder
            if self.dependencies_dir:
                # clean up the dependencies first
                self.actions.append(CleanUpAction(self.dependencies_dir))
                self.actions.append(CopyDependenciesAction(source_dir, artifacts_dir, self.dependencies_dir))
        elif self.dependencies_dir:
            # if dependencies folder exists and not download dependencies, simply copy the dependencies from the
            # dependencies folder to artifact folder
            self.actions.append(CopySourceAction(self.dependencies_dir, artifacts_dir))
        else:
            LOG.info(
                "download_dependencies is False and dependencies_dir is None. Copying the source files into the "
                "artifacts directory. "
            )