xolphin-api 1.5.0 → 1.8.0

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.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +13 -12
  3. data/.rspec +2 -2
  4. data/.rubocop.yml +28 -28
  5. data/.travis.yml +5 -5
  6. data/CHANGELOG.md +19 -0
  7. data/Gemfile +6 -6
  8. data/LICENSE.txt +21 -21
  9. data/README.md +169 -169
  10. data/Rakefile +12 -12
  11. data/bin/console +14 -14
  12. data/bin/setup +8 -8
  13. data/examples/_credentials.rb +9 -8
  14. data/examples/certificate_cancel.rb +6 -6
  15. data/examples/certificate_reissue.rb +23 -25
  16. data/examples/certificate_renew.rb +22 -22
  17. data/examples/get_notes.rb +9 -9
  18. data/examples/invoices_get.rb +7 -0
  19. data/examples/request_create_ee.rb +29 -29
  20. data/examples/request_validation_call.rb +5 -5
  21. data/examples/requests_get.rb +7 -7
  22. data/examples/send_csa_email.rb +5 -5
  23. data/examples/send_note.rb +6 -6
  24. data/lib/xolphin/api/certificate_requests/certificate_reissue.rb +47 -47
  25. data/lib/xolphin/api/certificate_requests/certificate_renew.rb +51 -51
  26. data/lib/xolphin/api/certificate_requests/create_certificate_request.rb +53 -52
  27. data/lib/xolphin/api/certificate_requests/create_ee_request.rb +28 -33
  28. data/lib/xolphin/api/client.rb +25 -21
  29. data/lib/xolphin/api/dcv_type.rb +9 -9
  30. data/lib/xolphin/api/endpoint/certificate.rb +59 -59
  31. data/lib/xolphin/api/endpoint/invoice.rb +40 -0
  32. data/lib/xolphin/api/endpoint/request.rb +90 -86
  33. data/lib/xolphin/api/endpoint/support.rb +47 -47
  34. data/lib/xolphin/api/format_type.rb +12 -12
  35. data/lib/xolphin/api/http.rb +67 -67
  36. data/lib/xolphin/api/invoice_format_type.rb +8 -0
  37. data/lib/xolphin/api/product_type.rb +9 -9
  38. data/lib/xolphin/api/responses/base.rb +43 -43
  39. data/lib/xolphin/api/responses/certificate.rb +53 -53
  40. data/lib/xolphin/api/responses/certificates.rb +25 -25
  41. data/lib/xolphin/api/responses/csr_data.rb +43 -43
  42. data/lib/xolphin/api/responses/invoice.rb +57 -0
  43. data/lib/xolphin/api/responses/invoices.rb +25 -0
  44. data/lib/xolphin/api/responses/note.rb +45 -37
  45. data/lib/xolphin/api/responses/notes.rb +23 -24
  46. data/lib/xolphin/api/responses/product.rb +53 -53
  47. data/lib/xolphin/api/responses/product_price.rb +27 -27
  48. data/lib/xolphin/api/responses/products.rb +25 -25
  49. data/lib/xolphin/api/responses/request.rb +119 -119
  50. data/lib/xolphin/api/responses/request_ee.rb +29 -29
  51. data/lib/xolphin/api/responses/request_validation.rb +37 -37
  52. data/lib/xolphin/api/responses/request_validation_domain.rb +51 -35
  53. data/lib/xolphin/api/responses/requests.rb +25 -25
  54. data/lib/xolphin/api/responses/validation_call.rb +23 -0
  55. data/lib/xolphin/api/responses/validation_calls.rb +25 -0
  56. data/lib/xolphin/api/version.rb +5 -5
  57. data/lib/xolphin/api.rb +38 -32
  58. data/xolphin-api.gemspec +25 -26
  59. metadata +17 -9
  60. data/xolphin-api-0.1.0.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8f790957461ab10603a64a29989e326f0cbd082b
4
- data.tar.gz: 0af1d2247200cd535fc67468738c4dcbe4ca363f
2
+ SHA256:
3
+ metadata.gz: 6ea86464949998e7872f71f61ef5b469c35dfb068cec1ac3e21adb8fdfed6d94
4
+ data.tar.gz: b343eac1cdfd1560dbd838a380c81a83ad2ea224f225480f23a7cc95ce7a41f7
5
5
  SHA512:
6
- metadata.gz: e0ab8d6c3bac39af024cc3e8d79012159a4902e7f7eff884e082aa0c1709a099f342ab8d10cb63b70f9fc290bda97533763e912eb8cd8754a4713660a7d33469
7
- data.tar.gz: 5a6f3cf58d25bf9ea11a57e0ee22d6bd646642fc82a6edc87c1c9eabf58cf10311f13f8b56c09b56d84e32cbd8e1fd7f3991e53c021670c03a2b6b0470cd7cea
6
+ metadata.gz: 7a8cddc0663d80351cd355641961950f7921ca0e130552d29436665b8f9f2f223d996cb16f5a50b5f69d86ac585a8e238b507241f2cdc7cbdcd7a9abd56fa0f0
7
+ data.tar.gz: '06923d52ba80d5a18019acf3f62e716bc34d0875ab2c6b3ba43650969c211cf428fca678d9fc351768d0e4519d4a2763401a3b817e1674737fb80372507bf029'
data/.gitignore CHANGED
@@ -1,12 +1,13 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .ruby-version
11
- .ruby-gemset
12
- .DS_Store
1
+ /.idea
2
+ /.bundle/
3
+ /.yardoc
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ .ruby-version
12
+ .ruby-gemset
13
+ .DS_Store
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format documentation
2
- --color
1
+ --format documentation
2
+ --color
data/.rubocop.yml CHANGED
@@ -1,28 +1,28 @@
1
- # Xolphin-API RuboCop configuration
2
-
3
- AllCops:
4
- TargetRubyVersion: 2.2
5
- DisplayCopNames: true
6
- DisplayStyleGuide: true
7
-
8
- Metrics/AbcSize:
9
- Enabled: false
10
-
11
- Metrics/LineLength:
12
- Enabled: false
13
-
14
- Metrics/MethodLength:
15
- Enabled: false
16
-
17
- Style/Documentation:
18
- Enabled: false
19
-
20
- Style/NumericLiterals:
21
- Exclude:
22
- - 'spec/**/*.rb'
23
-
24
- Style/MutableConstant:
25
- Enabled: false
26
-
27
- Style/StringLiterals:
28
- Enabled: false
1
+ # Xolphin-API RuboCop configuration
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.2
5
+ DisplayCopNames: true
6
+ DisplayStyleGuide: true
7
+
8
+ Metrics/AbcSize:
9
+ Enabled: false
10
+
11
+ Metrics/LineLength:
12
+ Enabled: false
13
+
14
+ Metrics/MethodLength:
15
+ Enabled: false
16
+
17
+ Style/Documentation:
18
+ Enabled: false
19
+
20
+ Style/NumericLiterals:
21
+ Exclude:
22
+ - 'spec/**/*.rb'
23
+
24
+ Style/MutableConstant:
25
+ Enabled: false
26
+
27
+ Style/StringLiterals:
28
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.5
5
- before_install: gem install bundler -v 1.13.6
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.5
5
+ before_install: gem install bundler -v 1.13.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## [1.8.0] - 2020-03-02
5
+ ### Added
6
+ - Certificate Requests: Support the new validation information from Comodo
7
+ - Certificate Requests: Added method for cancelling a request
8
+ - Certificate Requests: Added some missing properties
9
+ - Certificate Requests: Added support for scheduling validation calls
10
+ - Invoices: Added invoices endpoints
11
+
12
+ ## [1.5.0] - 2017-06-07
13
+ ### Added
14
+ - Certificates: Reissue and renewal of certificates
15
+ - Certificate Requests: Get and send notes linked to an order
16
+ - Certificate Requests: Send Subscriber Agreement
17
+ - Certificate Requests: Resend DCV email
18
+ - Certificate Requests: You can now send a language parameter with the request, which will be used for (eg) the Subscriber Agreement
19
+ - Certificate Requests: A new field 'brandValidation' is added, which is used to indicate if the request is being held for review due to specific brand names
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in xolphin-api.gemspec
4
- gemspec
5
-
6
- gem 'rubocop', '~> 0.45.0'
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in xolphin-api.gemspec
4
+ gemspec
5
+
6
+ gem 'rubocop', '~> 0.45.0'
data/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Kentaa
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Kentaa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,169 +1,169 @@
1
- # Xolphin API gem for Ruby
2
- xolphin-api-ruby is a library which allows quick integration of the [Xolphin REST API](https://api.xolphin.com) in Ruby to automated ordering, issuance and installation of SSL Certificates.
3
-
4
- ## About Xolphin
5
- [Xolphin](https://www.xolphin.nl/) is the largest supplier of [SSL Certificates](https://www.sslcertificaten.nl) and [Digital Signatures](https://www.digitalehandtekeningen.nl) in the Netherlands. Xolphin has
6
- a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Comodo, GeoTrust, GlobalSign, Thawte and Symantec.
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- ```ruby
13
- gem 'xolphin-api'
14
- ```
15
-
16
- And then execute:
17
-
18
- $ bundle
19
-
20
- Or install it yourself as:
21
-
22
- $ gem install xolphin-api
23
-
24
- ## Usage
25
-
26
- ### Client initialization
27
-
28
- ```ruby
29
- require 'xolphin/api'
30
-
31
- client = Xolphin::Api::Client.new('<username>', '<password>')
32
- ```
33
-
34
- ### Requests
35
-
36
- #### Getting list of requests
37
-
38
- ```ruby
39
- requests = client.request.all
40
- requests.each do |request|
41
- puts request.id, request.product.id
42
- end
43
- ```
44
-
45
- #### Getting request by ID
46
-
47
- ```ruby
48
- request = client.request.get(960000024)
49
- puts request.product.brand
50
- ```
51
-
52
- #### Requesting certificate
53
-
54
- ```ruby
55
- ccr = client.request.create(24, 1, 'csr string', Xolphin::Api::DcvType::EMAIL)
56
- ccr.address = 'Address'
57
- ccr.approver_first_name = 'FirstName'
58
- ccr.approver_last_name = 'LastName'
59
- ccr.approver_phone = '+12345678901'
60
- ccr.approver_email = 'email@domain.com'
61
- ccr.zipcode = '123456'
62
- ccr.city = 'City'
63
- ccr.company = 'Company'
64
- ccr.subject_alternative_names = ['test1.domain.com', 'test2.domain.com']
65
- ccr.dcv = [{
66
- 'domain' => 'test1.domain.com',
67
- 'dcvType' => Xolphin::Api::DcvType::EMAIL,
68
- 'approverEmail' => 'email@domain.com'
69
- }]
70
-
71
- request = client.request.send(ccr)
72
- puts request.id
73
- ```
74
-
75
- #### Reissue certificate
76
-
77
- ```ruby
78
- certificate = client.certificate.get(<certificate_id>);
79
- request = Xolphin::Api::CertificateRequests::ReissueCertificateRequest.new(<csr_string>,"EMAIL")
80
- client.certificate.reissue(certificate.id, request)
81
- ```
82
-
83
- #### Renew certificate
84
-
85
- ```ruby
86
- certificate = client.certificate.get(<certificate_id>);
87
- request = Xolphin::Api::CertificateRequests::RenewCertificateRequest.new(certificate.product.id, <years>, <csr_string>, 'FILE')
88
- client.certificate.renew(certificate.id, request)
89
- ```
90
-
91
- #### Create a note
92
-
93
- ```ruby
94
- result = client.request.sendNote(1234, 'message')
95
- ```
96
-
97
- #### Get list of notes
98
-
99
- ```ruby
100
- result = client.request.getNotes(1234)
101
- result.notes.each do |note|
102
- puts note.message_body, note.created_at
103
- end
104
- ```
105
-
106
- #### Send a "Comodo Subscriber Agreement" email
107
-
108
- ```ruby
109
- # currently available languages: en, de, fr, nl
110
- result = client.request.sendComodoSAEmail(1234, 'email@example.com', '<language>');
111
- ```
112
-
113
- #### Request an "Encryption Everywhere" certificate
114
- ```ruby
115
- request = client.request.createEE
116
- request.csr = "<csr_string>"
117
- request.approver_first_name = "FirstName"
118
- request.approver_last_name = "LastName"
119
- request.approver_phone = "+1234567890"
120
- request.approver_email = "email@domain.com"
121
- request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
122
- request.dcv_type = "FILE"
123
- response = client.request.sendEE(request)
124
- ```
125
-
126
- ### Certificate
127
-
128
- #### Certificates list and expirations
129
-
130
- ```ruby
131
- certificates = client.certificate.all
132
- certificates.each do |certificate|
133
- puts certificate.id, certificate.expired?
134
- end
135
- ```
136
-
137
- #### Download certificate
138
-
139
- ```ruby
140
- certificate = client.certificate.download(960000031, Xolphin::Api::FormatType::CRT)
141
- File.write('crt.crt', certificate)
142
- ```
143
-
144
- ### Support
145
-
146
- #### Products list
147
-
148
- ```ruby
149
- products = client.support.products
150
- products.each do |product|
151
- puts product.id, product.brand
152
- end
153
- ```
154
-
155
- #### Decode CSR
156
-
157
- ```ruby
158
- data = client.support.decode_csr('csr string')
159
- puts data.type, data.size
160
- ```
161
-
162
- ## Contributing
163
-
164
- Bug reports and pull requests are welcome on GitHub at https://github.com/xolphin/xolphin-api-ruby.
165
-
166
-
167
- ## License
168
-
169
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
1
+ # Xolphin API gem for Ruby
2
+ xolphin-api-ruby is a library which allows quick integration of the [Xolphin REST API](https://api.xolphin.com) in Ruby to automated ordering, issuance and installation of SSL Certificates.
3
+
4
+ ## About Xolphin
5
+ [Xolphin](https://www.xolphin.nl/) is the largest supplier of [SSL Certificates](https://www.sslcertificaten.nl) and [Digital Signatures](https://www.digitalehandtekeningen.nl) in the Netherlands. Xolphin has
6
+ a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Sectigo (formely Comodo), GeoTrust, GlobalSign, Thawte and Symantec.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'xolphin-api'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install xolphin-api
23
+
24
+ ## Usage
25
+
26
+ ### Client initialization
27
+
28
+ ```ruby
29
+ require 'xolphin/api'
30
+
31
+ client = Xolphin::Api::Client.new('<username>', '<password>')
32
+ ```
33
+
34
+ ### Requests
35
+
36
+ #### Getting list of requests
37
+
38
+ ```ruby
39
+ requests = client.request.all
40
+ requests.each do |request|
41
+ puts request.id, request.product.id
42
+ end
43
+ ```
44
+
45
+ #### Getting request by ID
46
+
47
+ ```ruby
48
+ request = client.request.get(960000024)
49
+ puts request.product.brand
50
+ ```
51
+
52
+ #### Requesting certificate
53
+
54
+ ```ruby
55
+ ccr = client.request.create(24, 1, 'csr string', Xolphin::Api::DcvType::EMAIL)
56
+ ccr.address = 'Address'
57
+ ccr.approver_first_name = 'FirstName'
58
+ ccr.approver_last_name = 'LastName'
59
+ ccr.approver_phone = '+12345678901'
60
+ ccr.approver_email = 'email@domain.com'
61
+ ccr.zipcode = '123456'
62
+ ccr.city = 'City'
63
+ ccr.company = 'Company'
64
+ ccr.subject_alternative_names = ['test1.domain.com', 'test2.domain.com']
65
+ ccr.dcv = [{
66
+ 'domain' => 'test1.domain.com',
67
+ 'dcvType' => Xolphin::Api::DcvType::EMAIL,
68
+ 'approverEmail' => 'email@domain.com'
69
+ }]
70
+
71
+ request = client.request.send(ccr)
72
+ puts request.id
73
+ ```
74
+
75
+ #### Reissue certificate
76
+
77
+ ```ruby
78
+ certificate = client.certificate.get(<certificate_id>);
79
+ request = Xolphin::Api::CertificateRequests::ReissueCertificateRequest.new(<csr_string>,"EMAIL")
80
+ client.certificate.reissue(certificate.id, request)
81
+ ```
82
+
83
+ #### Renew certificate
84
+
85
+ ```ruby
86
+ certificate = client.certificate.get(<certificate_id>);
87
+ request = Xolphin::Api::CertificateRequests::RenewCertificateRequest.new(certificate.product.id, <years>, <csr_string>, 'FILE')
88
+ client.certificate.renew(certificate.id, request)
89
+ ```
90
+
91
+ #### Create a note
92
+
93
+ ```ruby
94
+ result = client.request.sendNote(1234, 'message')
95
+ ```
96
+
97
+ #### Get list of notes
98
+
99
+ ```ruby
100
+ result = client.request.getNotes(1234)
101
+ result.notes.each do |note|
102
+ puts note.message_body, note.created_at
103
+ end
104
+ ```
105
+
106
+ #### Send a "Comodo Subscriber Agreement" email
107
+
108
+ ```ruby
109
+ # currently available languages: en, de, fr, nl
110
+ result = client.request.sendComodoSAEmail(1234, 'email@example.com', '<language>');
111
+ ```
112
+
113
+ #### Request an "Encryption Everywhere" certificate
114
+ ```ruby
115
+ request = client.request.createEE
116
+ request.csr = "<csr_string>"
117
+ request.approver_first_name = "FirstName"
118
+ request.approver_last_name = "LastName"
119
+ request.approver_phone = "+1234567890"
120
+ request.approver_email = "email@domain.com"
121
+ request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
122
+ request.dcv_type = "FILE"
123
+ response = client.request.sendEE(request)
124
+ ```
125
+
126
+ ### Certificate
127
+
128
+ #### Certificates list and expirations
129
+
130
+ ```ruby
131
+ certificates = client.certificate.all
132
+ certificates.each do |certificate|
133
+ puts certificate.id, certificate.expired?
134
+ end
135
+ ```
136
+
137
+ #### Download certificate
138
+
139
+ ```ruby
140
+ certificate = client.certificate.download(960000031, Xolphin::Api::FormatType::CRT)
141
+ File.write('crt.crt', certificate)
142
+ ```
143
+
144
+ ### Support
145
+
146
+ #### Products list
147
+
148
+ ```ruby
149
+ products = client.support.products
150
+ products.each do |product|
151
+ puts product.id, product.brand
152
+ end
153
+ ```
154
+
155
+ #### Decode CSR
156
+
157
+ ```ruby
158
+ data = client.support.decode_csr('csr string')
159
+ puts data.type, data.size
160
+ ```
161
+
162
+ ## Contributing
163
+
164
+ Bug reports and pull requests are welcome on GitHub at https://github.com/xolphin/xolphin-api-ruby.
165
+
166
+
167
+ ## License
168
+
169
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,12 +1,12 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
-
5
- # Endpoint specs make an actual HTTP requests so we exclude them from CI.
6
- RSpec::Core::RakeTask.new(:spec) do |t|
7
- t.rspec_opts = "--tag ~endpoint"
8
- end
9
-
10
- RuboCop::RakeTask.new(:rubocop)
11
-
12
- task default: [:spec, :rubocop]
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "rubocop/rake_task"
4
+
5
+ # Endpoint specs make an actual HTTP requests so we exclude them from CI.
6
+ RSpec::Core::RakeTask.new(:spec) do |t|
7
+ t.rspec_opts = "--tag ~endpoint"
8
+ end
9
+
10
+ RuboCop::RakeTask.new(:rubocop)
11
+
12
+ task default: [:spec, :rubocop]
data/bin/console CHANGED
@@ -1,14 +1,14 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "xolphin/api"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "xolphin/api"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup CHANGED
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,8 +1,9 @@
1
- class Credentials
2
- def self.username
3
- 'nikita@xolphin.nl'
4
- end
5
- def self.password
6
- 'test1234'
7
- end
8
- end
1
+ class Credentials
2
+ def self.username
3
+ '<your-username>'
4
+ end
5
+
6
+ def self.password
7
+ '<your-super-secure-password>'
8
+ end
9
+ end
@@ -1,6 +1,6 @@
1
- require_relative "../lib/xolphin/api"
2
- require_relative "credentials"
3
-
4
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
- result = client.certificate.cancel(960003013, 'idk', false);
6
- puts result.inspect
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "credentials"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
+ result = client.certificate.cancel(960_003_013, 'idk', false)
6
+ puts result.inspect