cubicle 0.1.29 → 0.1.30

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.
@@ -1,104 +1,106 @@
1
- class Defect
2
- #include MongoMapper::Document
3
-
4
- #key :defect_id, String
5
- #key :manufacture_date, String
6
- #key :manufacture_time, Time
7
- #key :product, Product
8
- #key :plant, Plant
9
- #key :operator, String
10
- #key :outcome, String
11
- #key :cost, Float
12
- #key :root_cause, String
13
-
14
- def self.collection
15
- Cubicle.mongo.database["defects"]
16
- end
17
-
18
- def self.create(attributes)
19
- self.collection.insert(attributes)
20
- end
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
-
53
- def self.create_test_data
54
- Defect.create :defect_id=>"1",
55
- :manufacture_date=>"2010-01-01",
56
- :manufacture_time=>"2010-01-01".to_time,
57
- :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
58
- :plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
59
- :operator=>"Franny",
60
- :outcome=>"Repaired",
61
- :cost=>6.50,
62
- :root_cause=>:act_of_god
63
-
64
- Defect.create :defect_id=>"2",
65
- :manufacture_date=>"2010-01-05",
66
- :manufacture_time=>"2010-01-05".to_time,
67
- :product=>{:name=>"Evil's Pickling Spice",:category=>"Baking"},
68
- :plant=>{:name=>"Plant2",:address=>{:region=>"Midwest",:location=>"Des Moines, Ia"}},
69
- :operator=>"Seymour",
70
- :outcome=>"Discarded",
71
- :cost=>0.02,
72
- :root_cause=>:operator_error
73
-
74
- Defect.create :defect_id=>"3",
75
- :manufacture_date=>"2010-02-01",
76
- :manufacture_time=>"2010-02-01".to_time,
77
- :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
78
- :plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
79
- :operator=>"Zooey",
80
- :outcome=>"Consumed",
81
- :cost=>2.94,
82
- :root_cause=>:poor_judgment
83
-
84
- Defect.create :defect_id=>"4",
85
- :manufacture_date=>"2009-12-09",
86
- :manufacture_time=>"2009-12-09".to_time,
87
- :product=>{:name=>"Brush Fire Bottle Rockets",:category=>"Fireworks"},
88
- :plant=>{:name=>"Plant19",:address=>{:region=>"South",:location=>"Burmingham, Al"}},
89
- :operator=>"Buddy",
90
- :outcome=>"Repaired",
91
- :cost=>0.43,
92
- :root_cause=>:act_of_god
93
-
94
- Defect.create :defect_id=>"5",
95
- :manufacture_date=>"2010-01-01",
96
- :manufacture_time=>"2010-01-01".to_time,
97
- :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
98
- :plant=>{:name=>"Plant3",:address=>{:region=>"West",:location=>"Oakland, Ca"}},
99
- :operator=>"Franny",
100
- :outcome=>"Repaired",
101
- :cost=>12.19,
102
- :root_cause=>:defective_materials
103
- end
1
+ class Defect
2
+ #include MongoMapper::Document
3
+
4
+ #key :defect_id, String
5
+ #key :manufacture_date, String
6
+ #key :manufacture_time, Time
7
+ #key :product, Product
8
+ #key :plant, Plant
9
+ #key :operator, String
10
+ #key :outcome, String
11
+ #key :cost, Float
12
+ #key :root_cause, String
13
+
14
+ def self.collection
15
+ Cubicle.mongo.database["defects"]
16
+ end
17
+
18
+ def self.create(attributes)
19
+ self.collection.insert(attributes)
20
+ end
21
+
22
+ def self.create_duration_test_data
23
+ time = "1/1/2000".to_time
24
+ t1,t2,t3,t4 = time,time.advance(:days=>1),time.advance(:days=>3),time.advance(:days=>22)
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
+ :ms4=>t4
38
+
39
+ t1,t2,t3,t4 = time, time.advance(:days=>2),time.advance(:days=>4),time.advance(:days=>28)
40
+ Defect.create :defect_id=>"2",
41
+ :manufacture_date=>"2010-01-01",
42
+ :manufacture_time=>"2010-01-01".to_time,
43
+ :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
44
+ :plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
45
+ :operator=>"b",
46
+ :outcome=>"Repaired",
47
+ :cost=>0.78,
48
+ :root_cause=>:act_of_god,
49
+ :ms1=>t1,
50
+ :ms2=>t2,
51
+ :ms3=>t3,
52
+ :ms4=>t4
53
+ end
54
+
55
+ def self.create_test_data
56
+ Defect.create :defect_id=>"1",
57
+ :manufacture_date=>"2010-01-01",
58
+ :manufacture_time=>"2010-01-01".to_time,
59
+ :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
60
+ :plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
61
+ :operator=>"Franny",
62
+ :outcome=>"Repaired",
63
+ :cost=>6.50,
64
+ :root_cause=>:act_of_god
65
+
66
+ Defect.create :defect_id=>"2",
67
+ :manufacture_date=>"2010-01-05",
68
+ :manufacture_time=>"2010-01-05".to_time,
69
+ :product=>{:name=>"Evil's Pickling Spice",:category=>"Baking"},
70
+ :plant=>{:name=>"Plant2",:address=>{:region=>"Midwest",:location=>"Des Moines, Ia"}},
71
+ :operator=>"Seymour",
72
+ :outcome=>"Discarded",
73
+ :cost=>0.02,
74
+ :root_cause=>:operator_error
75
+
76
+ Defect.create :defect_id=>"3",
77
+ :manufacture_date=>"2010-02-01",
78
+ :manufacture_time=>"2010-02-01".to_time,
79
+ :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
80
+ :plant=>{:name=>"Plant1",:address=>{:region=>"West",:location=>"San Francisco, Ca"}},
81
+ :operator=>"Zooey",
82
+ :outcome=>"Consumed",
83
+ :cost=>2.94,
84
+ :root_cause=>:poor_judgment
85
+
86
+ Defect.create :defect_id=>"4",
87
+ :manufacture_date=>"2009-12-09",
88
+ :manufacture_time=>"2009-12-09".to_time,
89
+ :product=>{:name=>"Brush Fire Bottle Rockets",:category=>"Fireworks"},
90
+ :plant=>{:name=>"Plant19",:address=>{:region=>"South",:location=>"Burmingham, Al"}},
91
+ :operator=>"Buddy",
92
+ :outcome=>"Repaired",
93
+ :cost=>0.43,
94
+ :root_cause=>:act_of_god
95
+
96
+ Defect.create :defect_id=>"5",
97
+ :manufacture_date=>"2010-01-01",
98
+ :manufacture_time=>"2010-01-01".to_time,
99
+ :product=>{:name=>"Sad Day Moonshine",:category=>"Alcohol"},
100
+ :plant=>{:name=>"Plant3",:address=>{:region=>"West",:location=>"Oakland, Ca"}},
101
+ :operator=>"Franny",
102
+ :outcome=>"Repaired",
103
+ :cost=>12.19,
104
+ :root_cause=>:defective_materials
105
+ end
104
106
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cubicle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 33
4
+ hash: 39
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 29
10
- version: 0.1.29
9
+ - 30
10
+ version: 0.1.30
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Stults
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-06 00:00:00 -07:00
18
+ date: 2010-07-07 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency