cubicle 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +175 -173
- data/cubicle.gemspec +6 -2
- data/cubicle.log +3 -0
- data/lib/cubicle.rb +422 -389
- data/lib/cubicle/duration.rb +43 -0
- data/lib/cubicle/measure.rb +20 -16
- data/lib/cubicle/member.rb +58 -53
- data/lib/cubicle/query.rb +16 -12
- data/lib/cubicle/version.rb +1 -1
- data/test/cubicle/cubicle_query_test.rb +29 -0
- data/test/cubicle/duration_test.rb +49 -0
- data/test/cubicles/defect_cubicle.rb +8 -2
- data/test/log/test.log +3458 -3897
- data/test/models/defect.rb +31 -0
- metadata +7 -3
data/test/models/defect.rb
CHANGED
@@ -19,6 +19,37 @@ class Defect
|
|
19
19
|
self.collection.insert(attributes)
|
20
20
|
end
|
21
21
|
|
22
|
+
def self.create_duration_test_data
|
23
|
+
time = "1/1/2000".to_time
|
24
|
+
t1,t2,t3 = time,time.advance(:days=>1),time.advance(:days=>3)
|
25
|
+
Defect.create :defect_id=>"1",
|
26
|
+
:manufacture_date=>"2010-01-01",
|
27
|
+
:manufacture_time=>"2010-01-01".to_time,
|
28
|
+
:product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
|
29
|
+
:plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
|
30
|
+
:operator=>"a",
|
31
|
+
:outcome=>"Repaired",
|
32
|
+
:cost=>0.78,
|
33
|
+
:root_cause=>:act_of_god,
|
34
|
+
:ms1=>t1,
|
35
|
+
:ms2=>t2,
|
36
|
+
:ms3=>t3
|
37
|
+
|
38
|
+
t1,t2,t3 = time, time.advance(:days=>2),time.advance(:days=>4)
|
39
|
+
Defect.create :defect_id=>"2",
|
40
|
+
:manufacture_date=>"2010-01-01",
|
41
|
+
:manufacture_time=>"2010-01-01".to_time,
|
42
|
+
:product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
|
43
|
+
:plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
|
44
|
+
:operator=>"b",
|
45
|
+
:outcome=>"Repaired",
|
46
|
+
:cost=>0.78,
|
47
|
+
:root_cause=>:act_of_god,
|
48
|
+
:ms1=>t1,
|
49
|
+
:ms2=>t2,
|
50
|
+
:ms3=>t3
|
51
|
+
end
|
52
|
+
|
22
53
|
def self.create_test_data
|
23
54
|
Defect.create :defect_id=>"1",
|
24
55
|
:manufacture_date=>"2010-01-01",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nathan Stults
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-20 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- README.rdoc
|
74
74
|
- Rakefile
|
75
75
|
- cubicle.gemspec
|
76
|
+
- cubicle.log
|
76
77
|
- lib/cubicle.rb
|
77
78
|
- lib/cubicle/aggregation.rb
|
78
79
|
- lib/cubicle/calculated_measure.rb
|
@@ -80,6 +81,7 @@ files:
|
|
80
81
|
- lib/cubicle/data_level.rb
|
81
82
|
- lib/cubicle/date_time.rb
|
82
83
|
- lib/cubicle/dimension.rb
|
84
|
+
- lib/cubicle/duration.rb
|
83
85
|
- lib/cubicle/measure.rb
|
84
86
|
- lib/cubicle/member.rb
|
85
87
|
- lib/cubicle/member_list.rb
|
@@ -95,6 +97,7 @@ files:
|
|
95
97
|
- test/cubicle/cubicle_data_test.rb
|
96
98
|
- test/cubicle/cubicle_query_test.rb
|
97
99
|
- test/cubicle/cubicle_test.rb
|
100
|
+
- test/cubicle/duration_test.rb
|
98
101
|
- test/cubicle/mongo_mapper/aggregate_plugin_test.rb
|
99
102
|
- test/cubicles/defect_cubicle.rb
|
100
103
|
- test/log/test.log
|
@@ -136,6 +139,7 @@ test_files:
|
|
136
139
|
- test/cubicle/cubicle_data_test.rb
|
137
140
|
- test/cubicle/cubicle_query_test.rb
|
138
141
|
- test/cubicle/cubicle_test.rb
|
142
|
+
- test/cubicle/duration_test.rb
|
139
143
|
- test/cubicle/mongo_mapper/aggregate_plugin_test.rb
|
140
144
|
- test/cubicles/defect_cubicle.rb
|
141
145
|
- test/models/defect.rb
|