public CollectSectionsFacts()
        {
            var root = GetRepoRootWithoutDotGit();

            _repo = GitFileSystemRoot.DiscoverRepo(root);
            var git = new GitFileSystemRoot(_repo);

            _catalog = new Catalog();
            var site = new SiteDefinition
            {
                Title      = "Run pipeline",
                OutputPath = "output",
                BuildPath  = "_build",
                Branches   = new Dictionary <string, BranchDefinition>
                {
                    ["HEAD"] = new BranchDefinition()
                    {
                        InputPath = new[] { "docs-v2", "ui-bundle" }
                    }
                }
            };

            _aggregator = new ContentAggregator(
                site,
                git,
                new PhysicalFileSystem(root),
                new MimeDbClassifier());
        }
示例#2
0
 public Executor(
     SiteDefinition site,
     string currentPath)
 {
     _logger         = Infra.LoggerFactory.CreateLogger <Executor>();
     CurrentPath     = currentPath;
     Site            = site;
     FileSystem      = new PhysicalFileSystem(CurrentPath);
     CacheFileSystem = CreateFileSystem(currentPath, site.BuildPath);
     GitRoot         = GitFileSystemRoot.Discover(CurrentPath);
 }
 public ContentAggregator(
     SiteDefinition site,
     GitFileSystemRoot git,
     IFileSystem workFileSystem,
     IContentClassifier classifier)
 {
     _site           = site;
     _git            = git;
     _workFileSystem = workFileSystem;
     _classifier     = classifier;
     _logger         = Infra.LoggerFactory.CreateLogger <ContentAggregator>();
 }
示例#4
0
 public GitFileSystemFacts()
 {
     RepoRoot = Repository.Discover(Environment.CurrentDirectory);
     Repo     = new Repository(RepoRoot);
     RootFs   = new GitFileSystemRoot(Repo);
 }