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>(); }
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"); }
public StubFeed(Feed feed) { _feed = feed; _online = true; UseRepository(new StubPackageRepository(feed.Url)); }
private INugetFeed buildFileSystemFeed(Feed feed) { var directory = feed.Url.Replace("file://", ""); if (feed.Mode == UpdateMode.Fixed) { return new FileSystemNugetFeed(directory); } return new FloatingFileSystemNugetFeed(directory); }
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); }
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)); }
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); }
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(); }
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); }
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); }
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")); }); }
public FloatingStubFeed(Feed feed) : base(feed) { }
public void AddFeed(Feed feed) { _feeds.Fill(feed); }
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); }
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; }
public static INugetFeed FeedFor(Feed feed) { return _provider.For(feed); }
public InMemoryNugetCache(Feed feed) { _feed = feed; }
protected bool Equals(Feed other) { return string.Equals(Url, other.Url); }
public StubFeed For(Feed feed) { return theProvider.For(feed).As<StubFeed>(); }
protected bool Equals(Feed other) { return(string.Equals(Url, other.Url)); }
public static INugetFeed FeedFor(Feed feed) { return(_provider.For(feed)); }
public INugetFeed For(Feed feed) { return _feeds[feed]; }
public INugetFeed For(Feed feed) { return _feeds[feed.Branch()]; }
public INugetFeed For(Feed feed) { return(_feeds[feed]); }