ctoD 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ctoD/db.rb +2 -2
  3. data/lib/ctoD/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87b174bf90e50bae5cb6b5238e4d263a6fb2f121
4
- data.tar.gz: 1b43e67c04b7a8ac75d280a62d7066fbfe363e6b
3
+ metadata.gz: e659f7965bf040105156fef5a58e1ba45cbe0b67
4
+ data.tar.gz: 4fb16794c736fc8861e8447abf4fd532d95ed28b
5
5
  SHA512:
6
- metadata.gz: 9aada956195632164e777ff056640c97cefa55cfff5fcdb91edc3e14c1858ab0745752e561531c1fe7d97245718a9aec06b62a8b3f694e3a5639b23b33d85a83
7
- data.tar.gz: 353302379102133640298d986812b1b82b731f1ce63788f6e441c2315836834d75d780a92b78431603b1a6e6c25b49536589aacf58919c4a4767d2862faa6fad
6
+ metadata.gz: ba3bb7e0ecf2990306b8e63c671eecdb8d6a6e311f01ef6698f8cacc59486b8d8e1475ae50f34ba40841f282a4624c376d15e550a96d551b395694b30b1dfae0
7
+ data.tar.gz: b571ad050e1a6288fe93891ff83aae43ce791e301522c6708a4e37f416dcc0451483b01efcbe65c128dd0fe977c67853f025801945d553ca5e72195f793785c4
@@ -11,7 +11,7 @@ module CtoD
11
11
  def initialize(csv, uri, string_size:100)
12
12
  @table_name = File.basename(csv, '.csv').intern
13
13
  @class_name = singularize(@table_name).capitalize
14
- @csv = CSV.table(csv)
14
+ @csv = CSV.table(csv, header_converters:->h{h.strip})
15
15
  @string_size = string_size
16
16
  @uri = DB.connect(uri)
17
17
  end
@@ -58,7 +58,7 @@ module CtoD
58
58
 
59
59
  private
60
60
  def column_types
61
- is_date = /^\s*\d{1,4}(\-|\/)?\d{1,2}(\-|\/)?\d{1,2}\s*$/
61
+ is_date = /^\s*\d{1,4}(\-|\/)\d{1,2}(\-|\/)\d{1,2}\s*$/
62
62
  @csv.first.to_hash.inject([]) do |mem, (k, v)|
63
63
  mem << begin
64
64
  case v
@@ -1,3 +1,3 @@
1
1
  module CtoD
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ctoD
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyoendo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-12 00:00:00.000000000 Z
11
+ date: 2013-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor