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() { theSolution = new Solution(); theSolution.ClearFeeds(); theSolution.AddFeed(Feed.Fubu); theSolution.AddFeed(Feed.NuGetV2); theSolution.AddDependency(bottles = new Dependency("Bottles")); theSolution.AddDependency(fubucore = new Dependency("FubuCore", "1.0.1.201")); theSolution.AddDependency(rhinomocks = new Dependency("RhinoMocks", "3.6.1", UpdateMode.Fixed)); theSolution.AddDependency(structuremap = new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); RippleEnvironment.StubConnection(true); 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"), }); theFubuFeed.Stub(x => x.IsOnline()).Return(true); 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")); theNugetFeed.Stub(x => x.IsOnline()).Return(true); 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 RemoteNuget(string name, string version, string url, INugetFeed feed) { Name = name; Version = SemanticVersion.Parse(version); _downloader = new UrlNugetDownloader(url); _dependencies = new Lazy <IEnumerable <Dependency> >(() => feed.Repository.FindPackage(Name, Version).ImmediateDependencies()); }
public RemoteNuget(string name, string version, string url, INugetFeed feed) { Name = name; Version = SemanticVersion.Parse(version); _downloader = new UrlNugetDownloader(url); _dependencies = new Lazy<IEnumerable<Dependency>>(() => feed.Repository.FindPackage(Name, Version).ImmediateDependencies()); }
private bool isOffline(INugetFeed feed) { if (!_checked.Contains(feed)) { if (!feed.IsOnline()) { _offline.Add(feed); } _checked.Add(feed); } return _offline.Contains(feed); }
private bool isOffline(INugetFeed feed) { if (!_checked.Contains(feed)) { if (!feed.IsOnline()) { _offline.Add(feed); } _checked.Add(feed); } return(_offline.Contains(feed)); }
public IEnumerable<IRemoteNuget> ReadAll(INugetFeed feed) { var nodes = _document.DocumentElement.SelectNodes("atom:entry", _manager); foreach (XmlElement element in nodes) { var url = element.SelectSingleNode("atom:content/@src", _manager).InnerText; var name = element.SelectSingleNode("atom:title", _manager).InnerText; var properties = element.SelectSingleNode("m:properties", _manager); var version = properties.SelectSingleNode("d:Version", _manager).InnerText; yield return new RemoteNuget(name, version, url, feed); } }
public IEnumerable <IRemoteNuget> ReadAll(INugetFeed feed) { var nodes = _document.DocumentElement.SelectNodes("atom:entry", _manager); foreach (XmlElement element in nodes) { var url = element.SelectSingleNode("atom:content/@src", _manager).InnerText; var name = element.SelectSingleNode("atom:title", _manager).InnerText; var properties = element.SelectSingleNode("m:properties", _manager); var version = properties.SelectSingleNode("d:Version", _manager).InnerText; yield return(new RemoteNuget(name, version, url, feed)); } }
private IRemoteNuget getLatestFromFloatingFeed(INugetFeed feed, Dependency dependency) { var floatingFeed = feed as IFloatingFeed; if (floatingFeed == null) { return(null); } var floatedResult = floatingFeed.GetLatest().SingleOrDefault(x => dependency.MatchesName(x.Name)); if (floatedResult != null && dependency.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(dependency)) { return(null); } return(floatedResult); }
public void IfOnline(INugetFeed feed, Action<INugetFeed> continuation) { try { if (isOffline(feed)) { RippleLog.Debug("Feed offline. Ignoring " + feed); return; } continuation(feed); } catch (Exception exc) { markOffline(feed); RippleLog.Info("Feed unavailable: " + feed); RippleLog.Debug(exc.ToString()); } }
public void IfOnline(INugetFeed feed, Action <INugetFeed> continuation) { try { if (isOffline(feed)) { RippleLog.Debug("Feed offline. Ignoring " + feed); return; } continuation(feed); } catch (Exception exc) { MarkOffline(feed); RippleLog.Info("Feed unavailable: " + feed); RippleLog.Debug(exc.ToString()); } }
private IRemoteNuget getLatestFromFloatingFeed(INugetFeed feed, Dependency dependency) { var floatingFeed = feed as IFloatingFeed; if (floatingFeed == null) return null; var floatedResult = floatingFeed.GetLatest().SingleOrDefault(x => dependency.MatchesName(x.Name)); if (floatedResult != null && dependency.Mode == UpdateMode.Fixed && floatedResult.IsUpdateFor(dependency)) { return null; } return floatedResult; }
private void markOffline(INugetFeed feed) { _offline.Fill(feed); }
public void MarkOffline(INugetFeed feed) { _offline.Fill(feed); }