data_miner 0.3.3 → 0.3.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.
- data/VERSION +1 -1
- data/data_miner.gemspec +1 -1
- data/lib/data_miner/configuration.rb +4 -4
- data/lib/data_miner/target.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.4
|
data/data_miner.gemspec
CHANGED
|
@@ -35,10 +35,11 @@ module DataMiner
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
# Mine data for this class.
|
|
38
|
-
def run
|
|
38
|
+
def run(options = {})
|
|
39
39
|
target = DataMiner::Target.find(klass.name)
|
|
40
|
-
run = target.runs.create! :started_at => Time.now
|
|
41
40
|
finished = false
|
|
41
|
+
run = target.runs.create! :started_at => Time.now
|
|
42
|
+
klass.delete_all if options[:from_scratch]
|
|
42
43
|
begin
|
|
43
44
|
runnables.each { |runnable| runnable.run(run) }
|
|
44
45
|
finished = true
|
|
@@ -58,8 +59,7 @@ module DataMiner
|
|
|
58
59
|
def run(options = {})
|
|
59
60
|
classes.each do |klass|
|
|
60
61
|
if options[:class_names].blank? or options[:class_names].include?(klass.name)
|
|
61
|
-
klass.
|
|
62
|
-
klass.data_miner_config.run
|
|
62
|
+
klass.data_miner_config.run options
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
end
|
data/lib/data_miner/target.rb
CHANGED