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 CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{data_miner}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Seamus Abshere", "Andy Rossmeissl"]
@@ -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.delete_all if options[:from_scratch]
62
- klass.data_miner_config.run
62
+ klass.data_miner_config.run options
63
63
  end
64
64
  end
65
65
  end
@@ -8,8 +8,8 @@ module DataMiner
8
8
  name.constantize
9
9
  end
10
10
 
11
- def run
12
- klass.data_miner_config.run
11
+ def run(options = {})
12
+ klass.data_miner_config.run options
13
13
  end
14
14
 
15
15
  def included_in_list_of_targets
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_miner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere