ruby_gpg2 0.1.0.pre.12 → 0.1.0.pre.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bcbde10d4fc7b46bd1cb4ce62f80ef33ad2c0c24145267fde57974b9abf7aa8
4
- data.tar.gz: 132a6fd205e3be5fe2bd99d925b9b69751f377c480d7ead9353e83a8f884ffc4
3
+ metadata.gz: bdc48fbd38f00f4db65a315ea2662da69bf719c9133bbea87db91a24b85dc470
4
+ data.tar.gz: 309cf5c12ba74e33c0d4a2d465f1d783972972df56d029134791844499c75b15
5
5
  SHA512:
6
- metadata.gz: ce74fe316e2b38e999751dd28835672130924e83e3969d88969417afc0ea8ad681a25d002fc201d19385f5dae4eca0579121655bfc69ecafb7f254f474082ae9
7
- data.tar.gz: cd91a872e6f9e80db4b463a80b925be9a4ed3b1d9ed5134931d7b0d780e9da1436e701f8fb9839356041a2ba469a6ee4a570c59aafed01137499ae5f94574b95
6
+ metadata.gz: 68574ff80148908ed23fc999b05072a41742b4cec083ddb79135898bd160d57bb9c31c4468a2ec7923934d90a40dc39c86f77c5750c2aea4aaf45137d853d5da
7
+ data.tar.gz: cbe2ca56a501372a5f768f944cd94b1aaffd82abbac8c5a30fdae029f043ca815c7d8af06ccc8521fbcfeee1f40d812bebeb14fa3edbfdf5d160bdc71fcea315
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_gpg2 (0.1.0.pre.12)
4
+ ruby_gpg2 (0.1.0.pre.13)
5
5
  lino (= 1.3.0)
6
6
 
7
7
  GEM
@@ -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
- 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
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
@@ -1,3 +1,3 @@
1
1
  module RubyGPG2
2
- VERSION = '0.1.0.pre.12'
2
+ VERSION = '0.1.0.pre.13'
3
3
  end
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.12
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