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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 776421f09797dbb275c0e6ac3e958f7b6ea7579d
4
- data.tar.gz: 809ecf384af893913ef37d1a8fcf6b0c8cdbaeee
3
+ metadata.gz: 1187bdbdcec5d6dfe9d9f164e46e17638b11801f
4
+ data.tar.gz: 86762e4a9a2ddd74477fe16874a76fa943165de4
5
5
  SHA512:
6
- metadata.gz: a518ec27759bff528943d9914739c0310edd7d28189f5ebaf5b30047d7ce2b7ed09a51b2f6c5740902f8c69be578fa737f49dddc493536cef3166076eb6388da
7
- data.tar.gz: e62ce3cf9c74185945b0c3f5912162709c21adcdb3d04119c49ed327caf28900e5be4284b6812d3bc1874e20e99a202a6e82ac2edea2a1143abe75916af98050
6
+ metadata.gz: d7cdef87fe0bd24341aa31515056c882cacc734e41174c05d8ccb26010d9ce4e4798c21ed48370fd7af009c076ad68cee72cff4fbeab8d7ffd6a2c4d4a19d365
7
+ data.tar.gz: '09738b288afa77c690c2cdd65a17653862244adbb313e5e2fc31a54435c3073cbd2897bdf952c4afe1be802013cbc9de0aca46ab33605b0887f69022c75c8508'
@@ -12,6 +12,7 @@ class DataIBGE
12
12
  @value = value
13
13
 
14
14
  #The standard is:
15
+ # 2 : "Mês"
15
16
  # 4 : "Trimestral Móvel"
16
17
  # 5 : "Ano"
17
18
  @periodicity = periodicity
@@ -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
- ws = classification.split('|')
58
- url += "/c#{ws[0]}/#{ws[1]}"
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)
@@ -1,5 +1,5 @@
1
1
  module Eia
2
- VERSION = "1.3.6"
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
- # Hamdles correctly monthly series.
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.3.6
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-01 00:00:00.000000000 Z
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