small grammar change, update,

fixes for linter errors about 'which'
For example:
    in utils/deb/deb-ci.sh line 27: 'which git-secret':
    SC2230: which is non-standard. Use builtin 'command -v' instead.
remove inoperative links
reflect code review input
add test for 'git secret cat'
restore sponsor links
pull/142/head
Josh Rabinowitz 7 years ago
parent 70e0fcda13
commit c760513e35

@ -85,7 +85,6 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
<a href="https://opencollective.com/git-secret/sponsor/9/website" target="_blank"><img src="https://opencollective.com/git-secret/sponsor/9/avatar.svg"></a>
## License
MIT. See [LICENSE.md](LICENSE.md) for details.

@ -55,7 +55,7 @@ You can configure several things to suit your workflow better\. To do so, just s
These settings are available to be changed:
.
.IP "\(bu" 4
\fB$SECRETS_GPG_COMMAND\fR \- sets the \fBgpg\fR alternatives, defaults to \fBgpg\fR\. It can be changed to \fBgpg\fR, \fBgpg2\fR, \fBpgp\fR, \fB/usr/local/gpg\fR or any other value\. After doing so rerun the tests to be sure, that it won\'t break anything\. Tested to be working with: \fBgpg\fR, \fBgpg2\fR\.
\fB$SECRETS_GPG_COMMAND\fR \- sets the \fBgpg\fR alternatives, defaults to \fBgpg\fR\. It can be changed to \fBgpg\fR, \fBgpg2\fR, \fBpgp\fR, \fB/usr/local/gpg\fR or any other value\. After doing so rerun the tests to be sure that it won\'t break anything\. Tested to be working with: \fBgpg\fR, \fBgpg2\fR\.
.
.IP "\(bu" 4
\fB$SECRETS_EXTENSION\fR \- sets the secret files extension, defaults to \fB\.secret\fR\. It can be changed to any valid file extension\.

@ -24,7 +24,7 @@ You can configure several things to suit your workflow better. To do so, just se
These settings are available to be changed:
* `$SECRETS_GPG_COMMAND` - sets the `gpg` alternatives, defaults to `gpg`. It can be changed to `gpg`, `gpg2`, `pgp`, `/usr/local/gpg` or any other value. After doing so rerun the tests to be sure, that it won't break anything. Tested to be working with: `gpg`, `gpg2`.
* `$SECRETS_GPG_COMMAND` - sets the `gpg` alternatives, defaults to `gpg`. It can be changed to `gpg`, `gpg2`, `pgp`, `/usr/local/gpg` or any other value. After doing so rerun the tests to be sure that it won't break anything. Tested to be working with: `gpg`, `gpg2`.
* `$SECRETS_EXTENSION` - sets the secret files extension, defaults to `.secret`. It can be changed to any valid file extension.
## Internals

@ -7,7 +7,7 @@ function cat {
OPTIND=1
while getopts 'hfd:p:' opt; do
while getopts 'hd:p:' opt; do
case "$opt" in
h) _show_manual_for 'cat';;
@ -26,14 +26,11 @@ function cat {
# Command logic:
#local path_mappings
#path_mappings=$(_get_secrets_dir_paths_mapping)
for line in "$@"
do
local filename
local path
#echo $line
filename=$(_get_record_filename "$line")
path=$(_append_root_path "$filename")

@ -0,0 +1,46 @@
#!/usr/bin/env bats
load _test_base
FILE_TO_HIDE="file_to_hide"
FILE_CONTENTS="hidden content юникод"
FINGERPRINT=""
function setup {
FINGERPRINT=$(install_fixture_full_key "$TEST_DEFAULT_USER")
set_state_initial
set_state_git
set_state_secret_init
set_state_secret_tell "$TEST_DEFAULT_USER"
set_state_secret_add "$FILE_TO_HIDE" "$FILE_CONTENTS"
set_state_secret_hide
}
function teardown {
#rm "$FILE_TO_HIDE"
uninstall_fixture_full_key "$TEST_DEFAULT_USER" "$FINGERPRINT"
unset_current_state
}
@test "run 'cat' with password argument" {
cp "$FILE_TO_HIDE" "${FILE_TO_HIDE}2"
rm -f "$FILE_TO_HIDE"
local password=$(test_user_password "$TEST_DEFAULT_USER")
run git secret cat -d "$TEST_GPG_HOMEDIR" -p "$password" "$FILE_TO_HIDE"
[ "$status" -eq 0 ]
# $output is the output from 'git secret cat' above
[ "$FILE_CONTENTS" == "$output" ]
rm "${FILE_TO_HIDE}2"
}

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
apk info | grep "git-secret"
which "git-secret"
# lint says to use 'command -v' and not 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
dpkg --get-selections | grep "git-secret"
which "git-secret"
# lint says to use 'command -v' and not 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -18,7 +18,9 @@ function integration_tests {
make install
# Testing the installation:
which "git-secret"
# 'command -v' is like 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

@ -24,7 +24,8 @@ function integration_tests {
# Testing the installation:
dnf info "git-secret"
which "git-secret"
# 'command -v' is like 'which'
command -v "git-secret"
# Test the manuals:
man --where "git-secret" # .7

Loading…
Cancel
Save