scad4r 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/scad4r/result_parser.rb
CHANGED
@@ -1,21 +1,24 @@
|
|
1
1
|
module Scad4r
|
2
2
|
class ResultParser
|
3
3
|
def parse(result)
|
4
|
+
parse_timings(result).merge(parse_messages(result))
|
5
|
+
end
|
6
|
+
|
7
|
+
protected
|
8
|
+
def parse_messages(result)
|
4
9
|
case result
|
5
10
|
when %r{Parser error in line (\d+): (.*)$}
|
6
11
|
{error: "#{$2} line #{$1}"}
|
7
12
|
when %r{Object isn't}
|
8
13
|
{error: result}
|
9
14
|
when %r{WARNING:}, %r{ECHO:}
|
10
|
-
|
11
|
-
|
12
|
-
echos: extract_echos(result)})
|
15
|
+
{ warnings: extract_warnings(result),
|
16
|
+
echos: extract_echos(result)}
|
13
17
|
else
|
14
|
-
|
18
|
+
{}
|
15
19
|
end
|
16
20
|
end
|
17
21
|
|
18
|
-
protected
|
19
22
|
def extract_warnings(result)
|
20
23
|
find_messages(result, "WARNING")
|
21
24
|
end
|
@@ -24,7 +27,7 @@ module Scad4r
|
|
24
27
|
find_messages(result, "ECHO")
|
25
28
|
end
|
26
29
|
|
27
|
-
def
|
30
|
+
def parse_timings(result)
|
28
31
|
{real: extract_time(result, :real),
|
29
32
|
user: extract_time(result, :user),
|
30
33
|
sys: extract_time(result, :sys)
|
data/scad4r.gemspec
CHANGED
@@ -114,7 +114,7 @@ END
|
|
114
114
|
context "with timings" do
|
115
115
|
|
116
116
|
let(:scad_result) { <<-END
|
117
|
-
CGAL Cache insert: import(file=\"../Huxley/Print-Huxley/Indi (1728992 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,20],[0,1,0,0],[0,0,1, (1728992 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,20],[0,1,0,0] (1728992 bytes)\nCGAL Cache insert: group(){group(){multmatrix([[1,0,0,20],[ (1728992 bytes)\nCGAL Cache insert: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,7.5],[0,1,0,2.9],[0,0 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,32.5],[0,1,0,2.9],[0, (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,32.5],[0,1,0,25.9],[0 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,7.5],[0,1,0,25.9],[0, (62712 bytes)\nCGAL Cache insert: cube(size=[3,3,5],center=false); (10872 bytes)\nCGAL Cache insert: multmatrix([[0.707107,-0.707107,0,0],[0. (10872 bytes)\nCGAL Cache hit: multmatrix([[0.707107,-0.707107,0,0],[0. (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,-1.06066],[0,1,0,-2.1 (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,41.0607],[0,1,0,-2.12 (10872 bytes)\nCGAL Cache insert: cube(size=[5.83095,5.83095,5],center=fal (10872 bytes)\nCGAL Cache insert: multmatrix([[0.857493,-0.514496,0,0],[0. (10872 bytes)\nCGAL Cache hit: cube(size=[5.83095,5.83095,5],center=fal (10872 bytes)\nCGAL Cache insert: multmatrix([[0.514496,-0.857493,0,0],[0. (10872 bytes)\nCGAL Cache insert: cube(size=[40,28.8,5],center=false); (10872 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,7.5],[0,1,0,2 (250560 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,-1.06066],[0, (21648 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,0],[0,1,0,25.8],[0,0, (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,40],[0,1,0,25.8],[0,0 (10872 bytes)\nCGAL Cache insert: difference(){cube(size=[40,28.8,5],cente (273048 bytes)\nCGAL Cache hit: group(){group(){multmatrix([[1,0,0,20],[ (1728992 bytes)\nCGAL Cache hit: difference(){cube(size=[40,28.8,5],cente (273048 bytes)\nCGAL Cache insert: group(){difference(){cube(size=[40,28.8, (273048 bytes)\nCGAL Cache insert: difference(){group(){group(){multmatrix( (1190904 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,-60],[0,1,0,0],[0,0,1 (1728992 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,60],[0,1,0,0],[0,0,1, (1190904 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,-60],[0,1,0,0 (3192752 bytes)\n 52.44 real 48.14 user 0.34 sys
|
117
|
+
CGAL Cache insert: import(file=\"../Huxley/Print-Huxley/Indi (1728992 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,20],[0,1,0,0],[0,0,1, (1728992 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,20],[0,1,0,0] (1728992 bytes)\nCGAL Cache insert: group(){group(){multmatrix([[1,0,0,20],[ (1728992 bytes)\nCGAL Cache insert: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache hit: cylinder($fn=24,$fa=12,$fs=2,h=5,r1=1.65 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,7.5],[0,1,0,2.9],[0,0 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,32.5],[0,1,0,2.9],[0, (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,32.5],[0,1,0,25.9],[0 (62712 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,7.5],[0,1,0,25.9],[0, (62712 bytes)\nCGAL Cache insert: cube(size=[3,3,5],center=false); (10872 bytes)\nCGAL Cache insert: multmatrix([[0.707107,-0.707107,0,0],[0. (10872 bytes)\nCGAL Cache hit: multmatrix([[0.707107,-0.707107,0,0],[0. (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,-1.06066],[0,1,0,-2.1 (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,41.0607],[0,1,0,-2.12 (10872 bytes)\nCGAL Cache insert: cube(size=[5.83095,5.83095,5],center=fal (10872 bytes)\nCGAL Cache insert: multmatrix([[0.857493,-0.514496,0,0],[0. (10872 bytes)\nCGAL Cache hit: cube(size=[5.83095,5.83095,5],center=fal (10872 bytes)\nCGAL Cache insert: multmatrix([[0.514496,-0.857493,0,0],[0. (10872 bytes)\nCGAL Cache insert: cube(size=[40,28.8,5],center=false); (10872 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,7.5],[0,1,0,2 (250560 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,-1.06066],[0, (21648 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,0],[0,1,0,25.8],[0,0, (10872 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,40],[0,1,0,25.8],[0,0 (10872 bytes)\nCGAL Cache insert: difference(){cube(size=[40,28.8,5],cente (273048 bytes)\nCGAL Cache hit: group(){group(){multmatrix([[1,0,0,20],[ (1728992 bytes)\nCGAL Cache hit: difference(){cube(size=[40,28.8,5],cente (273048 bytes)\nCGAL Cache insert: group(){difference(){cube(size=[40,28.8, (273048 bytes)\nCGAL Cache insert: difference(){group(){group(){multmatrix( (1190904 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,-60],[0,1,0,0],[0,0,1 (1728992 bytes)\nCGAL Cache insert: multmatrix([[1,0,0,60],[0,1,0,0],[0,0,1, (1190904 bytes)\nCGAL Cache insert: group(){multmatrix([[1,0,0,-60],[0,1,0,0 (3192752 bytes)\nObject isn't a valid 2-manifold! Modify your design.\n 52.44 real 48.14 user 0.34 sys
|
118
118
|
END
|
119
119
|
}
|
120
120
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: scad4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Caleb Buxton
|
@@ -270,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
270
270
|
- !ruby/object:Gem::Version
|
271
271
|
segments:
|
272
272
|
- 0
|
273
|
-
hash:
|
273
|
+
hash: -4455288905944912835
|
274
274
|
version: '0'
|
275
275
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
276
|
none: false
|