Example #1
0
        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"))
            });
        }
Example #2
0
 public PackageParams(NugetSpec spec, SemanticVersion version, string outputPath, bool createSymbols)
 {
     Spec = spec;
     Version = version;
     OutputPath = outputPath;
     CreateSymbols = createSymbols;
 }
Example #3
0
        public NuspecTemplate(NugetSpec spec, IEnumerable<ProjectNuspec> projects)
        {
            Spec = spec;
            _projectNuspecs.AddRange(projects);

            Id = Guid.NewGuid();
        }
Example #4
0
        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());
        }
Example #5
0
        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;
        }
Example #6
0
        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);
        }
Example #7
0
 protected bool Equals(NugetSpec other)
 {
     return _filename.EqualsIgnoreCase(other._filename);
 }
Example #8
0
 protected bool Equals(NugetSpec other)
 {
     return(_filename.EqualsIgnoreCase(other._filename));
 }
Example #9
0
 public void AddDependency(NugetSpec spec)
 {
     _dependencies.Add(spec);
 }
Example #10
0
 public ProjectNuspec(Project project, NugetSpec publishes)
 {
     _project = project;
     _publishes = publishes;
 }
Example #11
0
 public void AddNugetSpec(NugetSpec spec)
 {
     _specifications.Value.Add(spec);
 }
Example #12
0
 public string NugetFolderFor(NugetSpec spec)
 {
     return NugetFolderFor(spec.Name);
 }
Example #13
0
 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;
     }
 }
Example #14
0
 private PackageBuilder symbolsPackageBuilderFor(NugetSpec spec, SemanticVersion version)
 {
     return packageBuilderFor(spec, version);
 }
Example #15
0
        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"));

        }
Example #16
0
        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));
        }
Example #17
0
        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);
        }