eba 1.11.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/eba/bcb.rb +9 -13
  3. data/lib/eba/version.rb +5 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2026c412008409324969c24f09c9fa6b0eaf4f20
4
- data.tar.gz: 0a431597ac2a25aff61ecf8ead7b3014671d22a5
3
+ metadata.gz: bd633dc290d44d1d0e00c67f8433e978b56b4751
4
+ data.tar.gz: a90dc4745ef578231708f2b0c992c5df43a42458
5
5
  SHA512:
6
- metadata.gz: 940c9aae47a31650a110bc12e938256e107a37d5664037395dd893cf5d6bce5e77ec889fd92cd5253b275c8ac7d4223ac9d36e540fad9eb6b5557fd29fa0c485
7
- data.tar.gz: 5d4f61453fb3b7ec6efc3cba12f0967d99669adc05093d6007f4c9072f85f59751b056d71ceeed5e9eeffa3623563ef1128a6c6223f60fe2bb097b074d630d5b
6
+ metadata.gz: 1bc70d65a3047a0ed8ffe84de82f9c04bc668b0fb44e0d17f4375df2f648a50b24d1c7bc28f048391abc95be86cd4097b01af4a9c8e048b3a7f9ffea297911e2
7
+ data.tar.gz: ab7150d4118ea9f3dd05d6bb6444bcd1d5b33d61fdeb704aed52eef8cb89bd228fc6108d5b2e20593af5415dfa2b2f0901860143dbd076fc372ab48a5303da7c
@@ -10,31 +10,27 @@ class BCB < Helper
10
10
  # #
11
11
  # You MUST supply a valid certificate in order for the connection to work! #
12
12
  # The certificate you are looking for is located in this webpage: #
13
- # http://www.bcb.gov.br/?CERTDIG #
13
+ # https://www.bcb.gov.br/estabilidadefinanceira/certificacaodigital #
14
14
  # #
15
- # It will the most recent one which looks something like: #
16
- # Cadeia de CAs de *.bcb.gov.br (yyyy) #
17
- # #
18
- # You then have to generate a public key from this crt file, #
19
- # you can do so by following this StackOverflow post: #
20
- # http://stackoverflow.com/questions/5244129/use-rsa-private-key-to-generate-public-key #
15
+ # You MUST supply both the file 'bcb.gov.br (... - year)' file as the certificate AND the #
16
+ # 'Cadeia de CAs de *.bcb.gov.br (validação estendida - 2018)' file as the CA. #
21
17
  # #
22
18
  # With all this done, you will be able to access freely this #
23
19
  # service, without much hassle. Don't forget to upvote such an useful answer. #
24
20
  # #
25
21
  ################################################################################################
26
22
 
27
- def initialize(path_to_certificate)
28
- @pub_key = path_to_certificate
23
+ def initialize(path_to_certificate, path_to_ca_certificate)
24
+ @cert = path_to_certificate
25
+ @ca = path_to_ca_certificate
29
26
 
30
27
  connect_to_service()
31
28
  end
32
29
 
33
30
  def connect_to_service()
34
-
35
-
36
- @service = Savon.client({wsdl: "https://www3.bcb.gov.br/sgspub/JSP/sgsgeral/FachadaWSSGS.wsdl",
37
- ssl_cert_file: @pub_key,
31
+ @service = Savon.client({wsdl: "https://www3.bcb.gov.br/wssgs/services/FachadaWSSGS?wsdl",
32
+ ssl_cert_file: @cert,
33
+ ssl_ca_cert_file: @ca,
38
34
  headers: {'Accept-Encoding' => 'gzip, deflate'}})
39
35
  end
40
36
 
@@ -5,7 +5,7 @@ module Eba
5
5
  # ff - commits on feature
6
6
  # hh - commits on hotfix
7
7
 
8
- VERSION = "1.11.0"
8
+ VERSION = "2.0.0"
9
9
 
10
10
  #Version 1.0.1
11
11
  #
@@ -80,7 +80,10 @@ module Eba
80
80
  #Version 1.10.2
81
81
  # Adds "Socket closed" error to last value expcetion handling.
82
82
 
83
- #Versuib 1.11.0
83
+ #Version 1.11.0
84
84
  # Refactors and simplifies interactions with target webservice. Methods no longer return nil,
85
85
  # but an invalid Data_bcb object.
86
+
87
+ #Version 2.0.0
88
+ # Changes which files are used for authentication and how they are supplied to BCB class.
86
89
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Campos Cruz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement