sym 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +82 -20
- data/README.md +42 -9
- data/bin/sym.completion +65 -18
- data/lib/sym.rb +7 -7
- data/lib/sym/app/cli.rb +4 -1
- data/lib/sym/app/cli_slop.rb +13 -3
- data/lib/sym/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dba3a8013e135db50a8294dd619302d1c10b8109
|
4
|
+
data.tar.gz: 28cc2c0edbff0ecec89e265109c11e3c9c67da01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f78ca029db09962c423fb57e38c86e03b8417977714c6e087a80b31f0b9f6392ec7c6f2f8ebd1c41d9b7d75c82e0755f4ac37fd68393090c2a2eb17a81909d25
|
7
|
+
data.tar.gz: 1d6c15f15761ceb1187e45455408a27b371a15a798d139a840614427fd52ac0a4574c5475d83a7d483e2b3f4d6e4c321cdc5beddbd89d6e943066f9972d9c984
|
data/CHANGELOG.md
CHANGED
@@ -1,28 +1,90 @@
|
|
1
|
-
|
1
|
+
# Change Log
|
2
2
|
|
3
|
-
|
4
|
-
- adding a password to an existing key
|
5
|
-
- adding an existing key to the keychain.
|
6
|
-
|
7
|
-
To add a password to an existing key:
|
3
|
+
## [HEAD](https://github.com/kigster/sym/tree/HEAD)
|
8
4
|
|
9
|
-
|
5
|
+
[Changes since the last tag](https://github.com/kigster/sym/compare/v2.2.1...HEAD)
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
> `sym [ -k key | -K keyfile | -i ] -x <name> `
|
7
|
+
## [v2.2.1](https://github.com/kigster/sym/tree/v2.2.1) (2017-02-15)
|
8
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.2.0...v2.2.1)
|
14
9
|
|
15
|
-
|
10
|
+
* [`53bb95f`](https://github.com/kigster/sym/commit/53bb95f) Ability to read flags from SYM_ARGS environment
|
11
|
+
* [`c3d0b86`] (https://github.com/kigster/sym/commit/c3d0b86) Switched to using bash-completion-style syntax
|
12
|
+
* [`9368bf5`] (https://github.com/kigster/sym/commit/9368bf5) Adding CHANGELOG.md
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
* Removed `keychain-del` feature
|
20
|
-
* Refactored bash-completion to install a separate ~/.sym.completion file
|
21
|
-
* Updated README
|
14
|
+
## [v2.2.0](https://github.com/kigster/sym/tree/v2.2.0) (2017-02-14)
|
15
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.1.2...v2.2.0)
|
22
16
|
|
23
|
-
**
|
17
|
+
**API CHANGE**:
|
24
18
|
|
25
|
-
*
|
26
|
-
*
|
27
|
-
|
19
|
+
* Turn off password caching by default, enable with `-C`
|
20
|
+
* `-P < memcached | drb >` specifies caching mechanism
|
21
|
+
|
22
|
+
**Changes:**
|
23
|
+
|
24
|
+
* [`b470245`](https://github.com/kigster/sym/commit/b470245/) Turn off password caching by default, enable with `-C`, timeout with `-T`
|
25
|
+
* [`ca3a903`](https://github.com/kigster/sym/commit/ca3a903/) Adding -C flag
|
26
|
+
* [`949b2ae`](https://github.com/kigster/sym/commit/949b2ae/) Updating README
|
27
|
+
* [`513f849`](https://github.com/kigster/sym/commit/513f849/) Adding MemCached provider; ability to specify provider with `-P`
|
28
|
+
* [`571e668`](https://github.com/kigster/sym/commit/571e668/) Split up Coin off to a cache provider
|
29
|
+
* [`7afeccc`](https://github.com/kigster/sym/commit/7afeccc/) Better messaging when password server times out
|
30
|
+
* [`cf226f9`](https://github.com/kigster/sym/commit/cf226f9/) Implement fast timeout for password caching providers, fixes [\#3](https://github.com/kigster/sym/issues/3)
|
31
|
+
|
32
|
+
**Closed Issues:**
|
33
|
+
|
34
|
+
- make sure drb is not already running/handle exception [\#3](https://github.com/kigster/sym/issues/3)
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
## [v2.1.2](https://github.com/kigster/sym/tree/v2.1.2) (2017-02-11)
|
39
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.1.1...v2.1.2)
|
40
|
+
|
41
|
+
* [`dce9b05`](https://github.com/kigster/sym/commit/dce9b05/) Updating gems summary/desription; bump version 2.1.2
|
42
|
+
* [`ba60592`](https://github.com/kigster/sym/commit/ba60592/) Adding TOC
|
43
|
+
* [`7b04ea9`](https://github.com/kigster/sym/commit/7b04ea9/) Updating README for the gem;
|
44
|
+
* [`52efdb4`](https://github.com/kigster/sym/commit/52efdb4/) Updating the 3.0 usage
|
45
|
+
|
46
|
+
## [v2.1.1](https://github.com/kigster/sym/tree/v2.1.1) (2017-02-05)
|
47
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.1.0...v2.1.1)
|
48
|
+
|
49
|
+
* [`d503c1c`](https://github.com/kigster/sym/commit/d503c1c/) Fix bug with -E flag exploding; version 2.1.1
|
50
|
+
|
51
|
+
## [v2.1.0](https://github.com/kigster/sym/tree/v2.1.0) (2017-01-23)
|
52
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.0.3...v2.1.0)
|
53
|
+
|
54
|
+
* [`a7f3239`](https://github.com/kigster/sym/commit/a7f3239/) Proposed CLI for version 3.0
|
55
|
+
* [`3a706ce`](https://github.com/kigster/sym/commit/3a706ce/) Rename Command to BaseCommand; use require
|
56
|
+
* [`77936ee`](https://github.com/kigster/sym/commit/77936ee/) Existing keys can be password-prot, and keychained
|
57
|
+
|
58
|
+
## [v2.0.3](https://github.com/kigster/sym/tree/v2.0.3) (2017-01-22)
|
59
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.0.2...v2.0.3)
|
60
|
+
|
61
|
+
* [`342ecb7`](https://github.com/kigster/sym/commit/342ecb7/) Disable some checks.
|
62
|
+
* [`984ec27`](https://github.com/kigster/sym/commit/984ec27/) Adding CHANGELOG.
|
63
|
+
* [`4fc7983`](https://github.com/kigster/sym/commit/4fc7983/) Removing clipboard copy feature: its easy enough.
|
64
|
+
* [`4f38aa5`](https://github.com/kigster/sym/commit/4f38aa5/) Removing unnecessary file.
|
65
|
+
* [`4ff0412`](https://github.com/kigster/sym/commit/4ff0412/) Updating README with latest help
|
66
|
+
* [`787116c`](https://github.com/kigster/sym/commit/787116c/) rm NLP module, rm keychain del, add bash-comp.
|
67
|
+
* [`bf70e30`](https://github.com/kigster/sym/commit/bf70e30/) Update repo token
|
68
|
+
|
69
|
+
## [v2.0.2](https://github.com/kigster/sym/tree/v2.0.2) (2017-01-21)
|
70
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.0.1...v2.0.2)
|
71
|
+
|
72
|
+
* [`c586299`](https://github.com/kigster/sym/commit/c586299/) Better gem description; Bump version
|
73
|
+
|
74
|
+
## [v2.0.1](https://github.com/kigster/sym/tree/v2.0.1) (2017-01-20)
|
75
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v2.0.0...v2.0.1)
|
76
|
+
|
77
|
+
* [`96add73`](https://github.com/kigster/sym/commit/96add73/) Travis teset coverage, etc
|
78
|
+
* [`8f0209e`](https://github.com/kigster/sym/commit/8f0209e/) Updating README badges
|
79
|
+
* [`0c6a612`](https://github.com/kigster/sym/commit/0c6a612/) Only use github for coin on OSX
|
80
|
+
* [`3afe846`](https://github.com/kigster/sym/commit/3afe846/) Fixed a bug with >> redirects adding newline
|
81
|
+
* [`9409cdb`](https://github.com/kigster/sym/commit/9409cdb/) Fixing bash completion for sym.
|
82
|
+
* [`7cdb062`](https://github.com/kigster/sym/commit/7cdb062/) Add .ruby-version to gitignore
|
83
|
+
* [`488cd73`](https://github.com/kigster/sym/commit/488cd73/) Using a fork of coin from github
|
84
|
+
* [`a13eb55`](https://github.com/kigster/sym/commit/a13eb55/) Adding .DS_Store to .gitignore
|
85
|
+
|
86
|
+
## [v2.0.0](https://github.com/kigster/sym/tree/v2.0.0) (2016-11-11)
|
87
|
+
[Full Changelog](https://github.com/kigster/sym/compare/v1.1.2...v2.0.0)
|
88
|
+
|
89
|
+
Commits between version 1.1.2 and 2.0.0 were not tracked in the changelog.
|
28
90
|
|
data/README.md
CHANGED
@@ -68,13 +68,18 @@ BAhTOh1TeW06OkRhdGE6OldyYXBFefDFFD.....
|
|
68
68
|
|
69
69
|
❯ sym -dx my-new-key -f secret.enc -C
|
70
70
|
My secret data
|
71
|
+
|
72
|
+
# Lets now save common flags in the SYM_ARGS bash variable:
|
73
|
+
❯ export SYM_ARGS="-x my-new-key -C"
|
74
|
+
❯ sym -d -f secret.enc
|
75
|
+
My secret data
|
71
76
|
```
|
72
77
|
|
73
78
|
The line that says `Coin::Vault listening at: druby://127.0.0.1:24924` is the indication that the local dRB server used for caching passwords has been started. Password caching is off by default, but is enabled with `-C` flag. In the example above, the decryption step fetched the password from the cache, and so the user was not required to re-enter the password.
|
74
79
|
|
75
80
|
__Direct Editing Encrypted Files__
|
76
81
|
|
77
|
-
Instead of decrypting data anytime you need to change it, you can use the shortcut flag `-t` (for "
|
82
|
+
Instead of decrypting data anytime you need to change it, you can use the shortcut flag `-t` (for "edi**t**"), which decrypts your data into a temporary file, automatically opening it with an `$EDITOR`.
|
78
83
|
|
79
84
|
Example:
|
80
85
|
|
@@ -209,27 +214,56 @@ In order to control password caching, the following flags are available:
|
|
209
214
|
* `-T seconds` sets the expiration for cached passwords
|
210
215
|
* `-P memcached | drb` controls which of the providers is used. Without this flag, *sym* auto-detects caching provider by first checking for `memcached`, and then starting the `dRB` server.
|
211
216
|
|
212
|
-
####
|
217
|
+
#### Saving Common Flags in an Environment Variable
|
218
|
+
|
219
|
+
You can optionally store frequently used flags for `sym` in the `SYM_ARGS` environment variable. For example, to always cache passwords, and to always use the same encryption key from the keychain named "production", set the following in your `~/.bashrc`:
|
220
|
+
|
221
|
+
```
|
222
|
+
export SYM_ARGS="-x production -C"
|
223
|
+
```
|
224
|
+
|
225
|
+
This will always be appended to the command line, and so to encrypt/decrypt anything with password caching enabled and using that particular key, you would simply type:
|
226
|
+
|
227
|
+
```bash
|
228
|
+
# -x production -C are added from SYM_ARGS
|
229
|
+
sym -ef file -o file.enc
|
230
|
+
|
231
|
+
# And to decrypt:
|
232
|
+
sym -df file.enc -o file.original
|
233
|
+
|
234
|
+
# Or edit the encrypted file:
|
235
|
+
sym -tf file.enc
|
236
|
+
```
|
237
|
+
|
238
|
+
#### Complete CLI Usage
|
213
239
|
|
214
240
|
This may be a good time to take a look at the full help message for the `sym` tool, shown naturally with a `-h` or `--help` option.
|
215
241
|
|
216
242
|
```
|
217
|
-
Sym (2.2.
|
243
|
+
Sym (2.2.1) – encrypt/decrypt data with a private key
|
218
244
|
|
219
245
|
Usage:
|
220
|
-
# Generate a new key
|
246
|
+
# Generate a new key...
|
221
247
|
sym -g [ -p ] [ -x keychain | -o keyfile | -q | ]
|
222
248
|
|
223
|
-
# To specify a key for an operation use
|
249
|
+
# To specify a key for an operation use one of...
|
224
250
|
<key-spec> = -k key | -K file | -x keychain | -i
|
225
251
|
|
226
|
-
# Encrypt/Decrypt to STDOUT or output file
|
252
|
+
# Encrypt/Decrypt to STDOUT or an output file
|
227
253
|
sym -e <key-spec> [-f <file> | -s <string>] [-o <file>]
|
228
254
|
sym -d <key-spec> [-f <file> | -s <string>] [-o <file>]
|
229
255
|
|
230
256
|
# Edit an encrypted file in $EDITOR
|
231
257
|
sym -t <key-spec> -f <file> [ -b ]
|
232
258
|
|
259
|
+
# Specify any common flags in the BASH variable:
|
260
|
+
export SYM_ARGS="-x staging -C"
|
261
|
+
|
262
|
+
# And now encrypt without having to specify key location:
|
263
|
+
sym -e -f <file>
|
264
|
+
# May need to disable SYM_ARGS with -M, eg for help:
|
265
|
+
sym -h -M
|
266
|
+
|
233
267
|
Modes:
|
234
268
|
-e, --encrypt encrypt mode
|
235
269
|
-d, --decrypt decrypt mode
|
@@ -248,8 +282,7 @@ Read existing private key from:
|
|
248
282
|
Password Cache:
|
249
283
|
-C, --cache-password enable the cache (off by default)
|
250
284
|
-T, --cache-for [seconds] to cache the password for
|
251
|
-
-P, --cache-provider [provider] type of cache, one of
|
252
|
-
[ memcached, drb ]
|
285
|
+
-P, --cache-provider [provider] type of cache, one of memcached, drb
|
253
286
|
|
254
287
|
Data to Encrypt/Decrypt:
|
255
288
|
-s, --string [string] specify a string to encrypt/decrypt
|
@@ -264,6 +297,7 @@ Flags:
|
|
264
297
|
-q, --quiet do not print to STDOUT
|
265
298
|
-V, --version print library version
|
266
299
|
-N, --no-color disable color output
|
300
|
+
-M, --no-environment disable reading flags from SYM_ARGS
|
267
301
|
|
268
302
|
Utility:
|
269
303
|
-a, --bash-completion [file] append shell completion to a file
|
@@ -271,7 +305,6 @@ Utility:
|
|
271
305
|
Help & Examples:
|
272
306
|
-E, --examples show several examples
|
273
307
|
-h, --help show help
|
274
|
-
|
275
308
|
```
|
276
309
|
|
277
310
|
### CLI Usage Examples
|
data/bin/sym.completion
CHANGED
@@ -5,28 +5,75 @@
|
|
5
5
|
# © 2015-2016, Konstantin Gredeskoul, https://github.com/kigster/sym
|
6
6
|
# MIT LICENSE
|
7
7
|
#
|
8
|
+
[[ -z "$(type _filedir 2>/dev/null)" ]] && {
|
9
|
+
_filedir ()
|
10
|
+
{
|
11
|
+
local i IFS='
|
12
|
+
' xspec;
|
13
|
+
_tilde "$cur" || return 0;
|
14
|
+
local -a toks;
|
15
|
+
local quoted tmp;
|
16
|
+
_quote_readline_by_ref "$cur" quoted;
|
17
|
+
toks=(${toks[@]-} $(
|
18
|
+
compgen -d -- "$cur" | {
|
19
|
+
while read -r tmp; do
|
20
|
+
# TODO: I have removed a "[ -n $tmp ] &&" before 'printf ..',
|
21
|
+
# and everything works again. If this bug suddenly
|
22
|
+
# appears again (i.e. "cd /b<TAB>" becomes "cd /"),
|
23
|
+
# remember to check for other similar conditionals (here
|
24
|
+
# and _filedir_xspec()). --David
|
25
|
+
printf '%s\n' $tmp
|
26
|
+
done
|
27
|
+
}
|
28
|
+
));
|
29
|
+
if [[ "$1" != -d ]]; then
|
30
|
+
[[ ${BASH_VERSINFO[0]} -ge 4 ]] && xspec=${1:+"!*.@($1|${1^^})"} || xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"};
|
31
|
+
toks=(${toks[@]-} $( compgen -f -X "$xspec" -- $quoted));
|
32
|
+
fi;
|
33
|
+
[ ${#toks[@]} -ne 0 ] && _compopt_o_filenames;
|
34
|
+
COMPREPLY=("${COMPREPLY[@]}" "${toks[@]}")
|
35
|
+
}
|
36
|
+
}
|
8
37
|
|
9
|
-
_sym()
|
10
|
-
|
11
|
-
|
12
|
-
cur="${COMP_WORDS[COMP_CWORD]}"
|
13
|
-
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
38
|
+
_sym()
|
39
|
+
{
|
40
|
+
local cur prev shell i path
|
14
41
|
|
15
42
|
COMPREPLY=()
|
43
|
+
cur=`_get_cword`
|
44
|
+
prev=${COMP_WORDS[COMP_CWORD-1]}
|
16
45
|
|
17
|
-
|
18
|
-
if [[ $prev =~ "-f" || $prev =~ "-o" || $prev =~ "-K" || $prev == "--keyfile" ]] ; then
|
19
|
-
SYM_COMP_OPTIONS="$(find . -type f -depth 1 | sed 's#^.\/##g')"
|
20
|
-
elif [[ "${cur}" == '-' || "${cur}" == -* ]] ; then
|
21
|
-
export DICT_SYM_COMP_OPTIONS=${DICT_SYM_COMP_OPTIONS:-$(sym --dictionary | sed -E 's/ /\n/g')}
|
22
|
-
SYM_COMP_OPTIONS=${DICT_SYM_COMP_OPTIONS}
|
23
|
-
else
|
24
|
-
SYM_COMP_OPTIONS="$(find . -type f -depth 1 -name "${prev}*" | sed 's#^.\/##g')"
|
25
|
-
fi
|
46
|
+
_expand || return 0
|
26
47
|
|
27
|
-
|
28
|
-
|
29
|
-
|
48
|
+
case "$prev" in
|
49
|
+
--@(key-file|file|output|))
|
50
|
+
_filedir
|
51
|
+
return 0
|
52
|
+
;;
|
53
|
+
-@(f|K|o))
|
54
|
+
_filedir
|
55
|
+
return 0
|
56
|
+
;;
|
57
|
+
esac
|
58
|
+
|
59
|
+
case "$cur" in
|
60
|
+
-*)
|
61
|
+
export DICT_SYM_COMP_OPTIONS=${DICT_SYM_COMP_OPTIONS:-$(sym --dictionary | sed -E 's/ /\n/g')}
|
62
|
+
COMPREPLY=( $( compgen -W "$DICT_SYM_COMP_OPTIONS" -- "$cur" ))
|
63
|
+
;;
|
64
|
+
*)
|
65
|
+
_filedir
|
66
|
+
;;
|
67
|
+
esac
|
30
68
|
|
31
|
-
|
69
|
+
return 0
|
70
|
+
} &&
|
71
|
+
complete -F _sym $nospace $filenames sym
|
32
72
|
|
73
|
+
# Local variables:
|
74
|
+
# mode: shell-script
|
75
|
+
# sh-basic-offset: 4
|
76
|
+
# sh-indent-comment: t
|
77
|
+
# indent-tabs-mode: nil
|
78
|
+
# End:
|
79
|
+
# ex: ts=4 sw=4 et filetype=sh
|
data/lib/sym.rb
CHANGED
@@ -11,7 +11,7 @@ Sym::Configuration.configure do |config|
|
|
11
11
|
config.compression_enabled = true
|
12
12
|
config.compression_level = Zlib::BEST_COMPRESSION
|
13
13
|
|
14
|
-
config.password_cache_timeout
|
14
|
+
config.password_cache_timeout = 300
|
15
15
|
|
16
16
|
# When nil is selected, providers are auto-detected.
|
17
17
|
config.password_cache_default_provider = nil
|
@@ -131,14 +131,14 @@ module Sym
|
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
134
|
-
COMPLETION_FILE
|
135
|
-
COMPLETION_PATH
|
134
|
+
COMPLETION_FILE = '.sym.completion'.freeze
|
135
|
+
COMPLETION_PATH = "#{ENV['HOME']}/#{COMPLETION_FILE}".freeze
|
136
|
+
LOGGER = Logger.new(nil).freeze # empty logger
|
137
|
+
ENV_ARGS_VARIABLE_NAME = 'SYM_ARGS'.freeze
|
136
138
|
|
137
|
-
BASH_COMPLETION
|
139
|
+
BASH_COMPLETION = {
|
138
140
|
file: File.expand_path('../../bin/sym.completion', __FILE__),
|
139
141
|
script: "[[ -f '#{COMPLETION_PATH}' ]] && source '#{COMPLETION_PATH}'",
|
140
|
-
}
|
141
|
-
|
142
|
-
LOGGER = Logger.new(nil) # empty logger
|
142
|
+
}.freeze
|
143
143
|
end
|
144
144
|
|
data/lib/sym/app/cli.rb
CHANGED
@@ -61,8 +61,11 @@ module Sym
|
|
61
61
|
attr_accessor :opts, :application, :outputs, :output_proc
|
62
62
|
|
63
63
|
def initialize(argv_original)
|
64
|
+
env_args = ENV[ENV_ARGS_VARIABLE_NAME]
|
64
65
|
begin
|
65
|
-
argv
|
66
|
+
argv = argv_original.dup
|
67
|
+
argv << env_args.split(' ') if env_args && !(argv.include?('-M') or argv.include?('--no-environment'))
|
68
|
+
argv.flatten!
|
66
69
|
dict = argv.delete('--dictionary')
|
67
70
|
self.opts = parse(argv)
|
68
71
|
command_dictionary if dict
|
data/lib/sym/app/cli_slop.rb
CHANGED
@@ -6,19 +6,28 @@ module Sym
|
|
6
6
|
|
7
7
|
o.banner = "Sym (#{Sym::VERSION}) – encrypt/decrypt data with a private key\n".bold.white
|
8
8
|
o.separator 'Usage:'.yellow
|
9
|
-
o.separator ' # Generate a new key
|
9
|
+
o.separator ' # Generate a new key...'.dark
|
10
10
|
o.separator ' sym -g '.green.bold + '[ -p ] [ -x keychain | -o keyfile | -q | ] '.green
|
11
11
|
o.separator ''
|
12
|
-
o.separator ' # To specify a key for an operation use
|
12
|
+
o.separator ' # To specify a key for an operation use one of...'.dark
|
13
13
|
o.separator ' ' + key_spec + ' = -k key | -K file | -x keychain | -i '.green.bold
|
14
14
|
o.separator ''
|
15
|
-
o.separator ' # Encrypt/Decrypt to STDOUT or output file '.dark
|
15
|
+
o.separator ' # Encrypt/Decrypt to STDOUT or an output file '.dark
|
16
16
|
o.separator ' sym -e '.green.bold + key_spec + ' [-f <file> | -s <string>] [-o <file>] '.green
|
17
17
|
o.separator ' sym -d '.green.bold + key_spec + ' [-f <file> | -s <string>] [-o <file>] '.green
|
18
18
|
o.separator ' '
|
19
19
|
o.separator ' # Edit an encrypted file in $EDITOR '.dark
|
20
20
|
o.separator ' sym -t '.green.bold + key_spec + ' -f <file> [ -b ]'.green.bold
|
21
21
|
|
22
|
+
o.separator ' '
|
23
|
+
o.separator ' # Specify any common flags in the BASH variable:'.dark
|
24
|
+
o.separator ' export SYM_ARGS="'.green + '-x staging -C'.bold.green + '"'.green
|
25
|
+
o.separator ' '
|
26
|
+
o.separator ' # And now encrypt without having to specify key location:'.dark
|
27
|
+
o.separator ' sym -e '.green.bold '-f <file>'.green.bold
|
28
|
+
o.separator ' # May need to disable SYM_ARGS with -M, eg for help:'.dark
|
29
|
+
o.separator ' sym -h -M '.green.bold
|
30
|
+
|
22
31
|
o.separator ' '
|
23
32
|
o.separator 'Modes:'.yellow
|
24
33
|
o.bool '-e', '--encrypt', ' encrypt mode'
|
@@ -61,6 +70,7 @@ module Sym
|
|
61
70
|
o.bool '-q', '--quiet', ' do not print to STDOUT'
|
62
71
|
o.bool '-V', '--version', ' print library version'
|
63
72
|
o.bool '-N', '--no-color', ' disable color output'
|
73
|
+
o.bool '-M', '--no-environment', ' disable reading flags from SYM_ARGS'
|
64
74
|
|
65
75
|
o.separator ' '
|
66
76
|
o.separator 'Utility:'.yellow
|
data/lib/sym/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sym
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Gredeskoul
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored2
|