eba 1.5.4 → 1.5.5

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: 70e18781b4e7031a3cebf475a35ad4931bbf2e31
4
- data.tar.gz: b379bf7d88ddcac61c492e3040eba80634fd3ff0
3
+ metadata.gz: 54d5d4b1c6ed2966e23ceb8d313d1712c839992c
4
+ data.tar.gz: 44a5f07a42affb5d8026f297f08d9b5f01651033
5
5
  SHA512:
6
- metadata.gz: 5754c4c82eab910ea7890181f0ab33437b5f57b29b7329bb758ab84038e60acca7d56573c30238705c402630866146df9c9d89aba3532b5a176eb0087cb066e5
7
- data.tar.gz: fc45392f4cebb55a6070bed677564d4cb809ace79535bec3ff058829ee86297bec7cb2bd7361e5090df9d6e599144206756347b07e547697af076a77e29adb4e
6
+ metadata.gz: 2e6d98c6c2704c20899d73321ad902659dcddeea858751c68b3fb70c7379a5ad6ae4829440d476b046b9f0d20da4024abebcc25ac72eff066be21310ff0482f2
7
+ data.tar.gz: 9360fde0abe4def5522a7fb863baa30ade21a941bb9e63a48cdcba98b5a69fb137e496842afbbfe27dbca1e1dc8438fa86e8096ba75d23ad9dd8d0933fd1e1d0
@@ -169,7 +169,7 @@ class BCB < Encoder
169
169
 
170
170
  if serie.inspect.include? comp
171
171
  serie.css("ITEM").each do |item|
172
- dia = "1"
172
+ dia = "01"
173
173
  mes = "1"
174
174
  ano = "1"
175
175
  data = item.css("DATA").text.split("/")
@@ -65,6 +65,23 @@ class Data_bcb
65
65
  # The Webservice will always supply the date in three separate fields,
66
66
  # this methods aim to convert it to a standard dd.mm.YYYY string.
67
67
  def standardizes_date(day, month, year)
68
+ if day == '' or day == nil then
69
+ day = "01"
70
+ end
71
+
72
+ if month == '' or month == nil then
73
+ month = "01"
74
+ end
75
+
76
+ if year == '' or year == nil then
77
+ year = "1900"
78
+ end
79
+
80
+ if month.to_i > 1900 then
81
+ year = month
82
+ month = "01"
83
+ end
84
+
68
85
  return "#{standardizes_number(day.to_i)}.#{standardizes_number(month.to_i)}.#{year}"
69
86
  end
70
87
 
@@ -5,7 +5,7 @@ module Eba
5
5
  # ff - commits on feature
6
6
  # hh - commits on hotfix
7
7
 
8
- VERSION = "1.5.4"
8
+ VERSION = "1.5.5"
9
9
 
10
10
  #Version 1.0.1
11
11
  #
@@ -43,4 +43,7 @@ module Eba
43
43
 
44
44
  #Version 1.5.4
45
45
  # removed encoding vor day, month and year, as they can be integers and, therefore, haven't encoding
46
+
47
+ #Version 1.5.5
48
+ # promoted small change in order to handle a weird date style which BCB uses (i.e 01.2010.1900)
46
49
  end
metadata CHANGED
@@ -1,104 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Campos Cruz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.13'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
22
  - - "~>"
25
23
  - !ruby/object:Gem::Version
26
24
  version: '1.13'
25
+ prerelease: false
26
+ type: :development
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
36
  - - "~>"
39
37
  - !ruby/object:Gem::Version
40
38
  version: '10.0'
39
+ prerelease: false
40
+ type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- requirement: !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  requirements:
52
50
  - - "~>"
53
51
  - !ruby/object:Gem::Version
54
52
  version: '3.0'
53
+ prerelease: false
54
+ type: :development
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: nokogiri
57
- requirement: !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.6'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
62
+ requirement: !ruby/object:Gem::Requirement
65
63
  requirements:
66
64
  - - "~>"
67
65
  - !ruby/object:Gem::Version
68
66
  version: '1.6'
67
+ prerelease: false
68
+ type: :development
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: savon
71
- requirement: !ruby/object:Gem::Requirement
71
+ version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.11'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
76
+ requirement: !ruby/object:Gem::Requirement
79
77
  requirements:
80
78
  - - "~>"
81
79
  - !ruby/object:Gem::Version
82
80
  version: '2.11'
81
+ prerelease: false
82
+ type: :development
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: net
85
- requirement: !ruby/object:Gem::Requirement
85
+ version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.1'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
90
+ requirement: !ruby/object:Gem::Requirement
93
91
  requirements:
94
92
  - - "~>"
95
93
  - !ruby/object:Gem::Version
96
94
  version: '0.1'
97
- description: This class was developed in a partinership with Tendencias - Consultoria
98
- Econômica, a economical analysis company from Brazil. The intent is, given that
99
- you know one or more primary keys for series inside the BCB database, you can extract
100
- updates or the full historical data of said series.<br>Eba stands for Easy BCB Access
101
- and is also an expression of joy in Brazillian Portuguese.<br>
95
+ prerelease: false
96
+ type: :development
97
+ description: 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.<br>Eba stands for Easy BCB Access and is also an expression of joy in Brazillian Portuguese.<br>
102
98
  email:
103
99
  - rcampos@tendencias.com.br
104
100
  executables: []
@@ -125,7 +121,7 @@ homepage: https://github.com/rCamposCruz/eba
125
121
  licenses:
126
122
  - MIT
127
123
  metadata: {}
128
- post_install_message:
124
+ post_install_message:
129
125
  rdoc_options: []
130
126
  require_paths:
131
127
  - lib
@@ -140,11 +136,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
136
  - !ruby/object:Gem::Version
141
137
  version: '0'
142
138
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.5.1
145
- signing_key:
139
+ rubyforge_project:
140
+ rubygems_version: 2.4.8
141
+ signing_key:
146
142
  specification_version: 4
147
- summary: Class which serves as interface with Brazillian Central Bank databases through
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.<br>
143
+ summary: 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>
150
144
  test_files: []