public void ReturnAllNServiceBusAzureReleases() { var config = RunnerConfiguration.Default; config.AddStatsProvider(new NuGetStatsProvider()); using (var releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config)) { var result = releaseStatsRunner.GenerateStatistics("NServiceBus.Azure"); result.Releases.Where(r => !r.Version.IsPatchRelease) .ToList() .ForEach(ConsoleFormatter.PrintRelease); } }
public void SetUp() { var config = new RunnerConfiguration(); config.AddProviderValidator(new DuplicateVersionsValidator()); config.AddCleaner(new ConsolidateDuplicateReleasesCleaner()); config.AddStatsProvider(new NuGetStatsProvider()); config.AddStatsProvider(new GitHubStatsProvider("Particular")); config.AddProjectProvider(new GitHubProjectProvider("Particular")); releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config); }
public void ReturnAllNServiceBusReleases() { var config = RunnerConfiguration.Default; config.AddStatsProvider(new NuGetStatsProvider()); config.AddCleaner(new ConsolidateDuplicateReleasesCleaner()); using (var releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config)) { var result = releaseStatsRunner.GenerateStatistics("NServiceBus"); Assert.Contains(new Release("4.6.3"), result.Releases); result.Releases.Where(r => !r.Version.IsPatchRelease) .ToList() .ForEach(ConsoleFormatter.PrintRelease); } }
public void ListProjectsAndSubProjects() { var config = RunnerConfiguration.Default; config.AddStatsProvider(new GitHubStatsProvider("Particular")); config.AddProjectProvider(new GitHubProjectProvider("Particular")); using (var releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config)) { var result = releaseStatsRunner.GenerateMultiple("NServiceBus*"); var project = result.Single(p => p.Name == "NServiceBus"); Assert.AreEqual("NServiceBus", project.Name); Assert.Contains("NServiceBus.RabbitMQ", project.Subprojects.Select(p => p.Name).ToList()); PrintProjects(result); } }
public void ReturnAllNServiceBusReleases() { var config = RunnerConfiguration.Default; config.AddStatsProvider(new NuGetStatsProvider()); config.AddStatsProvider(new GitHubStatsProvider("Particular")); using (var releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config)) { var result = releaseStatsRunner.GenerateStatistics("NServiceBus"); var release463 = result.Releases.Single(r => r == new Release("5.0.1")); Assert.AreEqual("https://github.com/Particular/NServiceBus/releases/tag/4.6.3", release463.Property <LinkToReleaseNotes>().Url); result.Releases.Where(r => !r.Version.IsPatchRelease) .ToList() .ForEach(ConsoleFormatter.PrintRelease); } }
public void DisplayReport() { var project = "NServiceBus"; var config = RunnerConfiguration.Default; config.AddStatsProvider(new NuGetStatsProvider()); var releaseStatsRunner = ReleaseStatsFactory.CreateRunner(config); var result = releaseStatsRunner.GenerateStatistics(project); var reportData = result.Releases.Select(r => new Datapoint { Period = r.Property <ReleaseDate>().ReleasedAt.ToString("yyyy-MM"), NumberOfReleases = 1 }).ToList(); reportData.AddRange(GenerateAllMonths(reportData.Min(r => r.Period), reportData.Max(r => r.Period))); reportData = reportData.GroupBy(r => r.Period) .OrderBy(g => g.Key) .Select(g => new Datapoint { Period = g.Key, NumberOfReleases = g.Sum(d => d.NumberOfReleases) }).ToList(); var data = SimpleJson.SerializeObject(new { title = "NServiceBus releases", data = reportData.ToArray() }); var target = RenderTemplate(project, data); Process.Start(target); }