ruby_gpg2 0.1.0.pre.4 → 0.1.0.pre.5

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: 9983337ad6842d933f046ade16db182df89cc4fa92275aa287db62fdca3fa0de
4
- data.tar.gz: a6853e170aa664350f00183a92b417083c7a5d94106f3aed81503d0055d571ae
3
+ metadata.gz: bf6e29055f0233d449a2a2caaa687a7c40559c9c2230324b0dfde68469af90c8
4
+ data.tar.gz: 55d718a91c49acb53796facdf1f68967a28b628f5eba4b17b3f1b0fbf6282e3f
5
5
  SHA512:
6
- metadata.gz: 23bca3f4f330f9e29c0ecff4df0bb3de24f3a06e9e1b139eec394395012cafa10118752229f9449cd13e827df48a8980d805e4350e6877ab46f1bb13714994e6
7
- data.tar.gz: 00ebe337f7b596c5ae3111bc883f9ab5efb6c7cfac729cfad43bd757c01cdfccb0b241c9b5f5d54f91b93763edcf31857de2213681b34d02717a446370282941
6
+ metadata.gz: 54cdbee525b3ec524b149712df049d00ae0586f9592576a7ac385f7df7d6ff4a8de760c5cccf4174f9c1844a9cd7a668965b98286ca0c1b349e8fab207b16307
7
+ data.tar.gz: 4c4b8828b35f43291490a15dfbe32c0d9a948686b2c12f5b92746c277553710adf16668135d48e6409a9f560bf6797c5d59d4e6f21ea68650f679fc260a6525c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_gpg2 (0.1.0.pre.4)
4
+ ruby_gpg2 (0.1.0.pre.5)
5
5
  lino (= 1.3.0)
6
6
 
7
7
  GEM
@@ -111,9 +111,11 @@ module RubyGPG2
111
111
  user_id_hash: user_id_hash(type, fields[7]),
112
112
  owner_trust: owner_trust(fields[8]),
113
113
  fingerprint: fingerprint(type, fields[9]),
114
+ key_grip: key_grip(type, fields[9]),
114
115
  user_id: user_id(type, fields[9]),
115
116
  signature_class: signature_class(fields[10]),
116
117
  key_capabilities: key_capabilities(fields[11]),
118
+ serial_number: serial_number(fields[14]),
117
119
  compliance_modes: compliance_modes(fields[17]),
118
120
  last_update: last_update(fields[18]),
119
121
  origin: origin(fields[19]))
@@ -133,9 +135,11 @@ module RubyGPG2
133
135
  :user_id_hash,
134
136
  :owner_trust,
135
137
  :fingerprint,
138
+ :key_grip,
136
139
  :user_id,
137
140
  :signature_class,
138
141
  :key_capabilities,
142
+ :serial_number,
139
143
  :compliance_modes,
140
144
  :last_update,
141
145
  :origin,
@@ -156,9 +160,11 @@ module RubyGPG2
156
160
  @user_id_hash = opts[:user_id_hash]
157
161
  @owner_trust = opts[:owner_trust]
158
162
  @fingerprint = opts[:fingerprint]
163
+ @key_grip = opts[:key_grip]
159
164
  @user_id = opts[:user_id]
160
165
  @signature_class = opts[:signature_class]
161
166
  @key_capabilities = opts[:key_capabilities]
167
+ @serial_number = opts[:serial_number]
162
168
  @compliance_modes = opts[:compliance_modes]
163
169
  @last_update = opts[:last_update]
164
170
  @origin = opts[:origin]
@@ -187,9 +193,11 @@ module RubyGPG2
187
193
  @user_id_hash,
188
194
  @owner_trust,
189
195
  @fingerprint,
196
+ @key_grip,
190
197
  @user_id,
191
198
  @signature_class,
192
199
  @key_capabilities,
200
+ @serial_number,
193
201
  @compliance_modes,
194
202
  @last_update,
195
203
  @origin,
@@ -245,8 +253,12 @@ module RubyGPG2
245
253
  type == :fingerprint ? value : nil
246
254
  end
247
255
 
256
+ def self.key_grip(type, value)
257
+ type == :key_grip ? value : nil
258
+ end
259
+
248
260
  def self.user_id(type, value)
249
- unless type == :fingerprint
261
+ unless [:fingerprint, :key_grip].include?(type)
250
262
  value =~ /.+/ ? value : nil
251
263
  end
252
264
  end
@@ -259,6 +271,10 @@ module RubyGPG2
259
271
  value =~ /.+/ ? value.chars.map { |c| KEY_CAPABILITIES[c] } : nil
260
272
  end
261
273
 
274
+ def self.serial_number(value)
275
+ value =~ /.+/ ? value : nil
276
+ end
277
+
262
278
  def self.compliance_modes(value)
263
279
  value =~ /.+/ ? value.split(' ').map { |m| COMPLIANCE_MODES[m] } : nil
264
280
  end
@@ -0,0 +1,22 @@
1
+ require 'lino'
2
+
3
+ require_relative 'base'
4
+ require_relative 'mixins/global_config'
5
+ require_relative 'mixins/colon_config'
6
+ require_relative 'mixins/with_captured_output'
7
+
8
+ module RubyGPG2
9
+ module Commands
10
+ class ListSecretKeys < Base
11
+ include Mixins::GlobalConfig
12
+ include Mixins::ColonConfig
13
+ include Mixins::WithCapturedOutput
14
+
15
+ def configure_command(builder, opts)
16
+ builder = builder.with_subcommand('--list-secret-keys')
17
+ builder = super(builder, opts)
18
+ builder
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,5 +1,6 @@
1
1
  require_relative 'commands/generate_key'
2
2
  require_relative 'commands/list_public_keys'
3
+ require_relative 'commands/list_secret_keys'
3
4
 
4
5
  module RubyGPG2
5
6
  module Commands
@@ -1,3 +1,3 @@
1
1
  module RubyGPG2
2
- VERSION = '0.1.0.pre.4'
2
+ VERSION = '0.1.0.pre.5'
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.4
4
+ version: 0.1.0.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
@@ -165,6 +165,7 @@ files:
165
165
  - lib/ruby_gpg2/commands/base.rb
166
166
  - lib/ruby_gpg2/commands/generate_key.rb
167
167
  - lib/ruby_gpg2/commands/list_public_keys.rb
168
+ - lib/ruby_gpg2/commands/list_secret_keys.rb
168
169
  - lib/ruby_gpg2/commands/mixins/batch_config.rb
169
170
  - lib/ruby_gpg2/commands/mixins/colon_config.rb
170
171
  - lib/ruby_gpg2/commands/mixins/global_config.rb