acc 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjY3MTZkMTU3ZmEyYmVmZmM4NTMxMzQwOTg4YjYyNzVlYjliNmQyYQ==
4
+ NzIwZDgwOGIyZWYwNTgzYmM0YTQ1YzY0NzU4NjhlNzc1NjQ0OThhNw==
5
5
  data.tar.gz: !binary |-
6
- NzZkYzk0ZjQwNWQwNjJkYzZlZDlkYmEzMWRkN2RiNjJjZTUzMTIzOQ==
6
+ MjdhY2JlZTQwZGEyYzgyYzM4ZmE1NmY4YWNhMmIxNzgwNmJmNDQwYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2UyMzUxN2Q4NDM4ZjdlNGI0OTZlNTVjNWE2Zjk4NjI1NGUyOThjNjdiMWNk
10
- ZWVjNjljOWUyNzFhYjdiNDQ1OGVkMDA1Y2FmNmJhOWEyYzc4NjdkYTA4NjY5
11
- NzMyZjQ4NjkxOGRkNzdhYmFhZjZiMjY5OWMwNDkwZTgzMGQ4YWU=
9
+ ZGVjODRiY2RjNjU0YmE0MzczYmI0NzQ2OTliM2E3YWY3ZWM4NjlmNmI3NjEz
10
+ OTc3MGExMGUwMGM4NTEwZjc1ZTllNGZjNzYxYjM5ZTNjMTYxMTc5NmM2ZmRk
11
+ NjRlNTNmYmY1NjNhNmNjYWE2MzdjMWE4ZTExZWMzMzI0NDlhNTk=
12
12
  data.tar.gz: !binary |-
13
- MDAyOTkzNWQyNmVhNWZmMWRmNDdmYzk5NWY0ZmQzMTI4MDJiNmJjMTI0MTdk
14
- MTBjYTAzNmIwZmNkODgzOGJjMmZiYzYwODMzYzBhY2RmOWJhMDcxN2JkNmJl
15
- NTdlMGNkODMwYjQ1MWMxZTllMGIyNzA4YmMzOThmZDEwODUzZDc=
13
+ MTc1YTUzNDMzZGM4Yzg4YjdjYTY1NzNjNmRiMzI4MDRmMWVlMTVhM2VlZWY5
14
+ MzExZjNmNWQ5NTk0M2ExNDA3NWUyOTcxMTcyOGU5MWRlODNiNDk2ZTliZTdm
15
+ NzQyMTVmOWQzNDUyNzMwNGVlMDExZTJmZmY0OWQ0Yzk5NGRmOTg=
data/lib/acc.rb CHANGED
@@ -12,6 +12,7 @@ module Acc
12
12
  self.show_order_endpoint = 'https://api-applecareconnect-ept.apple.com/enroll-service/1.0/show-order-details'
13
13
 
14
14
  mattr_accessor :certificate
15
+ mattr_accessor :ca_certificate
15
16
  mattr_accessor :certificate_password
16
17
 
17
18
  def self.setup
@@ -20,8 +20,9 @@ class Acc::Service
20
20
  private
21
21
  def request url, data
22
22
  http_response = Curl::Easy.perform(url) do |req|
23
- req.certpassword = Acc.certificate_password if Acc.certificate_password
24
23
  req.cert = Acc.certificate
24
+ req.cacert = Acc.ca_certificate if Acc.ca_certificate
25
+ req.certpassword = Acc.certificate_password if Acc.certificate_password
25
26
  req.post_body = data
26
27
  req.headers['Content-Type'] = 'application/json'
27
28
  end
@@ -1,3 +1,3 @@
1
1
  module Acc
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud MESUREUR