public void SetUp() { theSolution = new Solution(); theSolution.ClearFeeds(); theSolution.AddFeed(Feed.Fubu); theSolution.AddFeed(Feed.NuGetV2); theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201")); var theProject = new Project("Test.csproj"); theSolution.AddProject(theProject); theProject.AddDependency(bottles = new Dependency("Bottles")); theProject.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed)); theProject.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("Bottles", "1.0.2.2") .Add("FubuCore", "1.0.2.232") .Add("StructureMap", "2.6.4.71"); scenario.For(Feed.NuGetV2) .Add("RhinoMocks", "3.6.1") .Add("StructureMap", "2.6.3"); scenario.For(theSolution.Cache.ToFeed()); scenario.Online(); }); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", sln => { sln.LocalDependency("FubuCore", "1.1.0.0"); sln.ProjectDependency("Test1", "FubuCore"); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario.For(theSolution.Cache.ToFeed()) .Add("FubuCore", "1.1.0.0") .Add("FubuCore", "1.2.0.0"); scenario.Offline(); }); theBuilder = new NugetPlanBuilder(); theRequest = new NugetPlanRequest { Solution = theSolution, Dependency = new Dependency("FubuCore"), Operation = OperationType.Update, ForceUpdates = false }; }
public void SetUp() { FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("FubuCore", "1.1.0.0") .Add("FubuCore", "1.2.0.0"); }); theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", sln => { sln.LocalDependency("FubuCore", "1.1.0.0"); sln.ProjectDependency("Test1", "FubuCore"); }); }); theSolution = theScenario.Find("Test"); theBuilder = new NugetPlanBuilder(); var request = new NugetPlanRequest { Solution = theSolution, Dependency = new Dependency("FubuCore"), Operation = OperationType.Update, ForceUpdates = false }; thePlan = theBuilder.PlanFor(request); }
public void SetUp() { FeedScenario.Create(scenario => scenario.For(Feed.Fubu).Add("fubu", "1.2.0.0")); theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("fubu", "1.0.0.1", UpdateMode.Fixed); test.LocalDependency("fubu", "1.0.0.1"); }); }); theSolution = theScenario.Find("Test"); theBuilder = new NugetPlanBuilder(); var request = new NugetPlanRequest { Solution = theSolution, Dependency = new Dependency("fubu"), Operation = OperationType.Update, ForceUpdates = false }; thePlan = theBuilder.PlanFor(request); }
public void SetUp() { theCacheFeed = new Feed("file://cache"); theFileSystemFeed = new Feed("file://feed"); FeedScenario.Create(scenario => { scenario.For(theCacheFeed) .Add("Dependency1", "1.0.0.0"); scenario.For(theFileSystemFeed) .Add("Dependency1", "1.1.0.0"); scenario.For(Feed.NuGetV2) .Add("Dependency1", "1.0.23.0"); }); theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("Dependency1", "1.1.0.0", UpdateMode.Float); }); }); theSolution = theScenario.Find("Test"); theSolution.ClearFeeds(); theSolution.AddFeed(theFileSystemFeed); theSolution.AddFeed(Feed.NuGetV2); theSolution.UseCache(new InMemoryNugetCache(theCacheFeed)); }
public void SetUp() { theSolution = new Solution(); theProject = theSolution.AddProject("Project1"); theRunner = new NugetStepRunner(theSolution); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("FubuCore", "1.2.0.0", UpdateMode.Float); test.SolutionDependency("UnneededAnywhereButHere", "1.2.0.0", UpdateMode.Float); test.ProjectDependency("Test1", "FubuCore"); test.ProjectDependency("Test1", "UnneededAnywhereButHere"); test.ProjectDependency("Test2", "FubuCore"); test.LocalDependency("FubuCore", "1.2.0.0"); test.LocalDependency("UnneededAnywhereButHere", "1.2.0.0"); }); }); theSolution = theScenario.Find("Test"); RippleOperation .With(theSolution) .Execute<RemoveInput, RemoveCommand>(new RemoveInput { Nuget = "FubuCore", ProjectFlag = "Test1"}); RippleOperation .With(theSolution) .Execute<RemoveInput, RemoveCommand>(new RemoveInput { Nuget = "UnneededAnywhereButHere", ProjectFlag = "Test1" }); theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test")); }
public void SetUp() { theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", test => { // Defacto a float test.ProjectDependency("Test", "Spark"); }); }); theCache = new Feed("cache"); theSolution = theScenario.Find("Test"); theSolution.UseCache(new InMemoryNugetCache(theCache)); FeedScenario.Create(scenario => { scenario.For(theCache) .Add("Spark", "1.0.0.0"); scenario.For(Feed.NuGetV2) .Add("Spark", "1.1.0.1"); }); RippleOperation .With(theSolution) .Execute<RestoreInput, RestoreCommand>(); }
public void SetUp() { theFinder = MockRepository.GenerateStub<INuspecTemplateFinder>(); theSolution = new Solution(); theSolution.AddProject("Project1"); theSolution.AddProject("Project2"); d1 = new NuspecDependencyToken("DependencyA", "1.0.0.0", VersionConstraint.DefaultFixed); d2 = new NuspecDependencyToken("DependencyB", "1.0.0.0", VersionConstraint.DefaultFixed); g1 = new NuspecTemplate(new NugetSpec("Spec1", "Spec1.nuspec"), new[] { ProjectNuspec.For(theSolution.FindProject("Project1")) }); g2 = new NuspecTemplate(new NugetSpec("Spec2", "Spec2.nuspec"), new[] { ProjectNuspec.For(theSolution.FindProject("Project2")) }); theTemplates = new NuspecTemplateCollection(new[] { g1, g2 }); src1 = MockRepository.GenerateStub<INuspecDependencySource>(); src2 = MockRepository.GenerateStub<INuspecDependencySource>(); theFinder.Stub(x => x.Templates(theSolution)).Return(theTemplates); src1.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g1, theTemplates, theSolution))).Return(new[] { d1 }); src1.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g2, theTemplates, theSolution))).Return(new NuspecDependencyToken[0]); src2.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g1, theTemplates, theSolution))).Return(new NuspecDependencyToken[0]); src2.Stub(x => x.DetermineDependencies(new NuspecTemplateContext(g2, theTemplates, theSolution))).Return(new[] { d2 }); theGenerator = new NuspecGenerator(theFinder, new[] { src1, src2 }); thePlan = theGenerator.PlanFor(theSolution, new SemanticVersion("1.0.0.0")); }
public void persists_and_retrieves_the_solution() { var solution = new Solution { Name = "Test", BuildCommand = "rake", FastBuildCommand = "rake compile", Feeds = new[] { Feed.NuGetV2, Feed.NuGetV1 }, Nugets = new[] { new Dependency("FubuCore", "1.0.1.0") } }; var group = new DependencyGroup(); group.Dependencies.Add(new GroupedDependency("FubuCore")); solution.Groups.Add(group); var constrainedDependency = new Dependency("Bottles", "1.0.0.0") { VersionConstraint = VersionConstraint.DefaultFloat }; solution.AddDependency(constrainedDependency); solution.Nuspecs.Add(new NuspecMap { File = "Temp", Project = "Test"}); CheckXmlPersistence.For(solution); }
public void SetUp() { theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("StructureMap", "2.6.3", UpdateMode.Fixed); test.ProjectDependency("Test", "structuremap"); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("structuremap", "2.6.4.54"); scenario.For(Feed.NuGetV2) .Add("structuremap", "2.6.3"); }); RippleOperation .With(theSolution) .Execute<RestoreInput, RestoreCommand>(); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Float); test.ProjectDependency("Test", "TestNuGet"); }); }); theCache = new Feed("cache"); theSolution = theScenario.Find("Test"); theSolution.UseCache(new InMemoryNugetCache(theCache)); FeedScenario.Create(scenario => { scenario.For(theCache) .Add("TestNuGet", "1.1.0.1"); }); RippleOperation .With(theSolution) .Execute<RestoreInput, RestoreCommand>(); }
public static PersistenceExpression<Solution> ForSolution(Solution target) { var file = "{0}-{1}.config".ToFormat(typeof(Solution).Name, Guid.NewGuid()); var fileSystem = new FileSystem(); if (fileSystem.FileExists(file)) { fileSystem.DeleteFile(file); } var writer = ObjectBlockWriter.Basic(new RippleBlockRegistry()); var contents = writer.Write(target); Debug.WriteLine(contents); fileSystem.WriteStringToFile(file, contents); var reader = SolutionLoader.Reader(); var specification = new PersistenceSpecification<Solution>(x => { var fileContents = fileSystem.ReadStringFromFile(file); var readValue = Solution.Empty(); reader.Read(readValue, fileContents); fileSystem.DeleteFile(file); return readValue; }); specification.Original = target; return new PersistenceExpression<Solution>(specification); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("FubuTransportation", "0.9.0.0", UpdateMode.Float); test.LocalDependency("FubuTransportation", "0.9.0.0"); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario .For(Feed.Fubu) .Add("FubuTransportation", "0.9.0.1") .ThrowWhenSearchingFor("FubuTransportation", "0.9.0.1", new InvalidOperationException("DNS error?")); scenario .For(Feed.NuGetV2) .Add("FubuTransportation", "0.9.0.1"); }); }
public FeedService(Solution solution) { _solution = solution; _dependenciesCache.OnMissing = key => findDependenciesFor(key.Dependency, key.Mode, SearchLocation.Local); ServicePointManager.DefaultConnectionLimit = 10; }
public void SetUp() { FeedScenario.Create(scenario => { scenario.For(Feed.NuGetV2) .Add("FubuCore", "1.0.0.0") .Add("FubuCore.Docs", "1.0.0.0") .Add("log4net", "1.0.0.5") .Add("log4net", "1.0.1.1"); scenario.For(Feed.Fubu) .Add("FubuCore", "1.0.0.100") .Add("FubuCore.Docs", "1.0.0.100") .Add("log4net", "1.0.0.5") .Add("log4net", "1.0.1.1"); }); theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Bottles", bottles => { bottles.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Fixed); }); }); theSolution = theScenario.Find("Bottles"); }
public void SetUp() { theSolution = new Solution(); p1 = theSolution.AddProject("MyProject"); p1.AddDependency("Bottles"); p1.AddDependency("FubuCore"); p1.AddDependency("FubuLocalization"); p2 = theSolution.AddProject("MyOtherProject"); p2.AddDependency("FubuMVC.Core"); theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuCore", "1.1.0.0", UpdateMode.Float)); theSolution.AddDependency(new Dependency("FubuLocalization", "1.2.0.0", UpdateMode.Fixed)); theSolution.AddDependency(new Dependency("FubuMVC.Core", "1.4.0.0", UpdateMode.Fixed)); theNugetSpec = new NugetSpec("MyProject", "myproject.nuspec"); theGroup = new NuspecTemplate(theNugetSpec, new[] { new ProjectNuspec(p1, new NugetSpec("MyProject", "MyProject.nuspec")), new ProjectNuspec(p2, new NugetSpec("MyOtherProject", "MyOtherProject.nuspec")) }); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("Dovetail.SDK", "3.3.0.23", UpdateMode.Fixed); test.ProjectDependency("Test", "Dovetail.SDK"); test.LocalDependency("Dovetail.SDK", "3.2.10.27"); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario .For(Feed.Fubu) .Add("Dovetail.SDK", "3.2.10.27") .Add("Dovetail.SDK", "3.3.0.23"); }); RippleOperation .With(theSolution) .Execute<RestoreInput, RestoreCommand>(); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("FubuTransportation", "0.9.0.1", UpdateMode.Float); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario .For(Feed.Fubu) .Add("FubuTransportation", "0.9.0.1") .Add("FubuTransportation", "0.9.1.0"); scenario .For(theSolution.Cache.ToFeed()) .Add("FubuTransportation", "0.9.0.1"); }); RippleOperation .With(theSolution) .Execute<UpdateInput, UpdateCommand>(input => { input.NugetFlag = "FubuTransportation"; }); }
public void SetUp() { theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Float); test.ProjectDependency("Test", "TestNuGet"); test.LocalDependency("TestNuGet", "1.0.0.0"); }); }); theSolution = theScenario.Find("Test"); FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("TestNuGet", "1.1.0.1"); }); RippleOperation .With(theSolution) .Execute<RestoreInput, RestoreCommand>(); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("Test", test => { test.SolutionDependency("FubuMVC.Core", "1.0.0.0", UpdateMode.Float); test.ProjectDependency("Test", "FubuMVC.Core"); }); }); FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("FubuCore", "1.1.0.0") .Add("Bottles", "1.0.0.5") .Add("FubuMVC.Core", "1.0.0.0") .ConfigureRepository(fubu => { fubu.ConfigurePackage("FubuMVC.Core", "1.0.0.0", mvc => { mvc.DependsOn("FubuCore"); mvc.DependsOn("Bottles"); }); }); }); theSolution = theScenario.Find("Test"); RippleOperation .With(theSolution) .Execute<FixInput, FixCommand>(); theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test")); }
public void can_read_and_write_the_packages_config() { var theFileSystem = new FileSystem(); theFileSystem.WriteStringToFile(NuGetDependencyStrategy.PackagesConfig, "<?xml version=\"1.0\" encoding=\"utf-8\"?><packages></packages>"); var theSolution = new Solution(); theSolution.AddDependency(new Dependency("Bottles", "1.0.1.1")); theSolution.AddDependency(new Dependency("FubuCore", "1.2.0.1")); var theProject = new Project("Test.csproj"); theProject.AddDependency("Bottles"); theProject.AddDependency("FubuCore"); theSolution.AddProject(theProject); var theStrategy = new NuGetDependencyStrategy(); theStrategy.Write(theProject); theStrategy .Read(theProject) .ShouldHaveTheSameElementsAs( new Dependency("Bottles", "1.0.1.1"), new Dependency("FubuCore", "1.2.0.1") ); theFileSystem.DeleteFile(NuGetDependencyStrategy.PackagesConfig); }
public void SetUp() { FeedScenario.Create(scenario => { scenario.For(Feed.Fubu) .Add("FubuMVC.Katana", "1.0.0.1") .Add("FubuMVC.Core", "1.0.1.1") .Add("FubuMVC.OwinHost", "1.2.0.0") .ConfigureRepository(teamcity => { teamcity.ConfigurePackage("FubuMVC.Katana", "1.0.0.1", katana => { katana.DependsOn("FubuMVC.Core"); katana.DependsOn("FubuMVC.OwinHost"); }); teamcity.ConfigurePackage("FubuMVC.OwinHost", "1.2.0.0", owin => owin.DependsOn("FubuMVC.Core")); }); }); theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", fubumvc => { }); }); theSolution = theScenario.Find("Test"); }
public void SetUp() { theScenario = SolutionGraphScenario.Create(scenario => { scenario.Solution("NServiceBus.WebSphereMQ", test => { test.SolutionDependency("NServiceBus.Interfaces", "4.0.0.0", UpdateMode.Float); }); scenario.AddCachedNuget("NServiceBus.Interfaces", "4.0.0.0-unstable3041"); }); nServiceBus = new Feed("http://builds.nservicebus.com/guestAuth/app/nuget/v1/FeedService.svc", UpdateMode.Float, NugetStability.Anything); theSolution = theScenario.Find("NServiceBus.WebSphereMQ"); theSolution.ClearFeeds(); theSolution.AddFeed(nServiceBus); FeedScenario.Create(scenario => { scenario.For(nServiceBus) .Add("NServiceBus.Interfaces", "4.0.0.0-beta0002"); }); NugetFolderCache.DisableValidation(); }
public void BuildSolution(Solution solution) { var stopwatch = new Stopwatch(); stopwatch.Start(); if (solution.GetAllNugetDependencies().Any()) { _logger.Trace("Pausing to try to let the file system quiet down..."); Thread.Sleep(1000); } var process = solution.CreateBuildProcess(_requirements.Fast); _logger.Trace("Trying to run {0} {1} in directory {2}", process.FileName, process.Arguments, process.WorkingDirectory); ProcessReturn processReturn; _logger.Indent(() => { processReturn = _runner.Run(process, new TimeSpan(0, 5, 0), _logCallback); _fileSystem.WriteLogFile(solution.Name + ".log", processReturn.OutputText); stopwatch.Stop(); _logger.Trace("Completed in {0} milliseconds", stopwatch.ElapsedMilliseconds); if (processReturn.ExitCode != 0) { _logger.Trace("Opening the log file for " + solution.Name); new OpenLogCommand().Execute(new OpenLogInput() { Solution = solution.Name }); throw new ApplicationException("Command line execution failed!!!!"); } }); }
public void SetUp() { FeedScenario.Create(scenario => scenario.For(Feed.Fubu).Add("FubuCore", "1.0.0.1")); FeedScenario.Create(scenario => { scenario.For(Feed.NuGetV2) .Add("TopShelf", "1.1.0.0") .Add("log4net", "1.0.0.5") .Add("log4net", "1.0.1.1") .ConfigureRepository(nuget => { nuget.ConfigurePackage("TopShelf", "1.1.0.0", topshelf => topshelf.DependsOn("log4net")); }); }); theScenario = SolutionGraphScenario.Create(scenario => scenario.Solution("Test")); theSolution = theScenario.Find("Test"); theBuilder = new NugetPlanBuilder(); var request = new NugetPlanRequest { Solution = theSolution, Dependency = new Dependency("TopShelf", "1.1.0.0", UpdateMode.Fixed), Operation = OperationType.Install, Project = "Test" }; thePlan = theBuilder.PlanFor(request); }
public void SetUp() { theScenario = SolutionScenario.Create(scenario => { scenario.Solution("Test", test => { test.Publishes("MyProject"); test.Publishes("AnotherProject"); test.SolutionDependency("Bottles", "1.1.0.0", UpdateMode.Fixed); test.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Float); test.SolutionDependency("FubuLocalization", "1.8.0.0", UpdateMode.Fixed); test.LocalDependency("Bottles", "1.1.0.255"); test.LocalDependency("FubuCore", "1.0.1.244"); test.LocalDependency("FubuLocalization", "1.8.0.0"); test.ProjectDependency("MyProject", "Bottles"); test.ProjectDependency("MyProject", "FubuCore"); test.ProjectDependency("MyProject", "FubuLocalization"); test.ProjectDependency("AnotherProject", "FubuCore"); }); }); theSolution = theScenario.Find("Test"); theSolution.FindProject("AnotherProject").AddProjectReference(theSolution.FindProject("MyProject")); var templates = new NuspecTemplateFinder().Templates(theSolution); var current = templates.FindByProject("AnotherProject"); theContext = new NuspecTemplateContext(current, templates, theSolution, new SemanticVersion("1.1.0.0")); theTokens = new ProjectDependenciesSource().DetermineDependencies(theContext); }
public void SetUp() { theSolution = new Solution(); theSolution.ClearFeeds(); theSolution.AddFeed(Feed.Fubu); theSolution.AddFeed(Feed.NuGetV2); theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201")); var theProject = new Project("Test.csproj"); theSolution.AddProject(theProject); theProject.AddDependency(bottles = new Dependency("Bottles")); theProject.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed)); theProject.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theFubuFeed = MockRepository.GenerateStub<IFloatingFeed>(); theFubuFeed.Stub(x => x.GetLatest()).Return(new IRemoteNuget[] { new StubNuget("Bottles", "1.0.2.2"), new StubNuget("FubuCore", "1.0.2.232"), new StubNuget("StructureMap", "2.6.4.71"), }); theNugetFeed = MockRepository.GenerateStub<INugetFeed>(); theNugetFeed.Stub(x => x.Find(rhinomocks)).Return(new StubNuget("RhinoMocks", "3.6.1")); theNugetFeed.Stub(x => x.Find(structuremap)).Return(new StubNuget("StructureMap", "2.6.3")); theFeedProvider = MockRepository.GenerateStub<IFeedProvider>(); theFeedProvider.Stub(x => x.For(Feed.Fubu)).Return(theFubuFeed); theFeedProvider.Stub(x => x.For(Feed.NuGetV2)).Return(theNugetFeed); FeedRegistry.Stub(theFeedProvider); }
public void SetUp() { theScenario = SolutionScenario.Create(scenario => scenario.Solution("Test")); theSolution = theScenario.Find("Test"); var cache = theSolution.Cache.ToFeed(); FeedScenario.Create(scenario => { scenario.For(cache).Add("FubuCore", "1.0.0.1"); scenario.Offline(); }); theBuilder = new NugetPlanBuilder(); var request = new NugetPlanRequest { Solution = theSolution, Dependency = new Dependency("FubuCore", "1.0.0.1", UpdateMode.Fixed), Operation = OperationType.Install, Project = "Test" }; thePlan = theBuilder.PlanFor(request); }
public void SetUp() { var reader = SolutionLoader.Reader(); theSolution = Solution.Empty(); reader.Read(theSolution, blockText); }
public ProjFile(string filename, Solution solution) { _filename = filename; _solution = solution; if (File.Exists(_filename)) { _project = CsProjFile.LoadFrom(_filename); } else { _project = CsProjFile.CreateAtLocation(_filename, solution.Name); } }