digicert 0.2.0 → 0.3.0

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
  SHA1:
3
- metadata.gz: 6c74c249a9270232627bac89c2dd50fafe7e5716
4
- data.tar.gz: 437b67f4b9f77b265aa7007bb2e7646cb28f70c8
3
+ metadata.gz: 887669f2db4c933b460abb1314bdb46c983d35af
4
+ data.tar.gz: 417f9b150c70c521493bf0492e3d0a722a2ae966
5
5
  SHA512:
6
- metadata.gz: b3996047b941dc247f6499730d0988f8aa0e6c4d9d9cf166ffa0b9044e3800f278e6e8bd859694fb2901bdbcfda476ea6f10237f097602a78a22f31f870520cc
7
- data.tar.gz: bb2d9796001e2a277f2e446308b675d27853d0ee1c1754e6ba7917fcdea64868ff7f555ee9c766f4e64e42631d7c47e4d037cfcf426d40c7b18aa41f5d3a6924
6
+ metadata.gz: 5d06d51b8585a96e2385c47aeea0106c2ba8c2b9c4b97f9950b004c474109f67a1097044a57d623fd76c5e87b16e32c0e794eee0354df9a0da015fb33f6d1ca6
7
+ data.tar.gz: '09d586baf9055abeb8a35e766161489bbb253b881324e9e44ac59b189f9672ebf0410a833244d626df6335421303bb8213df2d89a813fb89ef144462bd6f199b'
@@ -1,10 +1,13 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.3
2
+ Include:
3
+ - "**/*.rake"
4
+ - "**/Gemfile"
5
+ - "**/Rakefile"
3
6
 
4
7
  Exclude:
5
8
  - db/schema.rb
6
9
 
7
- Style/AccessorMethodName:
10
+ Naming/AccessorMethodName:
8
11
  Description: Check the naming of accessor methods for get_/set_.
9
12
  Enabled: false
10
13
 
@@ -23,7 +26,7 @@ Style/AsciiComments:
23
26
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
24
27
  Enabled: false
25
28
 
26
- Style/AsciiIdentifiers:
29
+ Naming/AsciiIdentifiers:
27
30
  Description: 'Use only ascii symbols in identifiers.'
28
31
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
29
32
  Enabled: false
@@ -92,6 +95,13 @@ Metrics/AbcSize:
92
95
  branches, and conditions.
93
96
  Enabled: false
94
97
 
98
+ Metrics/BlockLength:
99
+ CountComments: true # count full line comments?
100
+ Max: 25
101
+ ExcludedMethods: []
102
+ Exclude:
103
+ - "spec/**/*"
104
+
95
105
  Metrics/CyclomaticComplexity:
96
106
  Description: >-
97
107
  A complexity metric that is strongly correlated to the number
@@ -102,20 +112,15 @@ Rails/Delegate:
102
112
  Description: 'Prefer delegate method for delegations.'
103
113
  Enabled: false
104
114
 
105
- Style/DeprecatedHashMethods:
106
- Description: 'Checks for use of deprecated Hash methods.'
107
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
115
+ Style/PreferredHashMethods:
116
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
117
+ StyleGuide: '#hash-key'
108
118
  Enabled: false
109
119
 
110
120
  Style/Documentation:
111
121
  Description: 'Document classes and non-namespace modules.'
112
122
  Enabled: false
113
123
 
114
- Style/DotPosition:
115
- Description: 'Checks the position of the dot in multi-line method calls.'
116
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
117
- EnforcedStyle: trailing
118
-
119
124
  Style/DoubleNegation:
120
125
  Description: 'Checks for uses of double negation (!!).'
121
126
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
@@ -141,15 +146,17 @@ Style/EvenOdd:
141
146
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
142
147
  Enabled: false
143
148
 
144
- Style/ExtraSpacing:
145
- Description: 'Do not use unnecessary spacing.'
146
- Enabled: true
147
-
148
- Style/FileName:
149
+ Naming/FileName:
149
150
  Description: 'Use snake_case for source file names.'
150
151
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
151
152
  Enabled: false
152
153
 
154
+ Style/FrozenStringLiteralComment:
155
+ Description: >-
156
+ Add the frozen_string_literal comment to the top of files
157
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
158
+ Enabled: false
159
+
153
160
  Style/FlipFlop:
154
161
  Description: 'Checks for flip flops'
155
162
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
@@ -218,25 +225,11 @@ Style/ModuleFunction:
218
225
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
219
226
  Enabled: false
220
227
 
221
- Style/MultilineOperationIndentation:
222
- Description: >-
223
- Checks indentation of binary operations that span more than
224
- one line.
225
- Enabled: true
226
- EnforcedStyle: indented
227
-
228
228
  Style/MultilineBlockChain:
229
229
  Description: 'Avoid multi-line chains of blocks.'
230
230
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
231
231
  Enabled: false
232
232
 
233
- Style/MultilineMethodCallIndentation:
234
- Description: >-
235
- Checks indentation of method calls with the dot operator
236
- that span more than one line.
237
- Enabled: true
238
- EnforcedStyle: indented
239
-
240
233
  Style/NegatedIf:
241
234
  Description: >-
242
235
  Favor unless over if for negative conditions
@@ -278,7 +271,7 @@ Style/OneLineConditional:
278
271
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
279
272
  Enabled: false
280
273
 
281
- Style/OpMethod:
274
+ Naming/BinaryOperatorParameterName:
282
275
  Description: 'When defining binary operators, name the argument other.'
283
276
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
284
277
  Enabled: false
@@ -298,7 +291,7 @@ Style/PerlBackrefs:
298
291
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
299
292
  Enabled: false
300
293
 
301
- Style/PredicateName:
294
+ Naming/PredicateName:
302
295
  Description: 'Check the names of predicate methods.'
303
296
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
304
297
  NamePrefixBlacklist:
@@ -353,18 +346,12 @@ Style/StringLiterals:
353
346
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
354
347
  EnforcedStyle: double_quotes
355
348
  Enabled: true
356
- SupportedStyles:
357
- - single_quotes
358
- - double_quotes
359
-
360
- Style/FrozenStringLiteralComment:
361
- Enabled: false
362
349
 
363
350
  Style/TrailingCommaInArguments:
364
351
  Description: 'Checks for trailing comma in argument lists.'
365
352
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
366
353
  EnforcedStyleForMultiline: comma
367
- SupportedStyles:
354
+ SupportedStylesForMultiline:
368
355
  - comma
369
356
  - consistent_comma
370
357
  - no_comma
@@ -374,7 +361,7 @@ Style/TrailingCommaInLiteral:
374
361
  Description: 'Checks for trailing comma in array and hash literals.'
375
362
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
376
363
  EnforcedStyleForMultiline: comma
377
- SupportedStyles:
364
+ SupportedStylesForMultiline:
378
365
  - comma
379
366
  - consistent_comma
380
367
  - no_comma
@@ -409,6 +396,41 @@ Style/WordArray:
409
396
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
410
397
  Enabled: false
411
398
 
399
+ # Layout
400
+
401
+ Layout/AlignParameters:
402
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
403
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
404
+ Enabled: false
405
+
406
+ Layout/DotPosition:
407
+ Description: 'Checks the position of the dot in multi-line method calls.'
408
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
409
+ EnforcedStyle: trailing
410
+
411
+ Layout/ExtraSpacing:
412
+ Description: 'Do not use unnecessary spacing.'
413
+ Enabled: true
414
+
415
+ Layout/MultilineOperationIndentation:
416
+ Description: >-
417
+ Checks indentation of binary operations that span more than
418
+ one line.
419
+ Enabled: true
420
+ EnforcedStyle: indented
421
+
422
+ Layout/MultilineMethodCallIndentation:
423
+ Description: >-
424
+ Checks indentation of method calls with the dot operator
425
+ that span more than one line.
426
+ Enabled: true
427
+ EnforcedStyle: indented
428
+
429
+ Layout/InitialIndentation:
430
+ Description: >-
431
+ Checks the indentation of the first non-blank non-comment line in a file.
432
+ Enabled: false
433
+
412
434
  # Lint
413
435
 
414
436
  Lint/AmbiguousOperator:
@@ -465,17 +487,6 @@ Lint/HandleExceptions:
465
487
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
466
488
  Enabled: false
467
489
 
468
- Lint/InvalidCharacterLiteral:
469
- Description: >-
470
- Checks for invalid character literals with a non-escaped
471
- whitespace character.
472
- Enabled: false
473
-
474
- Style/InitialIndentation:
475
- Description: >-
476
- Checks the indentation of the first non-blank non-comment line in a file.
477
- Enabled: false
478
-
479
490
  Lint/LiteralInCondition:
480
491
  Description: 'Checks of literals used in conditions.'
481
492
  Enabled: false
@@ -1,3 +1,8 @@
1
+ ## 0.3.0 (2017-12-08)
2
+
3
+ * Minor updates in the readme and `rubocop` configuration
4
+ * Add support for Private Premium client certificate (#130, @davidcpell)
5
+
1
6
  ## 0.2.0 (2017-08-09)
2
7
 
3
8
  * Fix reissue/duplication issue for custom attribute (PR #124)
data/README.md CHANGED
@@ -250,6 +250,17 @@ Digicert::Domain.all(filter_params_hash)
250
250
 
251
251
  ### Submitting Orders
252
252
 
253
+ #### Important Note
254
+
255
+ Recently DigiCert improved the certificate issuance process to allow for
256
+ [immediate certificate issuance]. It does not require us to change anything on
257
+ our API calls but now the response will be different based on your DigiCert
258
+ account settings.
259
+
260
+ If you have everything setup in place and any order is eligible for immediate
261
+ issuance then the certificate will be included with the response. Please check
262
+ the [certificate download spec] for inspiration.
263
+
253
264
  #### View Product List
254
265
 
255
266
  Use this interface to retrieve a list of available products for an account.
@@ -276,7 +287,7 @@ Digicert::CSRGenerator.generate(
276
287
  common_name: "example.com",
277
288
  san_names: ["example.com", "www.example.com"],
278
289
  rsa_key: File.read("your_rsa_key_file_path"),
279
- organization: Digicert::Organization.first,
290
+ organization: Digicert::Organization.all.first,
280
291
  )
281
292
  ```
282
293
 
@@ -426,6 +437,28 @@ Digicert::ClientCertificate::Premium.create(
426
437
  )
427
438
  ```
428
439
 
440
+ #### Order Private Client Premium Certificate
441
+
442
+ Use this interface to order a Private Client Premium Certificate.
443
+
444
+ ```ruby
445
+ Digicert::ClientCertificate::PrivatePremium.create(
446
+ certificate: {
447
+ organization_units: ["Developer Operations"],
448
+
449
+ csr: "------ [CSR HERE] ------",
450
+ emails: ["a.name@example.com"],
451
+ common_name: "Common Name",
452
+ signature_hash: "sha256",
453
+ },
454
+ organization: { id: "12345" },
455
+ validity_years: 3,
456
+ auto_renew: nil,
457
+ container: { id: "654321" },
458
+ payment_method: "balance",
459
+ )
460
+ ```
461
+
429
462
  #### Order Email Security Plus
430
463
 
431
464
  Use this interface to order a Email Security Plus Certificate
@@ -864,3 +897,5 @@ This gem is developed, maintained and funded by [Ribose Inc.][riboseinc]
864
897
  [issues]: https://github.com/riboseinc/digicert/issues
865
898
  [squash]: https://github.com/thoughtbot/guides/tree/master/protocol/git#write-a-feature
866
899
  [sandi-metz]: http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers
900
+ [immediate certificate issuance]: https://www.digicert.com/certcentral-support/immediate-certificate-issuance-feature.htm
901
+ [certificate download spec]: https://github.com/riboseinc/digicert/blob/master/spec/acceptance/certificate_download_spec.rb#L5
@@ -0,0 +1,13 @@
1
+ require "digicert/client_certificate/base"
2
+
3
+ module Digicert
4
+ module ClientCertificate
5
+ class PrivatePremium < Digicert::ClientCertificate::Base
6
+ private
7
+
8
+ def certificate_type
9
+ 'private_client_premium'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -6,6 +6,7 @@ require "digicert/ssl_certificate/ssl_ev_plus"
6
6
  require "digicert/ssl_certificate/ssl_wildcard"
7
7
 
8
8
  require "digicert/client_certificate/premium"
9
+ require "digicert/client_certificate/private_premium"
9
10
  require "digicert/client_certificate/email_security_plus"
10
11
  require "digicert/client_certificate/digital_signature_plus"
11
12
 
@@ -21,5 +21,5 @@
21
21
  # ++
22
22
 
23
23
  module Digicert
24
- VERSION = "0.2.0".freeze
24
+ VERSION = "0.3.0".freeze
25
25
  end
@@ -2,44 +2,75 @@ require "spec_helper"
2
2
  require "digicert"
3
3
 
4
4
  RSpec.describe "Download a certificate" do
5
- it "creates and download an approved certificate" do
6
- name_id = "ssl_plus"
5
+ context "with immediate issuance" do
6
+ it "creates an download the certificate instantly" do
7
+ name_id = "ssl_plus"
7
8
 
8
- # Retrieve the product details uisng the
9
- # name id specificed for that specific one
10
- #
11
- stub_digicert_product_fetch_api(name_id)
12
- product = Digicert::Product.fetch(name_id)
9
+ # Retrieve the product details uisng the
10
+ # name id specificed for that specific one
11
+ #
12
+ stub_digicert_product_fetch_api(name_id)
13
+ product = Digicert::Product.fetch(name_id)
13
14
 
14
- # Order a new certificate using the product details
15
- # server platform, signature hash and other fields
16
- #
17
- order_attributes = build_order_attributes(product)
18
- stub_digicert_order_create_api("ssl_plus", order_attributes)
19
- order = Digicert::Order.create("ssl_plus", order_attributes)
15
+ # Order a new certificate using the product details
16
+ # server platform, signature hash and other fields
17
+ #
18
+ order_attributes = build_order_attributes(product)
19
+ stub_digicert_order_with_immediate_issuance("ssl_plus", order_attributes)
20
+ order = Digicert::Order.create("ssl_plus", order_attributes)
20
21
 
21
- # Retrieve the certificate order details with the
22
- # certificate id in it, so we can use this one to
23
- # download the certificate using the API
24
- #
25
- stub_digicert_order_fetch_api(order.id)
26
- certificate_order = Digicert::Order.fetch(order.id)
22
+ expect(
23
+ order.certificate_chain.first.pem.
24
+ start_with?("-----BEGIN CERTIFICATE")
25
+ ).to be_truthy
27
26
 
28
- # Now that we have the certicate orders detials with
29
- # the certificate id and the order status, so let's assume
30
- # all requiremetns are meet and let's fetch the certificate
31
- #
32
- certificate_id = certificate_order.certificate.id
33
- stub_digicert_certificate_download_by_platform(certificate_id)
34
- certificate = Digicert::CertificateDownloader.fetch(certificate_id)
27
+ expect(order.id).not_to be_nil
28
+ expect(order.certificate_id).not_to be_nil
29
+ expect(order.certificate_chain.count).to eq(3)
30
+ expect(order.requests.first.status).to eq("approved")
31
+ end
32
+ end
33
+
34
+ context "without immediate issuance" do
35
+ it "creates and download an approved certificate" do
36
+ name_id = "ssl_plus"
37
+
38
+ # Retrieve the product details uisng the
39
+ # name id specificed for that specific one
40
+ #
41
+ stub_digicert_product_fetch_api(name_id)
42
+ product = Digicert::Product.fetch(name_id)
43
+
44
+ # Order a new certificate using the product details
45
+ # server platform, signature hash and other fields
46
+ #
47
+ order_attributes = build_order_attributes(product)
48
+ stub_digicert_order_create_api("ssl_plus", order_attributes)
49
+ order = Digicert::Order.create("ssl_plus", order_attributes)
50
+
51
+ # Retrieve the certificate order details with the
52
+ # certificate id in it, so we can use this one to
53
+ # download the certificate using the API
54
+ #
55
+ stub_digicert_order_fetch_api(order.id)
56
+ certificate_order = Digicert::Order.fetch(order.id)
57
+
58
+ # Now that we have the certicate orders detials with
59
+ # the certificate id and the order status, so let's assume
60
+ # all requiremetns are meet and let's fetch the certificate
61
+ #
62
+ certificate_id = certificate_order.certificate.id
63
+ stub_digicert_certificate_download_by_platform(certificate_id)
64
+ certificate = Digicert::CertificateDownloader.fetch(certificate_id)
35
65
 
36
- # Normally zip archieves content starts with `PK` and then
37
- # the content of the files inside the zip folder
38
- #
39
- # Source: http://filext.com/faq/look_into_files.php
40
- #
41
- expect(certificate.code.to_i).to eq(200)
42
- expect(certificate.body.start_with?("PK")).to be_truthy
66
+ # Normally zip archieves content starts with `PK` and then
67
+ # the content of the files inside the zip folder
68
+ #
69
+ # Source: http://filext.com/faq/look_into_files.php
70
+ #
71
+ expect(certificate.code.to_i).to eq(200)
72
+ expect(certificate.body.start_with?("PK")).to be_truthy
73
+ end
43
74
  end
44
75
 
45
76
  def build_order_attributes(product)
@@ -0,0 +1,30 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Digicert::ClientCertificate::PrivatePremium do
4
+ describe ".create" do
5
+ it "creates a new order for a client private premium certificate" do
6
+ stub_digicert_order_create_api("private_client_premium", order_attributes)
7
+ order = Digicert::ClientCertificate::PrivatePremium.create(order_attributes)
8
+
9
+ expect(order.id).not_to be_nil
10
+ end
11
+ end
12
+
13
+ def order_attributes
14
+ {
15
+ certificate: {
16
+ organization_units: ["Developers"],
17
+
18
+ csr: "----- CSR HERE -----",
19
+ emails: ["a.name@example.com"],
20
+ common_name: "A Name",
21
+ signature_hash: "sha256",
22
+ },
23
+ organization: { id: "12345" },
24
+ validity_years: 3,
25
+ auto_renew: nil,
26
+ container: { id: "654321" },
27
+ payment_method: "balance"
28
+ }
29
+ end
30
+ end
@@ -0,0 +1,24 @@
1
+ {
2
+ "id": 123456789,
3
+ "requests": [
4
+ {
5
+ "id": 987654321,
6
+ "status":"approved"
7
+ }
8
+ ],
9
+ "certificate_id": 456789123,
10
+ "certificate_chain": [
11
+ {
12
+ "subject_common_name":"*.ribosetest.com",
13
+ "pem":"-----BEGIN CERTIFICATE-----\r\nMIIFJjCCBA6gAwIBAgIQBzZmRrds99wbDkLGqgLQUTANBgkqhkiG9w0BAQsFADBN\r\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E\r\naWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTcxMDA5MDAwMDAwWhcN\r\nMTcxMDEyMTIwMDAwWjBmMQswCQYDVQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUx\r\nEzARBgNVBAcTCldpbG1pbmd0b24xFDASBgNVBAoTC1JpYm9zZSBJbmMuMRkwFwYD\r\nVQQDDBAqLnJpYm9zZXRlc3QuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\r\nCgKCAQEA08DFkS\/DoUmbX8q0sANL7Wl198bFwoRXHxlXpd\/OudhMn+Og\/YqwAdyK\r\nZbeiaq494PKWdradOHTRH4m9+2\/LBvUTXHrgc9o1tr6Iu7WtJT8R9JKOI4epIkRZ\r\nyRXd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JwIIBZP3vQt37CsJY4Iq\r\nvvqempjxadLdB0SxJp02OKh42v+fUSYr624I9qVrFvQ9X7TvCl8ZrMpYPPGGi\/MP\r\nc9z3YOHf5NMBTQfZCw1T5WFZRA3nM2o9yrGYnc5TJg+G31sd+wKXKOGXt5P3ddSU\r\nAPSkVfgHeUFgoM24fhv6tSEk3WU0wtHPd855VeXXE44pgcsGUWUjEdTC1Dx6tDUu\r\n3be4D8b66CesfHzvHKbtzOe4LTVnyVxzDG8=\r\n-----END CERTIFICATE-----\r\n"
14
+ },
15
+ {
16
+ "subject_common_name":"DigiCert SHA2 Secure Server CA",
17
+ "pem":"-----BEGIN CERTIFICATE-----\r\nMIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG9w0BAQsFADBh\r\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\nd3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\r\nQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgxMjAwMDBaME0xCzAJBgNVBAYTAlVT\r\nMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRpZ2lDZXJ0IFNIQTIg\r\nU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\r\nANyuWJBNwcQwFZA1W248ghX1LFy949v\/cUP6ZCWA1O4Yok3wZtAKc24RmDYXZK83\r\nnf36QYSvx6+M\/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yrBvSqXUu3R0bd\r\nKpPDkC55gIDvEwRqFDu1m5K+wgdlTvza\/P96rtxcflUxDOg5B6TXvi\/TC2rSsd9f\r\n\/ld0Uzs1gN2ujkSYs58O09rg1\/RrKatEp0tYhG2SS4HD2nOLEpdIkARFdRrdNzGX\r\nkujNVA075ME\/OV4uuPNcfhC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/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp\/2PV5Adg\r\n06O\/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF\r\nPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls\r\nYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n-----END CERTIFICATE-----\r\n"
22
+ }
23
+ ]
24
+ }
@@ -47,6 +47,15 @@ module Digicert
47
47
  )
48
48
  end
49
49
 
50
+ def stub_digicert_order_with_immediate_issuance(cert_type, attributes)
51
+ stub_api_response(
52
+ :post,
53
+ ["order/certificate", cert_type].join("/"),
54
+ filename: "order_created_with_immediate_issuance",
55
+ status: 201,
56
+ )
57
+ end
58
+
50
59
  def stub_digicert_order_fetch_api(order_id)
51
60
  stub_api_response(
52
61
  :get, ["order/certificate", order_id].join("/"), filename: "order"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digicert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: r509
@@ -148,6 +148,7 @@ files:
148
148
  - lib/digicert/client_certificate/digital_signature_plus.rb
149
149
  - lib/digicert/client_certificate/email_security_plus.rb
150
150
  - lib/digicert/client_certificate/premium.rb
151
+ - lib/digicert/client_certificate/private_premium.rb
151
152
  - lib/digicert/config.rb
152
153
  - lib/digicert/configuration.rb
153
154
  - lib/digicert/container.rb
@@ -194,6 +195,7 @@ files:
194
195
  - spec/digicert/client_certificate/digital_signature_plus_spec.rb
195
196
  - spec/digicert/client_certificate/email_security_plus_spec.rb
196
197
  - spec/digicert/client_certificate/premium_spec.rb
198
+ - spec/digicert/client_certificate/private_premium_spec.rb
197
199
  - spec/digicert/config_spec.rb
198
200
  - spec/digicert/container_spec.rb
199
201
  - spec/digicert/container_template_spec.rb
@@ -234,6 +236,7 @@ files:
234
236
  - spec/fixtures/expiring_orders.json
235
237
  - spec/fixtures/order.json
236
238
  - spec/fixtures/order_created.json
239
+ - spec/fixtures/order_created_with_immediate_issuance.json
237
240
  - spec/fixtures/order_duplicated.json
238
241
  - spec/fixtures/order_duplications.json
239
242
  - spec/fixtures/order_reissued.json