public void can_change_the_name() { theDocument.Name = "FubuCore-Edge"; theDocument.SaveChanges(); var document2 = new NuspecDocument(theFilename); document2.Name.ShouldEqual("FubuCore-Edge"); }
public void make_release() { theDocument.MakeEdge(); theDocument.MakeRelease(); theDocument.Name.ShouldEqual("FubuCore"); var document2 = new NuspecDocument(theFilename); document2.Name.ShouldEqual("FubuCore"); }
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; }
public void SetUp() { theFilename = "fubucore.nuspec"; var stream = GetType() .Assembly .GetManifestResourceStream(typeof(DataMother), "FubuCoreNuspecTemplate.txt"); new FileSystem().WriteStreamToFile(theFilename, stream); theDocument = new NuspecDocument(theFilename); }
public void make_edge() { theDocument.MakeEdge(); var document2 = new NuspecDocument(theFilename); document2.Name.ShouldEqual("FubuCore-Edge"); document2.MakeEdge(); var document3 = new NuspecDocument(theFilename); document3.Name.ShouldEqual("FubuCore-Edge"); }
private void generateNuspec(string targetFile) { var nuspec = new NuspecDocument(targetFile); _dependencies.Each(token => { var dependency = token.Create(); nuspec.AddDependency(dependency); }); nuspec.SaveChanges(); }
public PublishesExpression(NuspecDocument spec, Solution solution) { _spec = spec; _solution = solution; }
public void Publishes(string name, Action<PublishesExpression> configure) { var packagingDir = _solution.NugetSpecFolder; var specFile = Path.Combine(packagingDir, "{0}.nuspec".ToFormat(name)); var nuspec = GetType() .Assembly .GetManifestResourceStream(GetType(), "NuspecTemplate.txt") .ReadAllText(); _fileSystem.WriteStringToFile(specFile, nuspec.Replace("${Name}", name)); var document = new NuspecDocument(specFile); document.Name = name; var expression = new PublishesExpression(document, _solution); if (configure == null) { expression.Assembly("{0}.dll".ToFormat(name)); } else { configure(expression); } document.SaveChanges(); }