dbx 0.2.0 → 0.2.1

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: b769b3b6e3be916660bd21df6ccbdaaedf31558c
4
- data.tar.gz: e67cdb52aca07a0035884c3866697d32327dd956
3
+ metadata.gz: 525a1090df1d4a2bdb7ab5344713feb61fcd0472
4
+ data.tar.gz: fd898cfa3ad0dd9828fce7e9298d4b5e96b1a80a
5
5
  SHA512:
6
- metadata.gz: c2b8a54503f2b6487553d7e7551268de810eb15c7b80632ec1d3b7c3b30d2b9b037384b4c506e6be5263dfe6c6ca871503470d64ee48c3dc42a00546b4fc19d1
7
- data.tar.gz: 25024c1049ba266994d6113d21f4fb0fcddb6a40e108bf687a5ba37d72702d58fdb493db376c33beedc345bca2f7edc5d11382d07ffde9d6f8224845ecd9e575
6
+ metadata.gz: b9b291215ec8b30f1b18bf3c61a8496a1d48333aa7f07c53712fe9b0916fc308ed3d90b7255e2a77ec21bc847c4a008f2235584d859233942b04dc01e8038f60
7
+ data.tar.gz: 9bef8ebe53be8555925dda68849927e2345e553527046e8fd10940484e499a47762fc5949b9a994071d4d0302c51769f15f7bbad27790b27d3793d951bdf93d8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dbx (0.1.2)
4
+ dbx (0.2.1)
5
5
  activerecord (~> 4.0)
6
6
  activesupport (~> 4.0)
7
7
  thor
data/README.md CHANGED
@@ -8,7 +8,7 @@ We currently only support Postgres database, but others will be supported soon.
8
8
 
9
9
  ### Import CSV file into database
10
10
 
11
- Column type detection is performed based on column contents. By default the new table name will be the file name minus its extension, indexes are added to column ending with `_id$`.
11
+ Column type detection is performed based on column contents. By default the new table name will be the file name minus its extension, indexes are added to column matching `^(\w+_id|id)$`.
12
12
 
13
13
  ```sh
14
14
  dbx import path/to/data.csv --name data_v1 --db postgres://localhost/scratch --column-patterns _ref$:string
data/lib/dbx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dbx
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
data/lib/dbx.rb CHANGED
@@ -132,7 +132,7 @@ module DBX
132
132
 
133
133
  CSV.foreach(src, **csv_options) do |row|
134
134
  unless headers
135
- headers = row
135
+ headers = row.map(&:downcase)
136
136
  next
137
137
  end
138
138
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbx
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
  - Scott Pierce