activewarehouse-etl 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -1
- data/lib/etl/control/control.rb +20 -3
- data/lib/etl/control/source/enumerable_source.rb +12 -0
- data/lib/etl/version.rb +1 -1
- metadata +2 -1
data/CHANGELOG
CHANGED
@@ -118,4 +118,11 @@
|
|
118
118
|
ActiveRecord::Base.configurations.
|
119
119
|
* Fixed several bugs in how record change detection was implemented.
|
120
120
|
* Fixed how the read_locally functionality was implemented so that it will find that last
|
121
|
-
completed local source copy using the source's trigger file (untested).
|
121
|
+
completed local source copy using the source's trigger file (untested).
|
122
|
+
|
123
|
+
0.8.1 - Apr 12, 2007
|
124
|
+
* Added EnumerableSource
|
125
|
+
* Added :type configuration option to the source directive, allowing the source type to be
|
126
|
+
explicitly specified. The source type can be a string or symbol (in which case the class will
|
127
|
+
be constructed by appending Source to the type name), a class (which will be instantiated
|
128
|
+
and passed the control, configuration and mapping) and finally an actual Source instance.
|
data/lib/etl/control/control.rb
CHANGED
@@ -41,10 +41,27 @@ module ETL #:nodoc:
|
|
41
41
|
|
42
42
|
# Define a source.
|
43
43
|
def source(name, configuration={}, definition={})
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
if configuration[:type]
|
45
|
+
case configuration[:type]
|
46
|
+
when Class
|
47
|
+
source_class = configuration[:type]
|
47
48
|
sources << source_class.new(self, configuration, definition)
|
49
|
+
when String, Symbol
|
50
|
+
source_class = ETL::Control::Source.class_for_name(configuration[:type])
|
51
|
+
sources << source_class.new(self, configuration, definition)
|
52
|
+
else
|
53
|
+
if configuration[:type].is_a?(ETL::Control::Source)
|
54
|
+
sources << configuration[:type]
|
55
|
+
else
|
56
|
+
raise "Configuration must extend ETL::Control::Source"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
else
|
60
|
+
source_types.each do |source_type|
|
61
|
+
if configuration[source_type]
|
62
|
+
source_class = ETL::Control::Source.class_for_name(source_type)
|
63
|
+
sources << source_class.new(self, configuration, definition)
|
64
|
+
end
|
48
65
|
end
|
49
66
|
end
|
50
67
|
end
|
data/lib/etl/version.rb
CHANGED
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: activewarehouse-etl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.8.
|
6
|
+
version: 0.8.1
|
7
7
|
date: 2007-04-12 00:00:00 -04:00
|
8
8
|
summary: Pure Ruby ETL package.
|
9
9
|
require_paths:
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/etl/control/destination/database_destination.rb
|
65
65
|
- lib/etl/control/destination/file_destination.rb
|
66
66
|
- lib/etl/control/source/database_source.rb
|
67
|
+
- lib/etl/control/source/enumerable_source.rb
|
67
68
|
- lib/etl/control/source/file_source.rb
|
68
69
|
- lib/etl/execution/base.rb
|
69
70
|
- lib/etl/execution/job.rb
|