Ejemplo n.º 1
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                {
                    var ravenDbSetup = new RavenDBSetup();
                    if (ravenDbSetup.Install(WindowsIdentity.GetCurrent(), allowInstall: true))
                    {
                        session.Log("RavenDB installed and configured.");
                    }
                    else
                    {
                        session.Log("RavenDB could not be installed.");
                    }
                }, session);

                return(ActionResult.Success);
            }
            catch (Exception)
            {
                return(ActionResult.Failure);
            }
        }
Ejemplo n.º 2
0
 protected override void ProcessRecord()
 {
     if (ShouldProcess(Environment.MachineName))
     {
         RavenDBSetup.Install(Port, Path);
     }
 }
Ejemplo n.º 3
0
        public void EnsureGetRavenResourcesIsNotEmpty()
        {
            var combine = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

            try
            {
                Directory.CreateDirectory(combine);
                RavenDBSetup.ExportRavenResources(combine);
                Assert.IsNotEmpty(Directory.GetFiles(combine));
            }
            finally
            {
                Directory.Delete(combine, true);
            }
        }
Ejemplo n.º 4
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                {
                    RavenDBSetup.Install();
                    session.Log("RavenDB installed and configured.");
                }, session);

                return(ActionResult.Success);
            }
            catch (Exception)
            {
                return(ActionResult.Failure);
            }
        }
Ejemplo n.º 5
0
 public void Install()
 {
     RavenDBSetup.Install();
 }
Ejemplo n.º 6
0
        public static ActionResult InstallRavenDb(Session session)
        {
            session.Log("Installing RavenDB if necessary.");

            try
            {
                CaptureOut(() =>
                    {
                        var ravenDbSetup = new RavenDBSetup();
                        if (ravenDbSetup.Install(WindowsIdentity.GetCurrent(), allowInstall: true))
                        {
                            session.Log("RavenDB installed and configured.");
                        }
                        else
                        {
                            session.Log("RavenDB could not be installed.");
                        }
                    }, session);

                return ActionResult.Success;
            }
            catch (Exception)
            {
                return ActionResult.Failure;
            }
        }
Ejemplo n.º 7
0
        protected override void ProcessRecord()
        {
            var isGood = RavenDBSetup.Check(Port);

            WriteObject(isGood);
        }