mddb 0.0.18 → 0.0.19

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.
@@ -14,9 +14,18 @@ module Mddb::Commands
14
14
  end
15
15
 
16
16
  def local
17
- puts "Running locally..."
18
- x = Mddb::Runner.new
19
- x.run(1,2)
17
+ ARGV.shift
18
+ if ARGV.split("..").count == 2
19
+ a = ARGV.split("..").map {|d| d.to_i}
20
+ x = Mddb::Runner.new
21
+ x.run(a[0],a[1])
22
+ elsif ARGV == "all"
23
+ a = ARGV.split("..").map {|d| d.to_i}
24
+ x = Mddb::Runner.new
25
+ x.run(0,0)
26
+ else
27
+ puts "Please supply a range of frames: eg. 1..10 or use 'all'"
28
+ end
20
29
  end
21
30
  end
22
31
  ARGV.shift
@@ -19,9 +19,17 @@ module Mddb
19
19
 
20
20
  def run (start, finish)
21
21
  if self.fine?
22
- (start..finish).each do |f|
23
- puts "Running => Frame 1"
24
- self.calculations(f)
22
+ unless start == 0 or finish == 0
23
+ (start..finish).each do |f|
24
+ puts "Running => Frame #{f}"
25
+ self.calculations(f)
26
+ end
27
+ else
28
+ fids = Frame.all.map {|f| f.fid}
29
+ fids.each do |f|
30
+ puts "Running => Frame #{f}"
31
+ self.calculations(f)}
32
+ end
25
33
  end
26
34
  end
27
35
  end
@@ -33,13 +41,15 @@ module Mddb
33
41
  object_count = objects.count
34
42
  complete = 0
35
43
  failed = 0
44
+ calcs = objects.first.list_calculations
36
45
  objects.each do |o|
37
46
  begin
38
47
  o.run
39
48
  complete += 1
49
+ print "\r Models (#{i+1}/#{model_count}) => #{k} Completed #{complete}/#{object_count} Failed: #{failed}"
40
50
  rescue
41
51
  failed += 1
42
- print "\r Models (#{i}/#{model_count}) => #{k} #{complete}/#{object_count} Failed: #{failed}"
52
+ print "\r Models (#{i+1}/#{model_count}) => #{k} Completed #{complete}/#{object_count} Failed: #{failed}"
43
53
  end
44
54
  end
45
55
  print "\n"
@@ -1,3 +1,3 @@
1
1
  module Mddb
2
- VERSION = "0.0.18"
2
+ VERSION = "0.0.19"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: mddb
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.18
5
+ version: 0.0.19
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thomas Mulvaney