Commit Graph

119 Commits

Author SHA1 Message Date
Radu Butoi
ab1c3d1c54
feat(directory): Add directory substitutions (#1183)
Adds an option to provide a table of strings to substitute in the
directory string. Fixes #1065.

Co-authored-by: Radu Butoi <butoi@google.com>
2020-05-31 19:32:35 +02:00
Matan Kushner
a670e01c22
ci: upgrade Python for integration tests (#1243) 2020-05-21 13:13:51 -04:00
John Letey
a3e12a1112
ci: Update Python to 3.8.2 (#1181) 2020-05-08 14:25:46 +02:00
Hendrik Rombach
108193103d
fix(git): show branch name in fresh repo (unborn master) (#1093)
* fix: branch_name in fresh repo (unborn master)

* test: add test for unborn branch_name fix
2020-05-06 11:19:53 +02:00
Jean Gautier
02edad0c66
fix(directory): avoid confusing modules with PowerShell paths (#1114)
* Avoid confusing modules with PowerShell paths

* Avoid confusing modules with PowerShell paths

Powershell supports PSDrives (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-psdrive?view=powershell-7) that allow to create "logical" drives mapped to actual Windows drives.

* Preserve Windows directories

* Preserve logical paths for Powershell

* Fix formating with cargo fmt

* Fix directory_in_root test

Co-authored-by: Jean Gautier <jean.gautier@ssi.gouv.fr>
2020-04-30 10:40:56 +02:00
Thomas O'Donnell
060689fa88
fix: Fix latest clippy suggestions (#1136)
Have removed some imports that Clippy says are not needed anymore.
2020-04-24 12:37:13 +02:00
Thomas O'Donnell
d91b6b7137
test: Add null tests to modules that don't have them (#1104)
Have added some null tests to modules that don't already have them.
2020-04-15 09:55:32 +02:00
Thomas O'Donnell
5272d5c1ce
ci(python): Fix broken tests (#1103)
Fix the python tests that depend of having the correct version of Python
installed on the build system.
2020-04-14 14:48:10 +02:00
Alex Jurkiewicz
965338df95
feat(python): Add scan_for_pyfiles option (#692)
Also adds two new entries to the list of hardcoded files to check:
setup.py and __init__.py.
2020-04-14 10:26:51 +02:00
Stanisław Barzowski
7c45f74d11
fix: Do not depend on user's config in conda tests (#1098)
The user's config is automatically loaded
in context.new_module. This change explicitly
sets the empty config to avoid depending on
the environment.

Without this fix, the tests do not pass
for users who have a custom symbol defined
for conda. This prevents installing/upgrading
from Arch Linux AUR.
2020-04-13 21:23:49 +02:00
Bernardo Meurer
7718450311
feat(nix_shell): add symbol to nix-shell module (#1058)
* feat: add nix-shell icon

Fixes #1048

* style: make nix-shell bold blue by default

It better matches the whole theme around Nix and snowflakes.
2020-04-07 18:35:18 +02:00
Kevin Pullin
9924af55db
feat(aws): Use AWS_VAULT as the profile if set (#984)
* Use AWS_VAULT as the profile if set

[aws-vault](https://github.com/99designs/aws-vault) sets
the `AWS_VAULT` env var instead of `AWS_PROFILE` when an
aws-vault session is active.

This PR adds support for reading the AWS profile value from
the `AWS_VAULT` env var, giving priority to `AWS_VAULT` if both
it and `AWS_PROFILE` are set.

* Update docs for AWS_VAULT
2020-04-06 16:59:56 +02:00
David Knaack
56d475578e
fix: possible fix for Intermittent Test Failures in GH Actions (#987)
* fix: possible fix for Intermittent Test Failures in GH Actions

* undo some of the chnages to directory.rs

* typo

* add docs
2020-03-15 12:12:25 -05:00
Tadej Novak
7e66791cb2
feat: add singularity module (#932) 2020-02-26 11:18:19 -05:00
Thomas O'Donnell
d44c037ba5
test: refactor ruby and php modules to use mocked commands (#936) 2020-02-21 11:52:39 -05:00
nesmyslny
0312c7b91e
feat(git_commit): Show the hash of commits when detached HEAD (#738) 2020-02-12 14:56:29 -05:00
Thomas O'Donnell
67397d9096
test(golang): refactor golang tests to use mocked command (#925)
Refactor the golang module tests to use a mocked command and no
longer depend on having a particular version of Go installed.
2020-02-12 13:22:21 -05:00
Andrew Prokhorenkov
cead23edca
test: port Haskell module tests to integration test (#913) 2020-02-06 12:12:07 -05:00
Matan Kushner
11b737bb44
feat!: Update colors of package and php modules (#782) 2020-02-01 18:10:12 -05:00
Matan Kushner
3365beae09 test(nodejs): Port nodejs module tests from E2E to integraton (#867)
Replaces the existing nodejs module end-to-end tests with integration tests that don't require preinstalled environmental dependencies.

- Moved the tests to the same file as the module they test
- Created a render_module utility function for rendering modules within tests
- Removed Node.js installation during CI setup
- Add Shell to Context to allow for tests to not run shell-specific code
2020-01-26 16:37:18 -06:00
Andrew Prokhorenkov
6f2c9fb397 feat: add Haskell Stack support (#546)
Add a Haskell Stack module when a stack.yaml file is detected
2020-01-25 00:48:39 -06:00
Thomas O'Donnell
197376633a fix: Fix incorrect prefix usage in cmd_duration module (#832)
Fixed the way the cmd_duration module is setting it's prefix to be the
same as the other modules.
2020-01-18 01:15:08 -06:00
Matan Kushner
8f645ffb8a
ci: Update CI dependencies (#850)
* ci: Replace setup-ruby with use-ruby-action

* ci: Update python version

* ci: Update Ruby version

* Set ruby action to master

* Try installing mercurial earlier in the workflow

* Remove mercurial installation

* Remove mercurial installation on all OSes

* Revert "Remove mercurial installation on all OSes"

This reverts commit 0e1a3e7e92.

* Update hg installation comment

* Revert Ruby update

* Add caching

* Add caching to audit

* Update workflow.yml

* Only cache during test steps
2020-01-17 20:43:29 -05:00
Thomas O'Donnell
0879381bcd test: Ignore AWS tests that depend on the File System (#817)
Update AWS module tests to ignore the two tests that can fail if the
`~/.aws/config` file exists.
2020-01-08 18:22:42 -06:00
Matan Kushner
09fe0afc14
ci: Remove Docker test environment from CI (#806) 2020-01-06 00:35:46 -05:00
David Hewson
178f177dac perf(hg_branch): Replace direct calls to hg (#803)
perf: don't use hg process to get branch / bookmark information, each call was taking 250ms and it was making on average 2 calls.
the branch and bookmark information is available in files in the root of the repo, use that instead.
now takes 300 micro seconds

fix: do not use .hgignore to decide if it is an hg repo. was providing false positives. #721

fix: after changing branch the new branch was not show (the old branch was shown), the new branch is now correctly shown. #722

fix: if no branch override was set it would say (no branch) however if you commited in that state you would commit to the branch default so say that instead
2020-01-03 17:51:45 -05:00
marblenix
b82ff321fa feat(git_status): Add a stash count segment (#598) 2019-12-28 22:20:36 -05:00
Mike Sampson
256a2be949 feat: Implement AWS region aliases (#646) 2019-12-20 12:30:47 -05:00
Luca Rinaldi
6a2b0a67b0 feat: cmd_duration module optionally reports milliseconds (#696) 2019-12-19 17:38:06 -05:00
AppleTheGolden
3c835ba34b fix: Truncate long paths in conda environment names (#694)
Environment names created via conda create -p [path] tend to be too long for comfort, so this truncates them.
2019-12-09 12:59:02 -05:00
wdullaer
44b37a7bac feat: Implement terraform module with workspace and version (#644) 2019-12-08 20:42:51 -05:00
Dan Wendorf
dee25c7b35 feat: Add prefix config to directory module (#642) 2019-12-06 14:19:11 -05:00
Qingping Hou
c5a206e3cf feat: Add git_commit module (#673) 2019-12-06 11:57:42 -05:00
Stephen Ball
46904e5045 feat: Add PHP version module (#244) 2019-12-05 13:04:27 -05:00
Luca Greco
337f213753 feat: Add the hg_branch module (#569) 2019-12-02 17:37:18 -05:00
Matan Kushner
4895276b1b
ci: Update Python to 3.7.5 (#628) 2019-11-05 16:23:33 +09:00
Thomas O'Donnell
42f6868e3f feat: Enable the python module in virtual envs (#584)
This will enable the python module when a virtual environment has been
activated, this is detected via the `VIRTUAL_ENV` env var.
2019-11-02 20:10:21 +09:00
Cédric Da Fonseca
fa1267f12f feat: Add configuration to set how much AWS profile info is shown (#556) 2019-11-02 20:08:54 +09:00
Brian Low
2710d02709 feat: Show git_status counts (#434)
The git_status module can show the count of files next to their respective symbols.
2019-10-26 15:20:20 +09:00
Zhenhui Xie
aa260899d4 fix: Use logical path instead of physical path when available (#398)
* Get pathbuf from logical path. (fixes #204)

(also fixes #397)

* fix: Update directory module so that use_logical_path will work properly

* Remove test directory::use_logical_and_physical_paths

* Fix merge errors


Co-authored-by: Matan Kushner <hello@matchai.me>
2019-10-24 19:37:44 +09:00
Nguyễn Hồng Quân
27fad02837 fix: Separate Python version string and env name (#548) 2019-10-17 18:55:48 +09:00
David Knaack
6ab70796db feat: Implement PowerShell support (#470) 2019-10-16 00:10:16 +09:00
Matan Kushner
b5bb6d6994
refactor: Replace tempdir test utility with tempfile::tempdir (#538) 2019-10-15 23:01:44 +09:00
Zach Mertes
5303fd7684 feat: Add configuration for hostname truncation (#485) 2019-10-15 01:22:25 +09:00
Thomas Lee
b3275d8ddf feat: Show AWS region in aws module (#482) 2019-10-15 00:05:03 +09:00
Thomas O'Donnell
a18408e30c fix: Fix the spacing around the AWS default symbol (#529)
This updates the default AWS default symbol to include a space after the
symbol to make it a little bit more readable. Have also updated the
README to include the AWS module.
2019-10-14 22:56:16 +09:00
AppleTheGolden
7657af0680 feat: Add conda module (#469) 2019-10-05 13:25:25 -05:00
Matan Kushner
f2e20bbea2
revert: chore: Remove logic for the disabled option from modul… (#489)
This reverts commit 6c6e0ef1dd.
2019-10-05 19:03:48 +09:00
Zhenhui Xie
6c6e0ef1dd chore: Remove logic for the disabled option from modules (#486) 2019-10-05 18:07:33 +09:00
Nick Young
6621e4c859 feat: Add dotnet module (#416)
Adds a .NET module, which preferentially parses local/git files to get
the .NET version.
2019-10-02 01:56:48 -05:00