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 PackageParams(NugetSpec spec, SemanticVersion version, string outputPath, bool createSymbols) { Spec = spec; Version = version; OutputPath = outputPath; CreateSymbols = createSymbols; }
public NuspecTemplate(NugetSpec spec, IEnumerable<ProjectNuspec> projects) { Spec = spec; _projectNuspecs.AddRange(projects); Id = Guid.NewGuid(); }
public void SetUp() { var theFilename = "fubumvc.core.nuspec"; var stream = GetType() .Assembly .GetManifestResourceStream(typeof(DataMother), "FubuMVCNuspecTemplate.txt"); new FileSystem().WriteStreamToFile(theFilename, stream); theSpec = NugetSpec.ReadFrom(theFilename.ToFullPath()); }
public static NugetSpec ReadFrom(string filename) { var document = new NuspecDocument(filename); var spec = new NugetSpec(document.Name, filename); spec._dependencies.AddRange(document.FindDependencies()); spec._publishedAssemblies.AddRange(document.FindPublishedAssemblies()); return spec; }
public static NugetSpec ReadFrom(string filename) { var document = new NuspecDocument(filename); var spec = new NugetSpec(document.Name, filename); spec._dependencies.AddRange(document.FindDependencies()); spec._publishedAssemblies.AddRange(document.FindPublishedAssemblies()); return(spec); }
protected bool Equals(NugetSpec other) { return _filename.EqualsIgnoreCase(other._filename); }
protected bool Equals(NugetSpec other) { return(_filename.EqualsIgnoreCase(other._filename)); }
public void AddDependency(NugetSpec spec) { _dependencies.Add(spec); }
public ProjectNuspec(Project project, NugetSpec publishes) { _project = project; _publishes = publishes; }
public void AddNugetSpec(NugetSpec spec) { _specifications.Value.Add(spec); }
public string NugetFolderFor(NugetSpec spec) { return NugetFolderFor(spec.Name); }
private PackageBuilder packageBuilderFor(NugetSpec spec, SemanticVersion version) { try { return new PackageBuilder(spec.Filename, NullPropertyProvider.Instance, true) { Version = version }; } catch (Exception exc) { RippleAssert.Fail("Error creating package: " + exc.Message); return null; } }
private PackageBuilder symbolsPackageBuilderFor(NugetSpec spec, SemanticVersion version) { return packageBuilderFor(spec, version); }
public void get_nuget_directory() { var solution = new Solution { SourceFolder = "source", Directory = ".".ToFullPath() }; var storage = new StubNugetStorage(); storage.Add("FubuCore", "0.9.1.37"); solution.UseStorage(storage); var project = new Project("something.csproj"); var dependency = new Dependency("FubuCore", "0.9.1.37"); project.AddDependency(dependency); solution.AddProject(project); var spec = new NugetSpec("FubuCore", "somefile.nuspec"); solution.NugetFolderFor(spec) .ShouldEqual(".".ToFullPath().AppendPath(solution.PackagesDirectory(), "FubuCore")); }
public void publishes_the_specification() { var s1 = new NugetSpec("Test1", "Test1.nuspec"); var solution = new Solution(); var service = MockRepository.GenerateStub<IPublishingService>(); service.Stub(x => x.SpecificationsFor(solution)).Return(new[] { s1 }); solution.UsePublisher(service); var version = SemanticVersion.Parse("1.1.2.3"); var ctx = new PackageParams(s1, version, "artifacts", false); solution.Package(ctx); service.AssertWasCalled(x => x.CreatePackage(ctx)); }
public void retrieve_the_nuget_specs() { var s1 = new NugetSpec("Test1", "Test1.nuspec"); var s2 = new NugetSpec("Test2", "Test2.nuspec"); var solution = new Solution(); var service = MockRepository.GenerateStub<IPublishingService>(); service.Stub(x => x.SpecificationsFor(solution)).Return(new[] { s1, s2 }); solution.UsePublisher(service); solution.Specifications.ShouldHaveTheSameElementsAs(s1, s2); }