ruby_gpg2 0.1.0.pre.16 → 0.1.0.pre.17
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ruby_gpg2/commands/export.rb +27 -0
- data/lib/ruby_gpg2/commands/export_secret_keys.rb +35 -0
- data/lib/ruby_gpg2/commands/import.rb +25 -0
- data/lib/ruby_gpg2/commands/mixins/armor_config.rb +15 -0
- data/lib/ruby_gpg2/commands/mixins/output_config.rb +16 -0
- data/lib/ruby_gpg2/commands.rb +3 -0
- data/lib/ruby_gpg2/version.rb +1 -1
- metadata +6 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c4654b01d08d48a73c6e84b36a50068493e60f6ba4b986aa1a0961e398a39bed
         | 
| 4 | 
            +
              data.tar.gz: 20f9a42cc4de69050b55196f3bc2bba860cd6d32c9d1f8c1124335b1d156147a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 29cf654c888ecbbc3a0971466ee7ad8a43684088b524dc4862578de4551b77fa534fb9b50892e3dc1b5f39868b3f75eba5a84daaa18077ceec56489f9dcb7cd8
         | 
| 7 | 
            +
              data.tar.gz: '06769ca6b8663ebcbb34f223635822cca97a66e87fcd33a69290675f0bce0e542d5d579650464141e28a2c79a5447d5ea573f771ab183f9ab758e8b70d221fb3'
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            require 'lino'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require_relative 'base'
         | 
| 4 | 
            +
            require_relative 'mixins/global_config'
         | 
| 5 | 
            +
            require_relative 'mixins/armor_config'
         | 
| 6 | 
            +
            require_relative 'mixins/output_config'
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            module RubyGPG2
         | 
| 9 | 
            +
              module Commands
         | 
| 10 | 
            +
                class Export < Base
         | 
| 11 | 
            +
                  include Mixins::GlobalConfig
         | 
| 12 | 
            +
                  include Mixins::ArmorConfig
         | 
| 13 | 
            +
                  include Mixins::OutputConfig
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                  def configure_command(builder, opts)
         | 
| 16 | 
            +
                    names = opts[:names] || []
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    builder = super(builder, opts)
         | 
| 19 | 
            +
                    builder = builder.with_subcommand('--export')
         | 
| 20 | 
            +
                    names.each do |name|
         | 
| 21 | 
            +
                      builder = builder.with_argument(name)
         | 
| 22 | 
            +
                    end
         | 
| 23 | 
            +
                    builder
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
| @@ -0,0 +1,35 @@ | |
| 1 | 
            +
            require 'lino'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require_relative 'base'
         | 
| 4 | 
            +
            require_relative 'mixins/global_config'
         | 
| 5 | 
            +
            require_relative 'mixins/batch_config'
         | 
| 6 | 
            +
            require_relative 'mixins/passphrase_config'
         | 
| 7 | 
            +
            require_relative 'mixins/pinentry_config'
         | 
| 8 | 
            +
            require_relative 'mixins/armor_config'
         | 
| 9 | 
            +
            require_relative 'mixins/output_config'
         | 
| 10 | 
            +
            require_relative 'mixins/without_passphrase'
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            module RubyGPG2
         | 
| 13 | 
            +
              module Commands
         | 
| 14 | 
            +
                class ExportSecretKeys < Base
         | 
| 15 | 
            +
                  include Mixins::GlobalConfig
         | 
| 16 | 
            +
                  include Mixins::BatchConfig
         | 
| 17 | 
            +
                  include Mixins::PassphraseConfig
         | 
| 18 | 
            +
                  include Mixins::PinentryConfig
         | 
| 19 | 
            +
                  include Mixins::ArmorConfig
         | 
| 20 | 
            +
                  include Mixins::OutputConfig
         | 
| 21 | 
            +
                  include Mixins::WithoutPassphrase
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                  def configure_command(builder, opts)
         | 
| 24 | 
            +
                    names = opts[:names] || []
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                    builder = super(builder, opts)
         | 
| 27 | 
            +
                    builder = builder.with_subcommand('--export-secret-keys')
         | 
| 28 | 
            +
                    names.each do |name|
         | 
| 29 | 
            +
                      builder = builder.with_argument(name)
         | 
| 30 | 
            +
                    end
         | 
| 31 | 
            +
                    builder
         | 
| 32 | 
            +
                  end
         | 
| 33 | 
            +
                end
         | 
| 34 | 
            +
              end
         | 
| 35 | 
            +
            end
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            require 'lino'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require_relative 'base'
         | 
| 4 | 
            +
            require_relative 'mixins/global_config'
         | 
| 5 | 
            +
            require_relative 'mixins/batch_config'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            module RubyGPG2
         | 
| 8 | 
            +
              module Commands
         | 
| 9 | 
            +
                class Import < Base
         | 
| 10 | 
            +
                  include Mixins::GlobalConfig
         | 
| 11 | 
            +
                  include Mixins::BatchConfig
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  def configure_command(builder, opts)
         | 
| 14 | 
            +
                    key_file_paths = opts[:key_file_paths] || []
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    builder = super(builder, opts)
         | 
| 17 | 
            +
                    builder = builder.with_subcommand('--import')
         | 
| 18 | 
            +
                    key_file_paths.each do |key_file_path|
         | 
| 19 | 
            +
                      builder = builder.with_argument(key_file_path)
         | 
| 20 | 
            +
                    end
         | 
| 21 | 
            +
                    builder
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
| @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            module RubyGPG2
         | 
| 2 | 
            +
              module Commands
         | 
| 3 | 
            +
                module Mixins
         | 
| 4 | 
            +
                  module ArmorConfig
         | 
| 5 | 
            +
                    def configure_command(builder, opts)
         | 
| 6 | 
            +
                      armor = opts[:armor]
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                      builder = super(builder, opts)
         | 
| 9 | 
            +
                      builder = builder.with_flag('--armor') if armor
         | 
| 10 | 
            +
                      builder
         | 
| 11 | 
            +
                    end
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
            end
         | 
| @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            module RubyGPG2
         | 
| 2 | 
            +
              module Commands
         | 
| 3 | 
            +
                module Mixins
         | 
| 4 | 
            +
                  module OutputConfig
         | 
| 5 | 
            +
                    def configure_command(builder, opts)
         | 
| 6 | 
            +
                      output_file_path = opts[:output_file_path]
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                      builder = super(builder, opts)
         | 
| 9 | 
            +
                      builder = builder.with_option(
         | 
| 10 | 
            +
                            '--output', output_file_path, quoting: '"') if output_file_path
         | 
| 11 | 
            +
                      builder
         | 
| 12 | 
            +
                    end
         | 
| 13 | 
            +
                  end
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
              end
         | 
| 16 | 
            +
            end
         | 
    
        data/lib/ruby_gpg2/commands.rb
    CHANGED
    
    
    
        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.17
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Toby Clemson
         | 
| @@ -163,12 +163,17 @@ files: | |
| 163 163 | 
             
            - lib/ruby_gpg2/colon_record.rb
         | 
| 164 164 | 
             
            - lib/ruby_gpg2/commands.rb
         | 
| 165 165 | 
             
            - lib/ruby_gpg2/commands/base.rb
         | 
| 166 | 
            +
            - lib/ruby_gpg2/commands/export.rb
         | 
| 167 | 
            +
            - lib/ruby_gpg2/commands/export_secret_keys.rb
         | 
| 166 168 | 
             
            - lib/ruby_gpg2/commands/generate_key.rb
         | 
| 169 | 
            +
            - lib/ruby_gpg2/commands/import.rb
         | 
| 167 170 | 
             
            - lib/ruby_gpg2/commands/list_public_keys.rb
         | 
| 168 171 | 
             
            - lib/ruby_gpg2/commands/list_secret_keys.rb
         | 
| 172 | 
            +
            - lib/ruby_gpg2/commands/mixins/armor_config.rb
         | 
| 169 173 | 
             
            - lib/ruby_gpg2/commands/mixins/batch_config.rb
         | 
| 170 174 | 
             
            - lib/ruby_gpg2/commands/mixins/colon_config.rb
         | 
| 171 175 | 
             
            - lib/ruby_gpg2/commands/mixins/global_config.rb
         | 
| 176 | 
            +
            - lib/ruby_gpg2/commands/mixins/output_config.rb
         | 
| 172 177 | 
             
            - lib/ruby_gpg2/commands/mixins/passphrase_config.rb
         | 
| 173 178 | 
             
            - lib/ruby_gpg2/commands/mixins/pinentry_config.rb
         | 
| 174 179 | 
             
            - lib/ruby_gpg2/commands/mixins/status_config.rb
         |