예제 #1
0
        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>();
        }
예제 #2
0
        public void SetUp()
        {
            theScenario = SolutionScenario.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";
            });
        }
예제 #3
0
        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 SetUp()
        {
            theScenario = SolutionScenario.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 = SolutionScenario.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"));
        }
예제 #6
0
        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 void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Fixed);
                    test.ProjectDependency("Test", "TestNuGet");
                });
            });

            theFeedDef = new Feed("file://C:/nugets/{branch}");

            theSolution = theScenario.Find("Test");
            theSolution.AddFeed(theFeedDef);

            FeedScenario.Create(scenario =>
            {
                scenario.For("file://C:/nugets/develop")
                .Add("TestNuGet", "1.1.0.1");
            });

            RippleOperation
            .With(theSolution)
            .Execute <RestoreInput, RestoreCommand>(x => x.BranchFlag = "develop");
        }
예제 #8
0
        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>();
        }
예제 #9
0
        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("FubuCore", test =>
                {
                    // No, I don't like this name more. I'm just making it complicated
                    test.Publishes("FubuFoundation", x => x.Assembly("FubuCore.dll"));
                    test.Publishes("FubuCore.Interfaces", x => x.Assembly("FubuCore.Interfaces.dll", "FubuCore"));
                });
            });

            theOutputDir = theScenario.CreateDirectory("output");

            theSolution = theScenario.Find("FubuCore");
            theSolution.AddNuspec(new NuspecMap {
                PackageId = "FubuCore.Interfaces", PublishedBy = "FubuCore"
            });
            theSolution.AddNuspec(new NuspecMap {
                PackageId = "FubuFoundation", PublishedBy = "FubuCore", DependsOn = "FubuCore.Interfaces"
            });

            RippleOperation
            .With(theSolution)
            .Execute <CreatePackagesInput, CreatePackagesCommand>(x =>
            {
                x.UpdateDependenciesFlag = true;
                x.DestinationFlag        = theOutputDir;
                x.VersionFlag            = "1.1.0.0";
            });
        }
        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 updates_dependency()
        {
            RippleOperation
            .With(theSolution)
            .Execute <UpdateInput, UpdateCommand>(update => update.NugetFlag = "FubuTransportation");

            theSolution.Dependencies.Find("FubuTransportation").Version.ShouldEqual("0.9.0.1");
        }
 public void throws_ripple_assertion_for_existing_dependency()
 {
     Exception <RippleFatalError> .ShouldBeThrownBy(() =>
     {
         RippleOperation
         .With(theSolution)
         .Execute <InstallInput, InstallCommand>(x => x.Package = "FubuCore");
     }).Message.ShouldEqual("FubuCore already exists in solution");
 }
예제 #13
0
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.NuGetV2)
                .Add("RavenDB.Client", "2.0.2330")
                .Add("RavenDB.Database", "2.0.2330")
                .Add("RavenDB.Embedded", "2.0.2330")
                .Add("RavenDB.Server", "2.0.2330")
                .ConfigureRepository(nuget =>
                {
                    nuget.ConfigurePackage("RavenDB.Embedded", "2.0.2330", embedded =>
                    {
                        embedded.DependsOn("RavenDB.Client", "2.0.2330");
                        embedded.DependsOn("RavenDB.Database", "2.0.2330");
                    });
                });
            });

            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", sln =>
                {
                    sln.LocalDependency("RavenDB.Client", "2.0.2315");
                    sln.LocalDependency("RavenDB.Database", "2.0.2315");
                    sln.LocalDependency("RavenDB.Embedded", "2.0.2315");
                    sln.LocalDependency("RavenDB.Server", "2.0.2315");

                    sln.SolutionDependency("RavenDB.Client", "2.0.2315", UpdateMode.Fixed);
                    sln.SolutionDependency("RavenDB.Database", "2.0.2315", UpdateMode.Fixed);
                    sln.SolutionDependency("RavenDB.Embedded", "2.0.2315", UpdateMode.Fixed);
                    sln.SolutionDependency("RavenDB.Server", "2.0.2315", UpdateMode.Fixed);

                    sln.ProjectDependency("Test", "RavenDB.Client");
                    sln.ProjectDependency("Test", "RavenDB.Database");
                    sln.ProjectDependency("Test", "RavenDB.Embedded");
                    sln.ProjectDependency("Test", "RavenDB.Server");

                    sln.GroupDependencies("RavenDB.Client", "RavenDB.Database", "RavenDB.Embedded", "RavenDB.Server");
                });
            });

            theSolution = theScenario.Find("Test");

            RippleOperation
            .With(theSolution)
            .Execute <UpdateInput, UpdateCommand>(input =>
            {
                input.NugetFlag = "RavenDB.Client";
            });

            theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test"));
        }
예제 #14
0
        public void treats_both_cases_as_one_dependency()
        {
            RippleOperation
            .With(theSolution)
            .Execute <InstallInput, InstallCommand>(input =>
            {
                input.ProjectFlag = "Test";
                input.Package     = "dep";
            });

            theSolution.Dependencies.Has("FubuMVC.Core");
        }
예제 #15
0
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("StructureMap", "2.6.3", UpdateMode.Fixed);
                    test.ProjectDependency("Test", "structuremap");

                    test.ProjectDependency("Test", "FubuCore");
                    test.ProjectDependency("Test2", "FubuCore");
                });
            });

            theSolution = theScenario.Find("Test");

            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                .Add("structuremap", "2.6.4.54")
                .Add("FubuCore", "1.0.0.0")
                .Add("Bottles", "1.0.0.0")
                .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"));
                });

                scenario.For(Feed.NuGetV2)
                .Add("structuremap", "2.6.3");
            });

            RippleFileSystem.StubCurrentDirectory(theScenario.DirectoryForSolution("Test"));

            theFile = writeBatchInstructionsFile(writer =>
            {
                writer.WriteLine("Bottles/1.0.0.0:Test,Test2");
                writer.WriteLine("Test: FubuMVC.Katana");
                writer.WriteLine("Test2: FubuMVC.Core");
            });

            RippleOperation
            .With(theSolution, resetSolution: true)
            .Execute <RestoreInput, RestoreCommand>();
        }
        public void throws_error_and_leaves_config_alone()
        {
            Exception <RippleFatalError> .ShouldBeThrownBy(() =>
            {
                RippleOperation
                .With(theSolution)
                .Execute <RestoreInput, RestoreCommand>();
            });

            theSolution = theScenario.Find("Test");

            theSolution.Dependencies.Find("Bottles").Version.ShouldEqual("");
        }
예제 #17
0
        public void SetUp()
        {
            theUnavailableFeed  = new Feed("unavailable");
            anotherFloatingFeed = new Feed("floated");

            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("Bottles", "0.9.0.1", UpdateMode.Float);
                    test.SolutionDependency("FubuJson", "0.9.0.6", UpdateMode.Float);
                });
            });

            theSolution = theScenario.Find("Test");
            theSolution.ClearFeeds();

            theSolution.AddFeed(theUnavailableFeed);
            theSolution.AddFeed(Feed.Fubu);
            theSolution.AddFeed(anotherFloatingFeed);


            FeedScenario.Create(scenario =>
            {
                scenario
                .For(theSolution.Cache.ToFeed())
                .Add("Bottles", "0.8.0.123")
                .Add("FubuJson", "0.9.0.1");

                scenario
                .For(theUnavailableFeed)
                .ThrowWhenSearchingFor("FubuJson", new InvalidOperationException("DNS Error"));

                scenario
                .For(Feed.Fubu)
                .Add("Bottles", "0.9.0.1")
                .Add("FubuJson", "0.9.0.333");

                scenario
                .For(anotherFloatingFeed)
                .Add("Test", "1.0.0.0");

                scenario
                .For(Feed.NuGetV2)
                .Add("FubuTransportation", "0.9.0.1");
            });

            RippleOperation
            .With(theSolution)
            .Execute <RestoreInput, RestoreCommand>(x => x.VerboseFlag = true);
        }
        public void installs_the_dependency()
        {
            RippleOperation
            .With(theSolution)
            .Execute <InstallInput, InstallCommand>(x =>
            {
                x.Package     = "FubuCore";
                x.ProjectFlag = "Test";
            });

            theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Test"));

            theSolution.FindProject("Test").Dependencies.Has("FubuCore").ShouldBeTrue();
        }
예제 #19
0
        public void executes_the_steps()
        {
            var s1 = new RecordingStep();
            var s2 = new RecordingStep();

            RippleOperation
            .With(new Solution {
                Directory = ".", Path = "test.config"
            })
            .Execute(new TestInput(), new TestCommand(new[] { s1, s2 }));

            s1.Executed.ShouldBeTrue();
            s2.Executed.ShouldBeTrue();
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario
                .For(Feed.Fubu)
                .Add("Serenity", "1.0.0.2")
                .Add("FubuCore", "1.0.0.1")
                .ConfigureRepository(teamcity =>
                {
                    teamcity.ConfigurePackage("Serenity", "1.0.0.2", serenity =>
                    {
                        serenity.DependsOn("WebDriver", "1.2.0.0");
                        serenity.DependsOn("Something");
                        serenity.DependsOn("SomethingElse", "0.9.9.9");
                    });
                });

                scenario.For(Feed.NuGetV2)
                .Add("WebDriver", "1.2.0.0")
                .Add("Something", "1.0.0.0")
                .Add("SomethingElse", "0.9.9.9");
            });

            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.LocalDependency("WebDriver", "1.1.0.0");

                    test.ProjectDependency("Test", "Serenity");
                    test.ProjectDependency("Test", "WebDriver");

                    test.ProjectDependency("Test2", "FubuCore");

                    test.SolutionDependency("WebDriver", "1.1.0.0", UpdateMode.Fixed);
                });
            });

            theSolution = theScenario.Find("Test");

            RippleOperation
            .With(theSolution)
            .Execute <UpdateInput, UpdateCommand>(input =>
            {
                input.NugetFlag = "Serenity";
                input.ForceFlag = true;
            });
        }
        public void SetUp()
        {
            FeedScenario.Create(scenario =>
            {
                scenario.For(Feed.Fubu)
                .Add("FubuCore", "1.0.0.0")
                .Add("Bottles", "1.0.0.0")
                .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", test =>
                {
                    test.ProjectDependency("Test", "FubuCore");
                    test.ProjectDependency("Test2", "FubuCore");
                });
            });

            theSolution = theScenario.Find("Test");

            RippleFileSystem.StubCurrentDirectory(theScenario.DirectoryForSolution("Test"));

            theFile = writeBatchInstructionsFile(writer =>
            {
                writer.WriteLine("Bottles/1.0.0.0:Test,Test2");
                writer.WriteLine("Test: FubuMVC.Katana");
                writer.WriteLine("Test2: FubuMVC.Core");
            });

            RippleOperation
            .With(theSolution)
            .Execute <BatchInstallInput, BatchInstallCommand>(input =>
            {
                input.FileFlag = theFile;
            });
        }
        public void treats_the_dependencies_as_floats_for_installation()
        {
            RippleOperation
            .With(theSolution)
            .Execute <InstallInput, InstallCommand>(input =>
            {
                input.ProjectFlag = "Test";
                input.Package     = "FubuMVC.Katana";
            });

            var local = theSolution.LocalDependencies();

            local.Get("FubuMVC.Katana").Version.ShouldEqual(new SemanticVersion("1.0.0.1"));
            local.Get("FubuMVC.Core").Version.ShouldEqual(new SemanticVersion("1.0.1.1"));
            local.Get("FubuMVC.OwinHost").Version.ShouldEqual(new SemanticVersion("1.2.0.0"));
        }
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.Publishes("Something");
                    test.Publishes("SomeProject");

                    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("SomeProject", "Bottles");
                    test.ProjectDependency("SomeProject", "FubuCore");
                    test.ProjectDependency("SomeProject", "FubuLocalization");

                    test.ProjectDependency("JustToBeComplicated", "FubuMVC.Core");
                });
            });

            theSolution = theScenario.Find("Test");

            // Map Something.nuspec to the "JustToBeComplicated" project
            theSolution.Nuspecs.Add(new NuspecMap {
                File = "Something.nuspec", Project = "JustToBeComplicated"
            });

            var someProject         = theSolution.FindProject("SomeProject");
            var justToBeComplicated = theSolution.FindProject("JustToBeComplicated");

            someProject.AddProjectReference(justToBeComplicated);

            theSolution.FindDependency("FubuLocalization").Constraint = "Current,NextMinor";

            RippleOperation
            .With(theSolution, false)
            .Execute <CreatePackagesInput, LocalNugetCommand>(input =>
            {
                input.VersionFlag            = "1.0.1.244";
                input.UpdateDependenciesFlag = true;
            });
        }
예제 #24
0
        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Bottles", bottles =>
                {
                    bottles.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Fixed);
                });
            });

            theSolution = theScenario.Find("Bottles");

            RippleOperation
            .With(theSolution)
            .Execute <FloatInput, FloatCommand>(new FloatInput {
                Name = "FubuCore"
            });

            theSolution = SolutionBuilder.ReadFrom(theScenario.DirectoryForSolution("Bottles"));
        }
        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("FubuCore", "1.0.0.0", UpdateMode.Float);
                    test.SolutionDependency("structuremap", "2.6.3", UpdateMode.Fixed);

                    test.LocalDependency("FubuCore", "1.0.0.0");
                    test.LocalDependency("structuremap", "2.6.3");
                });
            });

            theSolution = theScenario.Find("Test");

            RippleOperation
            .With(theSolution)
            .Execute <HistoryInput, HistoryCommand>();
        }
예제 #26
0
        public void query()
        {
            using (var listener = new AssertLogListener())
            {
                listener
                .InAnyOrder()
                .Expect(string.Format("FubuCore, 1.0.0.0 ({0})", Feed.NuGetV2.Url))
                .Expect(string.Format("FubuCore, 1.0.0.100 ({0})", Feed.Fubu.Url))
                .Expect(string.Format("FubuCore.Docs, 1.0.0.0 ({0})", Feed.NuGetV2.Url))
                .Expect(string.Format("FubuCore.Docs, 1.0.0.100 ({0})", Feed.Fubu.Url));

                RippleLog.RegisterListener(listener);

                RippleOperation
                .With(theSolution)
                .Execute <FindNugetsInput, FindNugetsCommand>(new FindNugetsInput {
                    Nuget = "FubuCore"
                });
            }
        }