CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 72
Migration Guide to Version 0.28.0
Although the document had previously stated that it was required, no check had actually been done. This file is now required to detect the project root directory.
Up until now, it was possible to run specfile from anywhere. However, it was not working properly because the working directory was the current directory.
Since version 0.28.0, the working directory and path have been normalized so that it will work properly when run from a subdirectory as well as the project root directory. Instead, it must now be run from under the project directory.
If you are in outside the project directory, you need to change the directory beforehand,
or change the directory using the -c
(--chdir
) or -C
(--directory
) options.
The directory for specfile execution will be the project root directory by default.
Specfiles that do not match --pattern
are no longer executed, even if they are specified as arguments.
Changed to .shellspec-options
to avoid recognizing the home directory as the project root directory.
The option parser has been updated to allow POSIX and GNU compliant syntax.
shellspec --init
no longer generates a example specfile by default.
It is now deprecated to specify shellspec
as shebang for portability.
(However, you can continue to use it at your own risk.)
[deprecated]
#!/usr/bin/env shellspec
Instead, Write the following line at the top of the file.
eval "$(shellspec - -c) exit 1"
You can use /bin/sh
, /usr/bin/env bash
, etc. for shebang. The specfile will be run
in the shell written in shebang. This is the behavior from before.
Since the -c
option is specified, there is no need to change the directory beforehand.
Also, the --pattern
option will be changed to *
, so any file name can be executed.
You can now pass other options as well.
It has been improved so that it will exit with an error when run in an environment
where shellspec
is not installed.
It has been greatly enhanced and it is now possible to specify the version of ShellSpec that can run specfiles.
shellspec_spec_helper_configure
has been changed to spec_helper_configure
.
The old function names can still be used for a while to maintain compatibility.
The spec_helper
will be loaded at least twice to achieve precheck.
The functions that can be used in spec_helper have been clarified.
Functions starting with shellspec_
are also available, but these are change without notice.
The SHELLSPEC_SPECDIR
will be deprecated because there is no longer a single directory for specfiles.
Instead, SHELLSPEC_HELPERDIR
has been introduced. However, this is not the location of the specfiles,
but the location of spec_helper
, etc.