ruby_gpg2 0.1.0.pre.12 → 0.1.0.pre.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdc48fbd38f00f4db65a315ea2662da69bf719c9133bbea87db91a24b85dc470
|
4
|
+
data.tar.gz: 309cf5c12ba74e33c0d4a2d465f1d783972972df56d029134791844499c75b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68574ff80148908ed23fc999b05072a41742b4cec083ddb79135898bd160d57bb9c31c4468a2ec7923934d90a40dc39c86f77c5750c2aea4aaf45137d853d5da
|
7
|
+
data.tar.gz: cbe2ca56a501372a5f768f944cd94b1aaffd82abbac8c5a30fdae029f043ca815c7d8af06ccc8521fbcfeee1f40d812bebeb14fa3edbfdf5d160bdc71fcea315
|
data/Gemfile.lock
CHANGED
@@ -5,6 +5,7 @@ require_relative 'mixins/global_config'
|
|
5
5
|
require_relative 'mixins/batch_config'
|
6
6
|
require_relative 'mixins/passphrase_config'
|
7
7
|
require_relative 'mixins/pinentry_config'
|
8
|
+
require_relative 'mixins/without_passphrase'
|
8
9
|
|
9
10
|
module RubyGPG2
|
10
11
|
module Commands
|
@@ -13,6 +14,7 @@ module RubyGPG2
|
|
13
14
|
include Mixins::BatchConfig
|
14
15
|
include Mixins::PassphraseConfig
|
15
16
|
include Mixins::PinentryConfig
|
17
|
+
include Mixins::WithoutPassphrase
|
16
18
|
|
17
19
|
def configure_command(builder, opts)
|
18
20
|
parameter_file_path = opts[:parameter_file_path]
|
@@ -3,19 +3,11 @@ module RubyGPG2
|
|
3
3
|
module Mixins
|
4
4
|
module PassphraseConfig
|
5
5
|
def configure_command(builder, opts)
|
6
|
-
without_passphrase = opts[:without_passphrase].nil? ?
|
7
|
-
false :
|
8
|
-
opts[:without_passphrase]
|
9
6
|
passphrase = opts[:passphrase]
|
10
7
|
|
11
8
|
builder = super(builder, opts)
|
12
|
-
|
13
|
-
|
14
|
-
'--passphrase', passphrase, quoting: "'")
|
15
|
-
elsif without_passphrase
|
16
|
-
builder = builder.with_option(
|
17
|
-
'--passphrase', '', quoting: "'")
|
18
|
-
end
|
9
|
+
builder = builder.with_option(
|
10
|
+
'--passphrase', passphrase, quoting: "'") if passphrase
|
19
11
|
builder
|
20
12
|
end
|
21
13
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RubyGPG2
|
2
|
+
module Commands
|
3
|
+
module Mixins
|
4
|
+
module WithoutPassphrase
|
5
|
+
def configure_command(builder, opts)
|
6
|
+
without_passphrase = opts[:without_passphrase]
|
7
|
+
super(builder, without_passphrase ?
|
8
|
+
opts.merge(passphrase: '', pinentry_mode: :loopback) :
|
9
|
+
opts)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/ruby_gpg2/commands/mixins/passphrase_config.rb
|
173
173
|
- lib/ruby_gpg2/commands/mixins/pinentry_config.rb
|
174
174
|
- lib/ruby_gpg2/commands/mixins/with_captured_output.rb
|
175
|
+
- lib/ruby_gpg2/commands/mixins/without_passphrase.rb
|
175
176
|
- lib/ruby_gpg2/key.rb
|
176
177
|
- lib/ruby_gpg2/parameter_file_contents.rb
|
177
178
|
- lib/ruby_gpg2/user_id.rb
|