ruby_gpg2 0.1.0.pre.9 → 0.1.0.pre.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruby_gpg2/commands/generate_key.rb +2 -0
- data/lib/ruby_gpg2/commands/mixins/passphrase_config.rb +24 -0
- data/lib/ruby_gpg2/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ddcdd9d482ad24318c8bd96bb681678dc0db3da6cc74f8f8f1e00f72d623643
|
4
|
+
data.tar.gz: 4bebb4480ca5777be2c4ad124d321cadbbf4bf87bd612d03f252a246e41edc29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db92b65732f2f93e0391bd1a971d5c5d582306e476d397c96e548858b854e249872fe7ab1e65d84b4d9de253545649f7f064af629a74da8d70724aa79f6d342
|
7
|
+
data.tar.gz: 602f0dabd16c2cb0dcd09131d2242b4f05f0927ada5787928c3b14d63a660436d38bda784356b86a6b8a0935d3d88e1132afc990d9ea7b0756c5bac1686c6b3a
|
data/Gemfile.lock
CHANGED
@@ -3,12 +3,14 @@ require 'lino'
|
|
3
3
|
require_relative 'base'
|
4
4
|
require_relative 'mixins/global_config'
|
5
5
|
require_relative 'mixins/batch_config'
|
6
|
+
require_relative 'mixins/passphrase_config'
|
6
7
|
|
7
8
|
module RubyGPG2
|
8
9
|
module Commands
|
9
10
|
class GenerateKey < Base
|
10
11
|
include Mixins::GlobalConfig
|
11
12
|
include Mixins::BatchConfig
|
13
|
+
include Mixins::PassphraseConfig
|
12
14
|
|
13
15
|
def configure_command(builder, opts)
|
14
16
|
parameter_file_path = opts[:parameter_file_path]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module RubyGPG2
|
2
|
+
module Commands
|
3
|
+
module Mixins
|
4
|
+
module PassphraseConfig
|
5
|
+
def configure_command(builder, opts)
|
6
|
+
without_passphrase = opts[:without_passphrase].nil? ?
|
7
|
+
false :
|
8
|
+
opts[:without_passphrase]
|
9
|
+
passphrase = opts[:passphrase]
|
10
|
+
|
11
|
+
builder = super(builder, opts)
|
12
|
+
if passphrase
|
13
|
+
builder = builder.with_option(
|
14
|
+
'--passphrase', passphrase, quoting: "'")
|
15
|
+
elsif without_passphrase
|
16
|
+
builder = builder.with_option(
|
17
|
+
'--passphrase', '', quoting: "'")
|
18
|
+
end
|
19
|
+
builder
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/ruby_gpg2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_gpg2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -169,6 +169,7 @@ files:
|
|
169
169
|
- lib/ruby_gpg2/commands/mixins/batch_config.rb
|
170
170
|
- lib/ruby_gpg2/commands/mixins/colon_config.rb
|
171
171
|
- lib/ruby_gpg2/commands/mixins/global_config.rb
|
172
|
+
- lib/ruby_gpg2/commands/mixins/passphrase_config.rb
|
172
173
|
- lib/ruby_gpg2/commands/mixins/with_captured_output.rb
|
173
174
|
- lib/ruby_gpg2/key.rb
|
174
175
|
- lib/ruby_gpg2/parameter_file_contents.rb
|