GFunk911-dataload 0.9.2 → 0.9.4

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.
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 4
3
3
  :major: 0
4
4
  :minor: 9
@@ -1,6 +1,6 @@
1
1
  class Column
2
2
  include FromHash
3
- attr_accessor :target_name, :blk
3
+ attr_accessor :target_name, :blk, :column_type
4
4
  def target_value(row)
5
5
  row.instance_eval(&blk)
6
6
  end
@@ -27,7 +27,7 @@ class TableLoaderDSL
27
27
  real_name = name.keys.first
28
28
  end
29
29
  blk ||= lambda { |x| x.send(real_name) }
30
- loader.columns << Column.new(:target_name => real_name, :blk => blk)
30
+ loader.columns << Column.new(:target_name => real_name, :blk => blk, :column_type => type)
31
31
  end
32
32
  def method_missing(sym,*args,&b)
33
33
  if [:string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean].include?(sym)
@@ -67,7 +67,7 @@ module TableCreation
67
67
  DataloadMigration.new_migration(:cols => columns, :table_name => table_name) do
68
68
  create_table(table_name, :id => false) do |t|
69
69
  cols.each do |col|
70
- t.column col.target_name, :string
70
+ t.column col.target_name, col.column_type
71
71
  end
72
72
  end
73
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: GFunk911-dataload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Harris