eia 1.3.6 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eia/data.rb +1 -0
- data/lib/eia/ibge.rb +5 -3
- data/lib/eia/version.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1187bdbdcec5d6dfe9d9f164e46e17638b11801f
|
4
|
+
data.tar.gz: 86762e4a9a2ddd74477fe16874a76fa943165de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7cdef87fe0bd24341aa31515056c882cacc734e41174c05d8ccb26010d9ce4e4798c21ed48370fd7af009c076ad68cee72cff4fbeab8d7ffd6a2c4d4a19d365
|
7
|
+
data.tar.gz: '09738b288afa77c690c2cdd65a17653862244adbb313e5e2fc31a54435c3073cbd2897bdf952c4afe1be802013cbc9de0aca46ab33605b0887f69022c75c8508'
|
data/lib/eia/data.rb
CHANGED
data/lib/eia/ibge.rb
CHANGED
@@ -24,7 +24,7 @@ class IBGE
|
|
24
24
|
# territorial_leve : a string in the form n_lvl+0|territories_0;n_lvl_1|territories_1;...
|
25
25
|
# where n_lvl_k is a number from 1 to 6 and territories_i is a valid
|
26
26
|
# string form specifying terriories
|
27
|
-
# classification : a string in the form c_lvl_k | list_of_products
|
27
|
+
# classification : a string in the form c_lvl_k | list_of_products; c_lvl_j | list_of_products; ...
|
28
28
|
def get_series(code, period, variables, territorial_level, classification)
|
29
29
|
url = @webservice_url + "/values"
|
30
30
|
|
@@ -54,8 +54,10 @@ class IBGE
|
|
54
54
|
end
|
55
55
|
|
56
56
|
if classification != '' and classification != nil then
|
57
|
-
|
58
|
-
|
57
|
+
classification.split(';').each do |word|
|
58
|
+
ws = word.split('|')
|
59
|
+
url += "/c#{ws[0]}/#{ws[1]}"
|
60
|
+
end
|
59
61
|
end
|
60
62
|
|
61
63
|
return consume_json(Net::HTTP.get(URI(url)), code)
|
data/lib/eia/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Eia
|
2
|
-
VERSION = "1.
|
2
|
+
VERSION = "1.4.6"
|
3
3
|
|
4
4
|
#Standard for version: xx.yy.zz
|
5
5
|
# xx - release
|
@@ -48,5 +48,8 @@ module Eia
|
|
48
48
|
# Expanded spec tests.
|
49
49
|
|
50
50
|
# Version 1.3.6
|
51
|
-
#
|
51
|
+
# Handles correctly monthly series.
|
52
|
+
|
53
|
+
# Version 1.4.6
|
54
|
+
# Adds support for multiple classifications.
|
52
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rCamposCruz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|