Skip to content

Releases: AlexB52/retest

Remove the --auto option and update help text

02 Jul 02:29
Compare
Choose a tag to compare

The --auto option is run by default, there is no need to make it explicit.

  • We remove the --auto option
  • We also update the help text when running retest -h
# Old behaviour
    $ retest --auto
    $ retest --auto --all 

# New behaviour
    $ retest 
    $ retest --all

This release fixes:

Change starting sound and copy changes

26 Jun 07:09
Compare
Choose a tag to compare

We play another sound when restest starts.
Using the same sound of a test passing and retest starting is confusing.
The sounds should be distinct otherwise it feels like Retest ran the suite.

A minor change updating a copy to make things a bit clearer.

This release includes:
#108
#112

Fixing:
#82

Enable Sound Feedback

04 Apr 07:36
Compare
Choose a tag to compare

For macOS only (for now)

You can now get sound feedback when your tests pass or fail.
Add the --notify flag on your retest command to enable sound. You should hear a sound as your start Retest and on all the runs.

Why? This removes the need to see the terminal window while refactoring code. 🎉

Here are some valid uses of the notify flag:

$ retest --notify
$ retest --all --notify
$ retest --notify 'ruby <changed>'

This release includes:

Add <changed> placeholder

17 Oct 03:38
Compare
Choose a tag to compare

This releases allows the developer to use the placeholder in the retest command. Something like this: retest 'bin/rails <test> && rubocop <changed>

This command will both find the matching test, the changed file and replace the placeholders accordingly.

Retest can be used with <test> and/or <changed>

retest 'rubocop <changed>'
retest 'bin/rails test <test>'
retest 'bin/rails test <test> && rubocop <changed>'
retest 'bin/rails test <test> && rubocop <test> <changed>'

Rules

If we have a post.rb and post_test.rb files. Here are the different scenarios and rules:

A change on post.rb results in:

  • <changed> => post.rb
  • <test> => post_test.rb

A change on post_test.rb results in:

  • <changed> => post_test.rb
  • <test> => post_test.rb

Add --ext argument

07 Oct 19:57
Compare
Choose a tag to compare

This release includes the ability to listen to other extensions than the /\.rb$/ regex.

For now, this extension is really just useful for hardcoded commands. An example of usage can be:

$ retest 'go test' --ext=\\.go$

This is a first step towards opening retest to other programming languages.

Note: Using placeholders e.g. <test> will probably not work as finding test files is still coupled to ruby extensions. We'll look into changing this in future releases.

Run diffs in one go

17 Aug 04:57
Compare
Choose a tag to compare

The flag --diff now runs all the spec files in one run instead of looping through each of them.

Example:

retest --diff main

Setup identified: [RSPEC]. Using command: 'bin/rspec <test>'
Tests found:
  - spec/path/to/file1_spec.rb
  - spec/path/to/file2_spec.rb
  - spec/path/to/file3_spec.rb
Running tests...
Test File Selected: spec/path/to/file1_spec.rb spec/path/to/file2_spec.rb spec/path/to/file3_spec.rb
Running via Spring preloader in process 10493
................................................................................................................................................................................................................

Finished in 16.97 seconds (files took 0.69523 seconds to load)
208 examples, 0 failures

Add support for a ruby project without Gemfile

18 May 04:02
Compare
Choose a tag to compare

Retest auto flag will now find the correct command to run automatically with a ruby folder without a Gemfile.
Something as simple as:

ruby-bare
├── program.rb
└── program_test.rb

0 directories, 2 files

Bin commands

27 Apr 21:51
Compare
Choose a tag to compare

This release includes a performance boost using /bin/ files rather than bundle exec commands when possible.

When your ruby repository has a bin file such as bin/rake, bin/rspec, bin/rails this file will be used instead of its corresponding bundle exec command.

Diff Feature

19 Apr 20:45
Compare
Choose a tag to compare

This release includes a new feature: Diff feature used with the --diff option.
It helps you run a sanity check only on specs related your current changes against a branch. So that you don't run the whole suite locally but still gets a check before triggering a full CI suite once pushed.

retest --diff origin/main

The release also has minor improvements on file search depending on the command you run

Auto Flag

16 Mar 23:00
Compare
Choose a tag to compare

You can now run retest without passing a command in quotes and retest will find out the appropriate command to run.
Works with --all flag too. Examples:

retest
retest --all
retest --auto
retest --auto --all

Those are equivalent

retest
retest --auto