Sha256: 95dd124fbd51a0410843954d778d1b62fe5154eff918ba5c88c3cce1904ad0ed

Contents?: true

Size: 729 Bytes

Versions: 6

Compression:

Stored size: 729 Bytes

Contents

# frozen_string_literal: true

module RubyGPG2
  module Commands
    module Mixins
      module GlobalConfig
        private

        def parameter_defaults(parameters)
          without_tty = parameters[:without_tty]
          super.merge(without_tty: without_tty.nil? ? true : without_tty)
        end

        def configure_command(builder, parameters)
          home_directory = parameters[:home_directory]
          without_tty = parameters[:without_tty]

          b = super
          if home_directory
            b = b.with_option(
              '--homedir', home_directory, quoting: '"'
            )
          end
          b = b.with_flag('--no-tty') if without_tty
          b
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby_gpg2-0.13.0.pre.3 lib/ruby_gpg2/commands/mixins/global_config.rb
ruby_gpg2-0.13.0.pre.2 lib/ruby_gpg2/commands/mixins/global_config.rb
ruby_gpg2-0.13.0.pre.1 lib/ruby_gpg2/commands/mixins/global_config.rb
ruby_gpg2-0.12.0 lib/ruby_gpg2/commands/mixins/global_config.rb
ruby_gpg2-0.11.0.pre.7 lib/ruby_gpg2/commands/mixins/global_config.rb
ruby_gpg2-0.11.0.pre.6 lib/ruby_gpg2/commands/mixins/global_config.rb