eba 1.0.1.2 → 1.0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/eba.gemspec +1 -1
- data/lib/eba/bcb.rb +3 -3
- data/lib/eba/data.rb +2 -5
- data/lib/eba/version.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45431e76223640963ba2dba5752cde41f4a70f41
|
4
|
+
data.tar.gz: 8d61821755d8cf8fcac5beea06446747316fd8f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3ab2e5e7175f39d50807479046c229202407e54ddfa4a42a206c5fa355bb48c8615ab82e129bef587fedadc0b80d73b1f563a38912ac18f83cd83848477d82f
|
7
|
+
data.tar.gz: 402358636d8448c9e8b024b2e60d2351d70272fe40f7ad3faff256fc04480f55d028a5ed91dd4fb78c0c7629f43e5651d5f2a1c41c8947cf7c1584026aeeb7d5
|
data/eba.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Rafael Campos Cruz"]
|
10
10
|
spec.email = ["rcampos@tendencias.com.br"]
|
11
11
|
|
12
|
-
spec.summary = %q{Class which serves as interface with Brazillian Central Bank databases through the Webservice SGS - Sistema Gerenciador de Séries Temporais - v2.1. eba stands for Easy BCB Access and is also an expression of joy in Brazillian Portuguese
|
12
|
+
spec.summary = %q{Class which serves as interface with Brazillian Central Bank databases through the Webservice SGS - Sistema Gerenciador de Séries Temporais - v2.1. eba stands for Easy BCB Access and is also an expression of joy in Brazillian Portuguese.<br>}
|
13
13
|
spec.description = %q{This class was developed in a partinership with Tendencias - Consultoria Econômica, a economical analysis company from Brazil. The intent is, given that you know one or more primary keys for series inside the BCB database, you can extract updates or the full historical data of said series.\nEba stands for Easy BCB Access and is also an expression of joy in Brazillian Portuguese.}
|
14
14
|
spec.homepage = "https://github.com/rCamposCruz/eba"
|
15
15
|
spec.license = "MIT"
|
data/lib/eba/bcb.rb
CHANGED
@@ -58,7 +58,7 @@ class BCB < Encoder
|
|
58
58
|
# MES = MONTH
|
59
59
|
# ANO = YEAR
|
60
60
|
# VALOR = VALUE
|
61
|
-
return
|
61
|
+
return Data_bcb.new(encode(xmlResult.search("NOME").text),
|
62
62
|
series_code,
|
63
63
|
encode(xmlResult.search("PERIODICIDADE").text),
|
64
64
|
encode(xmlResult.search("UNIDADE").text),
|
@@ -86,7 +86,7 @@ class BCB < Encoder
|
|
86
86
|
begin
|
87
87
|
# This request has a limit of series he can get at a time, thus
|
88
88
|
# it's way simpler to break a composite requests in various smaller
|
89
|
-
# requests. The
|
89
|
+
# requests. The Data_bcb class serves as a way to organize such data
|
90
90
|
# and allow the developer to easily identify which series each data
|
91
91
|
# object pertains.
|
92
92
|
response = @service.call(:get_valores_series_xml, message: message)
|
@@ -111,7 +111,7 @@ class BCB < Encoder
|
|
111
111
|
# portuguese uses a huge ammount of special characters and
|
112
112
|
# accentuations.
|
113
113
|
result.css("ITEM").each do |item|
|
114
|
-
data_collection <<
|
114
|
+
data_collection << Data_bcb.new(encode(base_data.name),
|
115
115
|
code,
|
116
116
|
base_data.periodicity,
|
117
117
|
encode(base_data.unit),
|
data/lib/eba/data.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# This class intends to organize the series data in a easy to use way,
|
2
2
|
# making it easier to group lots of data in a coese way, without lost of
|
3
3
|
# information.
|
4
|
-
class
|
4
|
+
class Data_bcb
|
5
5
|
@name = ""
|
6
6
|
@periodicity = 0
|
7
7
|
@unit = ""
|
@@ -19,10 +19,7 @@ class DataBCB
|
|
19
19
|
@periodicity = series_periodicity
|
20
20
|
@unit = series_unit
|
21
21
|
@date = standardizes_date(series_day, series_month, series_year)
|
22
|
-
|
23
|
-
# Removes the . which separate every three numbers.
|
24
|
-
# This might be supperfluous, haven't tested it though.
|
25
|
-
@value = series_value.tr(".", "").to_f
|
22
|
+
@value = series_value.to_f
|
26
23
|
end
|
27
24
|
|
28
25
|
# Return an "identification key" with data which should
|
data/lib/eba/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Eba
|
|
6
6
|
# ff - commits on feature
|
7
7
|
# hh - commits on hotfix
|
8
8
|
|
9
|
-
VERSION = "1.0.1.
|
9
|
+
VERSION = "1.0.1.3"
|
10
10
|
|
11
11
|
#Version 1.0.0.1
|
12
12
|
#
|
@@ -21,7 +21,11 @@ module Eba
|
|
21
21
|
# spec/valid_certificate contains a certificate which is valid at this moment (2016-11-22)
|
22
22
|
|
23
23
|
#Version 1.0.1.2
|
24
|
-
# Now get_all_data_for_array also expects a valid date in the format dd/MM/YYYY
|
24
|
+
# Now get_all_data_for_array also expects a valid date in the format dd/MM/YYYY.
|
25
25
|
|
26
26
|
|
27
|
+
#Version 1.0.1.3
|
28
|
+
# Removed the removal of '.' character from value, it was actually losing data.
|
29
|
+
# Changed DataBCB class name to Data_bcb, to keep with the standard snake case.
|
30
|
+
# updated spec tests accordingly.
|
27
31
|
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.0.1.
|
4
|
+
version: 1.0.1.3
|
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: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -146,5 +146,5 @@ signing_key:
|
|
146
146
|
specification_version: 4
|
147
147
|
summary: Class which serves as interface with Brazillian Central Bank databases through
|
148
148
|
the Webservice SGS - Sistema Gerenciador de Séries Temporais - v2.1. eba stands
|
149
|
-
for Easy BCB Access and is also an expression of joy in Brazillian Portuguese
|
149
|
+
for Easy BCB Access and is also an expression of joy in Brazillian Portuguese.<br>
|
150
150
|
test_files: []
|