public void determines_dependencies_to_generate()
        {
            var dependencies = theGroup.DetermineDependencies();

            dependencies.ShouldHaveTheSameElementsAs(
                theSolution.FindDependency("FubuCore"),
                theSolution.FindDependency("FubuLocalization"),
                theSolution.FindDependency("FubuMVC.Core")
                );
        }
Exemple #2
0
        private void updateSpecification(CreatePackagesInput input, SpecGroup group, IEnumerable <SpecGroup> groups)
        {
            var spec   = group.Spec;
            var local  = Solution.LocalDependencies();
            var nuspec = new NuspecDocument(spec.Filename);

            group
            .DetermineDependencies()
            .Each(dependency =>
            {
                var localDependency = local.Get(dependency);
                var constraint      = Solution.ConstraintFor(dependency);
                var version         = constraint.SpecFor(localDependency.Version);

                var nuspecDep = new NuspecDependency(dependency.Name, version);

                RippleLog.Info("Adding dependency: " + nuspecDep);

                nuspec.AddDependency(nuspecDep);
            });

            group
            .Projects
            .SelectMany(project => project.References)
            .Each(projectRef =>
            {
                var target = groups.FirstOrDefault(x => x.Projects.Contains(projectRef));
                if (target == null)
                {
                    return;
                }

                // TODO -- Do we need another setting for project references?
                var constraint = Solution.NuspecSettings.Float;
                var version    = constraint.SpecFor(new SemanticVersion(input.VersionFlag));

                var nuspecDep = new NuspecDependency(target.Spec.Name, version);

                RippleLog.Info("Adding dependency: " + nuspecDep);

                nuspec.AddDependency(nuspecDep);
            });



            nuspec.SaveChanges();
        }