Skip to content

Commit

Permalink
Lots of improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Oct 14, 2017
1 parent 2c8271e commit d0f29cf
Show file tree
Hide file tree
Showing 16 changed files with 9,682 additions and 1,062 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
- Option to configure the poll interval (defaults to 1500ms)
- Show spinner on running project
- Show badge (passed/failed) for each project
- Button to run all tests on all projects
- Button to run all tests on all (filtered) projects
- Added AVA tester
- Test state to log modal
- Option to run test from the log modal
- Option to reset state of all projects
### Changed
- Allow better configuration of editor's binary
- Moved Laravel related classes out from Vendor\Laravel
- Completely restructure package directory
- License is now MIT
- Improved regex matcher of editable source files (and lines)
### Fixed
- Abending when tester used in suite does not exists
- Piper script not being
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
"vuex": "^2.4.0",
"webpack-livereload-plugin": "^0.11.0"
},
"dependencies": {}
"dependencies": {
"csspin": "^1.1.4"
}
}
26 changes: 20 additions & 6 deletions src/package/Data/Repositories/Support/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,17 @@ public function getAnsiConverter()
}

/**
* Get the default editor binary.
* Get the default editor.
*
* @return array
*/
protected function getDefaultEditorBinary()
protected function getDefaultEditor()
{
if (is_null($default = collect(config('ci.editors'))->where('default', true)->first())) {
die('FATAL ERROR: default editor not configured');
}

return $default['bin'];
return $default;
}

/**
Expand All @@ -148,11 +150,23 @@ protected function getDefaultEditorBinary()
*/
protected function getEditorBinary($suite)
{
if (empty($suite) || is_null($bin = config("ci.editors.{$suite->editor}.bin"))) {
return $this->getDefaultEditorBinary();
return $this->getEditor($suite)['bin'];
}

/**
* Get the editor.
*
* @param $suite
*
* @return array
*/
protected function getEditor($suite)
{
if (empty($suite) || is_null($editor = config("ci.editors.{$suite->editor}"))) {
return $this->getDefaultEditor();
}

return $bin;
return $editor;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/package/Data/Repositories/Support/Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ protected function getTestInfo($test)
'updated_at' => $test->updated_at->diffForHumans(),
'state' => $test->state,
'enabled' => $test->enabled,
'editor_name' => $this->getEditor($test->suite)['name'],

'run' => $run,
'notified_at' => is_null($run) ? null : $run->notified_at,
Expand Down
13 changes: 13 additions & 0 deletions src/package/Http/Controllers/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,17 @@ public function run(Request $request)

return $this->success();
}

/**
* Reset projects tests states.
*
* @param Request $request
* @return mixed
*/
public function reset(Request $request)
{
$this->dataRepository->reset($request->get('projects'));

return $this->success();
}
}
Loading

0 comments on commit d0f29cf

Please sign in to comment.