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()
        {
            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>();
        }
Exemplo n.º 3
0
        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()
        {
            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 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");
        }
Exemplo n.º 6
0
        public StubFeed(Feed feed)
        {
            _feed = feed;
            _online = true;

            UseRepository(new StubPackageRepository(feed.Url));
        }
Exemplo n.º 7
0
        private INugetFeed buildFileSystemFeed(Feed feed)
        {
            var directory = feed.Url.Replace("file://", "");

            if (feed.Mode == UpdateMode.Fixed)
            {
                return new FileSystemNugetFeed(directory);
            }

            return new FloatingFileSystemNugetFeed(directory);
        }
Exemplo n.º 8
0
        private INugetFeed buildFileSystemFeed(Feed feed)
        {
            var directory = FeedRegistry.BranchUrl(feed);
            directory = directory.Replace("file://", "");
            directory = directory.ToFullPath();

            if (feed.Mode == UpdateMode.Fixed)
            {
                return new FileSystemNugetFeed(directory, feed.Stability);
            }

            return new FloatingFileSystemNugetFeed(directory, feed.Stability);
        }
        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);
        }
Exemplo n.º 10
0
        public void SetUp()
        {
            theFinder = new CacheFinder();
            theCache = new Feed("cache");

            FeedScenario.Create(scenario =>
            {
                scenario.For(theCache)
                    .Add("Test", "1.1.0.0");
            });

            theSolution = Solution.Empty();
            theSolution.UseCache(new InMemoryNugetCache(theCache));
        }
Exemplo n.º 11
0
        private INugetFeed buildFeed(Feed feed)
        {
            if(feed.Url.StartsWith("file://"))
            {
                return buildFileSystemFeed(feed);
            }

            if (feed.Mode == UpdateMode.Fixed)
            {
                return new NugetFeed(feed.Url, feed.Stability);
            }

            return new FloatingFeed(feed.Url, feed.Stability);
        }
Exemplo n.º 12
0
        public void SetUp()
        {
            theSolution = Solution.Empty();
            
            theCacheFeed = new Feed("cache");
            theFeed = new Feed("test");

            theSolution.AddFeed(theFeed);
            theSolution.UseCache(new InMemoryNugetCache(theCacheFeed));

            FeedScenario.Create(scenario =>
            {
                scenario.For(theFeed);
                scenario.For(theCacheFeed);
            });

            theConnectivity = new FeedConnectivity();
        }
Exemplo n.º 13
0
        private INugetFeed buildFileSystemFeed(Feed feed)
        {
            var directory = feed.Url.Replace("file://", "");

            if (directory.Contains(BranchPlaceholder))
            {
                var branchName = BranchDetector.Current();
                directory = directory.Replace(BranchPlaceholder, branchName);

                RippleLog.Debug("Detected branch feed: {0}. Current branch is {1}. Setting directory to {2}".ToFormat(feed, branchName, directory));
            }

            if (feed.Mode == UpdateMode.Fixed)
            {
                return new FileSystemNugetFeed(directory, feed.Stability);
            }

            return new FloatingFileSystemNugetFeed(directory, feed.Stability);
        }
Exemplo n.º 14
0
        private INugetFeed buildFeed(Feed feed)
        {
            if (feed.Url.StartsWith("file://"))
            {
                return buildFileSystemFeed(feed);
            }

            if (!String.IsNullOrEmpty(feed.Username) && !String.IsNullOrEmpty(feed.Password))
            {
                if (HttpClient.DefaultCredentialProvider.GetType() != NugetCredentialsProvider.Instance.GetType())
                {
                    HttpClient.DefaultCredentialProvider = NugetCredentialsProvider.Instance;
                }
                NugetCredentialsProvider.Instance.AddCredentials(feed.Url, new NetworkCredential(feed.Username, feed.Password));
            }

            if (feed.Mode == UpdateMode.Fixed)
            {
                return new NugetFeed(feed.Url, feed.Stability);
            }

            return new FloatingFeed(feed.Url, feed.Stability);
        }
Exemplo n.º 15
0
        public void SetUp()
        {
            theFeed = new Feed("testing");
            theStorage = new StubNugetStorage();

            theSolution = new Solution();
            theSolution.UseStorage(theStorage);
            theSolution.AddFeed(theFeed);
            theSolution.AddDependency(new Dependency("Bottles", "1.0.0.0"));
            theSolution.AddDependency(new Dependency("FubuCore"));
            theSolution.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed));

            theFeedService = theSolution.FeedService.As<FeedService>();

            FeedScenario.Create(scenario =>
            {
                scenario.For(theFeed)
                        .Add(new Dependency("Bottles", "1.0.0.0"))
                        .Add(new Dependency("Bottles", "1.0.1.0"))
                        .Add(new Dependency("FubuCore", "1.2.0.0"))
                        .Add(new Dependency("StructureMap", "2.6.4.54"));
            });
        }
Exemplo n.º 16
0
 public FloatingStubFeed(Feed feed)
     : base(feed)
 {
 }
Exemplo n.º 17
0
 public void AddFeed(Feed feed)
 {
     _feeds.Fill(feed);
 }
Exemplo n.º 18
0
        public void SetUp()
        {
            theFeed = new Feed();
            theConfig = new SolutionConfig
                {
                    Feeds = new[] {theFeed}
                };

            const string rippleConfig = "ripple.config";
            var fileSystem = MockRepository.GenerateStub<IFileSystem>();
            fileSystem.Stub(x => x.LoadFromFile<SolutionConfig>(rippleConfig)).Return(theConfig);

            theLoader = new ClassicRippleSolutionLoader();
            theSolution = theLoader.LoadFrom(fileSystem, rippleConfig);
        }
Exemplo n.º 19
0
        public static string BranchUrl(Feed feed)
        {
            var branchUrl = feed.Url;
            if (branchUrl.Contains(BranchPlaceholder))
            {
                var branchName = BranchDetector.Current();
                branchUrl = branchUrl.Replace(BranchPlaceholder, branchName);

                RippleLog.Debug("Detected branch feed: {0}. Current branch is {1}. Setting url to {2}".ToFormat(feed, branchName, branchUrl), false);
            }

            return branchUrl;
        }
Exemplo n.º 20
0
 public static INugetFeed FeedFor(Feed feed)
 {
     return _provider.For(feed);
 }
Exemplo n.º 21
0
 public InMemoryNugetCache(Feed feed)
 {
     _feed = feed;
 }
Exemplo n.º 22
0
 protected bool Equals(Feed other)
 {
     return string.Equals(Url, other.Url);
 }
Exemplo n.º 23
0
 public StubFeed For(Feed feed)
 {
     return theProvider.For(feed).As<StubFeed>();
 }
Exemplo n.º 24
0
 protected bool Equals(Feed other)
 {
     return(string.Equals(Url, other.Url));
 }
Exemplo n.º 25
0
 public static INugetFeed FeedFor(Feed feed)
 {
     return(_provider.For(feed));
 }
Exemplo n.º 26
0
 public INugetFeed For(Feed feed)
 {
     return _feeds[feed];
 }
Exemplo n.º 27
0
 public INugetFeed For(Feed feed)
 {
     return _feeds[feed.Branch()];
 }
Exemplo n.º 28
0
 public INugetFeed For(Feed feed)
 {
     return(_feeds[feed]);
 }