public void mode_for_nuget_that_matches_floats() { var config = new SolutionConfig(); config.Floats = new string[]{"FubuCore"}; config.ModeForNuget("FubuCore").ShouldEqual(UpdateMode.Float); }
public void float_nuget() { var config = new SolutionConfig(); config.FloatNuget("Nug1"); config.ModeForNuget("Nug1").ShouldEqual(UpdateMode.Float); config.Floats.ShouldContain("Nug1"); }
public void lock_nuget() { var config = new SolutionConfig(); config.FloatNuget("Nug1"); config.LockNuget("Nug1"); config.ModeForNuget("Nug1").ShouldEqual(UpdateMode.Fixed); config.Floats.Any().ShouldBeFalse(); }
public void MarkFloatingDependencies(SolutionConfig config, Solution solution) { config.Floats.Each(x => solution.Projects.Each(project => { var dependency = project.Dependencies.Find(x); if (dependency != null) { dependency.Float(); } })); }
private static string findCorrectFolder(string folder) { var config = SolutionConfig.LoadFrom(folder); if (config != null) { folder = folder.ParentDirectory(); } return(folder); }
public void ExtractSolutionLevelConfiguration(SolutionConfig config, Solution solution) { var specificDependencies = new List<Dependency>(); solution.Projects.Each(project => specificDependencies.AddRange(project.Dependencies.Where(x => !x.IsFloat()))); specificDependencies.Each(dependency => { solution.AddDependency(new Dependency(dependency.Name, dependency.Version, UpdateMode.Fixed)); dependency.Float(); }); }
public Solution LoadFrom(IFileSystem fileSystem, string filePath) { Config = fileSystem.LoadFromFile<SolutionConfig>(filePath); var solution = new Solution { Mode = SolutionMode.Classic }; solution.Name = Config.Name; solution.SourceFolder = Config.SourceFolder; solution.FastBuildCommand = Config.FastBuildCommand; solution.BuildCommand = Config.BuildCommand; solution.NugetSpecFolder = Config.NugetSpecFolder; return solution; }
public SolutionConfig BuildConfig() { var config = new SolutionConfig() { Name = Name }; if (SourceFolderFlag.IsNotEmpty()) { config.SourceFolder = SourceFolderFlag; } return config; }
public void SetUp() { theConfig = new SolutionConfig(); theSolution = new Solution(); p1 = theSolution.AddProject("Project1"); p2 = theSolution.AddProject("Project2"); p1.AddDependency(new Dependency("Bottles")); p1.AddDependency(new Dependency("FubuCore", "1.1.2.3", UpdateMode.Fixed)); p2.AddDependency(new Dependency("FubuCore", "1.1.2.3", UpdateMode.Fixed)); p2.AddDependency(new Dependency("FubuLocalization")); p2.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theLoader = new NuGetSolutionLoader(); theLoader.ExtractSolutionLevelConfiguration(theConfig, theSolution); }
/* */ private void copyDirectory(string directory) { var name = Path.GetFileName(directory); var destination = DATA.AppendPath(name); system.CreateDirectory(destination); // Nuget specs copyFile(directory.AppendPath("packaging", "nuget"), destination.AppendPath("packaging", "nuget")); system.FindFiles(directory, new FileSet(){ Include = "packages.config", DeepSearch = true }).Each(x => { var path = x.PathRelativeTo(directory); copyFile(x, destination.AppendPath(path)); }); var config = new SolutionConfig(){ Name = name }; system.WriteObjectToFile(destination.AppendPath(SolutionConfig.FileName), config); }
public void SetUp() { theConfig = new SolutionConfig(); theConfig.FloatNuget("Bottles"); theConfig.FloatNuget("FubuCore"); theConfig.FloatNuget("FubuLocalization"); theSolution = new Solution(); p1 = theSolution.AddProject("Project1"); p2 = theSolution.AddProject("Project2"); p1.AddDependency(new Dependency("Bottles", "1.1.2.3", UpdateMode.Fixed)); p1.AddDependency(new Dependency("FubuCore", "1.1.2.3", UpdateMode.Fixed)); p2.AddDependency(new Dependency("FubuLocalization", "1.0.0.1", UpdateMode.Fixed)); p2.AddDependency(new Dependency("StructureMap", "2.6.3", UpdateMode.Fixed)); theLoader = new NuGetSolutionLoader(); theLoader.MarkFloatingDependencies(theConfig, theSolution); }
public void mode_for_nuget_that_does_not_match_floats() { var config = new SolutionConfig(); config.ModeForNuget("anything").ShouldEqual(UpdateMode.Fixed); }
public Solution(SolutionConfig config, string directory) { _config = config; _directory = directory.ToFullPath(); }
private static void readNugetSpecs(string directory, SolutionConfig config, FileSystem system, Solution solution) { system.FindFiles(directory.AppendPath(config.NugetSpecFolder), new FileSet(){ Include = "*.nuspec" }) .Each(file => { var spec = NugetSpec.ReadFrom(file); solution.AddNugetSpec(spec); }); }
public void SetUp() { theFeed = new Feed(); theConfig = new SolutionConfig { Feeds = new[] {theFeed} }; const string rippleConfig = "ripple.config"; var fileSystem = MockRepository.GenerateStub<IFileSystem>(); fileSystem.Stub(x => x.LoadFromFile<SolutionConfig>(rippleConfig)).Return(theConfig); theLoader = new ClassicRippleSolutionLoader(); theSolution = theLoader.LoadFrom(fileSystem, rippleConfig); }