aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/options.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-05-12 21:22:19 -0400
committerRalph Amissah <ralph@amissah.com>2014-05-12 21:22:19 -0400
commit3ea16523f1a3cbbdcd451a3845725417ee2141d8 (patch)
tree837c9de4e9779ba2adacc4cbe4edad6d8a7ddc3f /lib/sisu/v6/options.rb
parentv5: digests cleaning (diff)
v6: digests sha512 option implemented
* options sha512 sha256 md5 * command line --sha512 * rcconf.yml ['defsault']['digest'] = sha512 * (Closes: #744402)
Diffstat (limited to 'lib/sisu/v6/options.rb')
-rw-r--r--lib/sisu/v6/options.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sisu/v6/options.rb b/lib/sisu/v6/options.rb
index aacfcbe6..115281c7 100644
--- a/lib/sisu/v6/options.rb
+++ b/lib/sisu/v6/options.rb
@@ -968,6 +968,14 @@ module SiSU_Commandline
|| mod.inspect =~/"--hash-digests"/) \
? { bool: true, set: :on }
: { bool: false, set: :na }
+ act[:hash_digest_algo]=if mod.inspect =~/"--hash-(?:sha)?512"/
+ :sha512
+ elsif mod.inspect =~/"--hash-(?:sha)?256"/
+ :sha256
+ elsif mod.inspect =~/"--hash-md5"/
+ :md5
+ else :na
+ end
act[:sample_search_form]=(cmd =~/F/ \
|| mod.inspect =~/"--sample-search-form"/) \
? { bool: true, set: :on }