Skip to content

Commit

Permalink
Merge pull request #32 from jeffm2001/patch-2
Browse files Browse the repository at this point in the history
Add SequelAce app
  • Loading branch information
uberhacker authored Jan 20, 2022
2 parents 614f683 + 87133f5 commit 5bcf658
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/Apps/SequelAceApp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Pantheon\TerminusPancakes\Apps;

/**
* Open Site database in SequelAce
*/
class SequelAceApp extends PancakesApp {

/**
* {@inheritdoc}
*/
public $aliases = ['sequelace'];

/**
* {@inheritdoc}
*/
public $app = 'SequelAce';

/**
* App Location
*/
public $app_location;

public function open(){
$this->execCommand('open', [
$this->connection_info['mysql_url'],
'-a ' . $this->escapeShellArg($this->app_location),
]);
}

/**
* Validates the app can be used
*/
public function validate() {
if ($this->isWindows()) {
return FALSE;
}

$this->app_location = '/Applications/Sequel Ace.app/Contents/MacOS/Sequel Ace';
return $this->which($this->escapeShellArg($this->app_location));
}

public function weight() {
return 1;
}

}

0 comments on commit 5bcf658

Please sign in to comment.