activerecord_data_importer 0.1.0 → 0.1.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: 6ebdc71d64176a86427eb21488dc8a88f11f203a
4
- data.tar.gz: c9529d154b5556a4cfbca919bc77df28f838bd49
3
+ metadata.gz: 569cc45259f9643c410bf2c660293351868b7767
4
+ data.tar.gz: 8b48cf3961e82cb42d276c4c150165335dcc0690
5
5
  SHA512:
6
- metadata.gz: 5304fa3f990f2989e208446494478e924ac64514d69450c0394c718e41fa63ae3f2e986a2135ac160923c1671fa0dbad90b58d9dc299c540f2c9629959a81c95
7
- data.tar.gz: e01776c4641c4b835ecdd8dbbce57a61715264a9417f4004a8cdaea5cd8981aab4bf99031ac863aba01575b95dfaade46be423750579f98798e699e648289fd1
6
+ metadata.gz: e79e853baa867a51b853572e485c09cf87f557b65a4bc8afa1ca0c28db44ee2d6cb21bace280fd36c2f59746624b888e206952b4193df506dabfb1d8945e0ff3
7
+ data.tar.gz: 026811940b9e78d57b3a1c6c744a1acd0136a01014e4a33d7440cb74699de4a2bb05f18b3f82c90259f037a8a5e9f2f9b5c68515e78ce2050c145b47090abab4
@@ -1,7 +1,7 @@
1
1
  require "csv"
2
2
  class ActiverecordDataImporter::CsvConverter
3
3
  def self.convert_csv_to_hash(filename)
4
- csvs = CSV.table(filename, header_converters: :downcase)
4
+ csvs = CSV.table(filename, header_converters: lambda { |h| h.underscore })
5
5
  hash = csvs.map do |csv|
6
6
  self.convert_attributes csv.to_h
7
7
  end
@@ -1,3 +1,3 @@
1
1
  module ActiverecordDataImporter
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_data_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ukayare
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'ActiverecordDataImporter is enable to load and import file (format is
14
14
  csv, json) for ActiveRecord''s model. For example, when you must use and import