bumeran 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37b2f87959c603add72f8d64e39e12a87ec98068
4
- data.tar.gz: 68d4c04eab9e76b471578b48ed65a593b500e215
3
+ metadata.gz: 73277068e5bfa42dedd97c11a5455ba7ba3fd23a
4
+ data.tar.gz: a87984ee76063a202eab429d6e1f695fea843b18
5
5
  SHA512:
6
- metadata.gz: 000aa8707ed6e7260ff625c743834181789d9e62f448a647711b275e870d97b6926bc5038f288efcba0bfb66d485997ee0b5f24c1aa488579d2562ce50c7b0ea
7
- data.tar.gz: 05af03a1ef23896601327d9ebb0c2e211f9ddee2c77660206ad2a5b9037f02ac75e6b52d39cdd4785ef0076f66edc4f9c830cf7cbe488748a1a15f7bbcc190e3
6
+ metadata.gz: 242a2fe2222264b9b0cb44a876ea660d8c28edbb44f83176ace9ffb1b22f92c553957805225a384f1024fbcad952992a425562138f2a46dab6d20d1e3dc50c7b
7
+ data.tar.gz: 540a3898d82baf3bd8b340cfe7e6d130124af397ed8fd2b1e431d5a8a3aa2af6d4342c2495a2af73126ac9e42a337924c973161d628e64f3554eca35273cf103
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bumeran (0.2.0)
4
+ bumeran (0.2.1)
5
5
  httparty (>= 0.13.3)
6
6
  rails (>= 3.2)
7
7
 
@@ -174,7 +174,7 @@ module Bumeran
174
174
  # Generation of service helpers
175
175
  SERVICES = {
176
176
  areas: {object: :area},
177
- subareas: {object: :subarea, parent: :area},
177
+ subareas: {object: :subarea, parent: :area, parent_service: :areas},
178
178
  paises: {object: :pais},
179
179
  zonas: {object: :zona, parent: :pais, parent_service: :paises},
180
180
  localidades: {object: :localidad, parent: :zona, parent_service: :zonas},
@@ -220,7 +220,7 @@ module Bumeran
220
220
  end
221
221
 
222
222
  # def self.zonas_in(pais_id)
223
- if service[:parent]
223
+ if service[:parent] && service[:parent_service]
224
224
  define_singleton_method("#{service_name}_in") do |parent_object_id|
225
225
  generic_find_all_in(service_name, service[:parent], service[:parent_service], parent_object_id)
226
226
  end
@@ -363,7 +363,9 @@ module Bumeran
363
363
  localidades_path = "/v0/empresas/locacion/zonas/#{zona_id}/localidades"
364
364
  response = self.get(localidades_path, @@options)
365
365
 
366
- Parser.parse_response_to_json(response)
366
+ json = Parser.parse_response_to_json(response)
367
+ Parser.parse_json_to_hash(json, @@localidades) # to save the localidades
368
+ Parser.parse_json_to_hash(json, {}) # to return only the localidades from the zone
367
369
  end
368
370
 
369
371
  def self.get_plan_publicaciones_in(pais_id)
@@ -1,3 +1,3 @@
1
1
  module Bumeran
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bumeran
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Fernandez