br_db 0.1.9 → 0.1.11

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
  SHA256:
3
- metadata.gz: 00a043117d7f8b456248107efbdfbeb8663924a8314816826c5b121f93ece275
4
- data.tar.gz: e4da0a54d2abcc8152b64feb921bf3c540e0228c06f26bc82ce518d046639aeb
3
+ metadata.gz: 2797923ff79f789a373c8e61927de2ce2250affca3c6e31ec3ca9255aa94b156
4
+ data.tar.gz: 89d651b3e1c87a3be3a3d8305228bc9459d1174264e4a5e0bc01d67ad60c8896
5
5
  SHA512:
6
- metadata.gz: adfc908b0cf105d7f70b38c8f2d07092e18c19706199321fd5b87c476f9e815a27a463407632ca3358ee84874bcbcf22e5432ea432e2f8cd4adea40f5c2009e6
7
- data.tar.gz: c3c54f38840e39d394dd8bcf3f5b756e29e985b8f1cf51bc5e2106f8de0f4b53d01914a0109fc5c2093fba4f766d4d1e3f62b9e1b6712edcb7ae75327ea945b9
6
+ metadata.gz: d30e38217c0d47d2d11feb94d644fbbaae7463efd0da21d854650bffc348e809e8abdcd7b53a5e381fce0f79e0109c19804dd60f5c7ad8ecd028097629540ab0
7
+ data.tar.gz: 371a0bd1c16356b7c003b147b75ce1683feac24cf3e15b99dbf8a8810ffb026eea8f992a2f45a56621bb7b267b4c077ce526f737715dcb61e86b0ad371ccf090
@@ -82,7 +82,7 @@ module BrDb
82
82
  street_name = row[8] + " " + row[5]
83
83
  zip_codes << {
84
84
  state_code: row[1],
85
- neighborhood_name: neighborhood_mapping[row[3]],
85
+ neighborhood_name: neighborhood_mapping[row[3]][0],
86
86
  street_name: street_name,
87
87
  city_name: city_mapping[row[2]][0],
88
88
  city_code: city_mapping[row[2]][1],
@@ -90,13 +90,11 @@ module BrDb
90
90
  zip_code: row[7]
91
91
  }
92
92
  end
93
- if zip_codes.count % 300 == 0
94
- ActiveRecord::Base.connection.reconnect!
93
+ if zip_codes.count % 1_000 == 0
95
94
  ZipCode.insert_all(zip_codes)
96
95
  zip_codes = []
97
96
  end
98
97
  end
99
- ActiveRecord::Base.connection.reconnect!
100
98
  ZipCode.insert_all(zip_codes)
101
99
  end
102
100
 
data/lib/br_db/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BrDb
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ulisses Caon