meeting 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,9 @@
1
- require 'leap'
2
1
  require 'conversions'
3
2
 
4
3
  module BrighterPlanet
5
4
  module Meeting
6
5
  module CarbonModel
7
6
  def self.included(base)
8
- base.extend ::Leap::Subject
9
7
  base.decide :emission, :with => :characteristics do
10
8
  committee :emission do # returns kg CO2e
11
9
  quorum 'from duration, area, and emission factor', :needs => [:duration, :area, :emission_factor] do |characteristics|
@@ -1,17 +1,13 @@
1
- require 'characterizable'
2
-
3
1
  module BrighterPlanet
4
2
  module Meeting
5
3
  module Characterization
6
4
  def self.included(base)
7
- base.send :include, Characterizable
8
5
  base.characterize do
9
6
  has :area # square metres
10
7
  has :duration # hours
11
8
  has :zip_code
12
9
  has :state
13
10
  end
14
- base.add_implicit_characteristics
15
11
  end
16
12
  end
17
13
  end
data/lib/meeting/data.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'data_miner'
2
-
3
1
  module BrighterPlanet
4
2
  module Meeting
5
3
  module Data
@@ -0,0 +1,10 @@
1
+ module BrighterPlanet
2
+ module Meeting
3
+ module Fallback
4
+ def self.included(base)
5
+ base.falls_back_on :area => 12_750.square_feet.to(:square_metres), # assume median-sized meeting building
6
+ :duration => 8 # assume 1 day
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module BrighterPlanet
2
+ module Meeting
3
+ module Relationships
4
+ def self.included(base)
5
+ base.belongs_to :zip_code, :foreign_key => 'zip_code_name'
6
+ base.belongs_to :state, :foreign_key => 'state_postal_abbreviation'
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,10 +1,7 @@
1
- require 'summary_judgement'
2
-
3
1
  module BrighterPlanet
4
2
  module Meeting
5
3
  module Summarization
6
4
  def self.included(base)
7
- base.extend SummaryJudgement
8
5
  base.summarize do |has|
9
6
  has.identity 'meeting'
10
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meeting
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Rossmeissl
@@ -19,13 +19,14 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-09-20 00:00:00 -07:00
22
+ date: 2010-09-22 00:00:00 -04:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
- name: activerecord
26
+ type: :development
27
27
  prerelease: false
28
- requirement: &id001 !ruby/object:Gem::Requirement
28
+ name: activerecord
29
+ version_requirements: &id001 !ruby/object:Gem::Requirement
29
30
  none: false
30
31
  requirements:
31
32
  - - ~>
@@ -36,12 +37,12 @@ dependencies:
36
37
  - 0
37
38
  - 0
38
39
  version: 3.0.0
39
- type: :development
40
- version_requirements: *id001
40
+ requirement: *id001
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ type: :development
43
43
  prerelease: false
44
- requirement: &id002 !ruby/object:Gem::Requirement
44
+ name: bundler
45
+ version_requirements: &id002 !ruby/object:Gem::Requirement
45
46
  none: false
46
47
  requirements:
47
48
  - - ~>
@@ -52,12 +53,12 @@ dependencies:
52
53
  - 0
53
54
  - 0
54
55
  version: 1.0.0
55
- type: :development
56
- version_requirements: *id002
56
+ requirement: *id002
57
57
  - !ruby/object:Gem::Dependency
58
- name: cucumber
58
+ type: :development
59
59
  prerelease: false
60
- requirement: &id003 !ruby/object:Gem::Requirement
60
+ name: cucumber
61
+ version_requirements: &id003 !ruby/object:Gem::Requirement
61
62
  none: false
62
63
  requirements:
63
64
  - - ~>
@@ -68,12 +69,12 @@ dependencies:
68
69
  - 8
69
70
  - 3
70
71
  version: 0.8.3
71
- type: :development
72
- version_requirements: *id003
72
+ requirement: *id003
73
73
  - !ruby/object:Gem::Dependency
74
- name: jeweler
74
+ type: :development
75
75
  prerelease: false
76
- requirement: &id004 !ruby/object:Gem::Requirement
76
+ name: jeweler
77
+ version_requirements: &id004 !ruby/object:Gem::Requirement
77
78
  none: false
78
79
  requirements:
79
80
  - - ~>
@@ -84,12 +85,12 @@ dependencies:
84
85
  - 4
85
86
  - 0
86
87
  version: 1.4.0
87
- type: :development
88
- version_requirements: *id004
88
+ requirement: *id004
89
89
  - !ruby/object:Gem::Dependency
90
- name: rake
90
+ type: :development
91
91
  prerelease: false
92
- requirement: &id005 !ruby/object:Gem::Requirement
92
+ name: rake
93
+ version_requirements: &id005 !ruby/object:Gem::Requirement
93
94
  none: false
94
95
  requirements:
95
96
  - - ">="
@@ -98,12 +99,12 @@ dependencies:
98
99
  segments:
99
100
  - 0
100
101
  version: "0"
101
- type: :development
102
- version_requirements: *id005
102
+ requirement: *id005
103
103
  - !ruby/object:Gem::Dependency
104
- name: rdoc
104
+ type: :development
105
105
  prerelease: false
106
- requirement: &id006 !ruby/object:Gem::Requirement
106
+ name: rdoc
107
+ version_requirements: &id006 !ruby/object:Gem::Requirement
107
108
  none: false
108
109
  requirements:
109
110
  - - ">="
@@ -112,12 +113,12 @@ dependencies:
112
113
  segments:
113
114
  - 0
114
115
  version: "0"
115
- type: :development
116
- version_requirements: *id006
116
+ requirement: *id006
117
117
  - !ruby/object:Gem::Dependency
118
- name: rspec
118
+ type: :development
119
119
  prerelease: false
120
- requirement: &id007 !ruby/object:Gem::Requirement
120
+ name: rspec
121
+ version_requirements: &id007 !ruby/object:Gem::Requirement
121
122
  none: false
122
123
  requirements:
123
124
  - - ~>
@@ -130,12 +131,12 @@ dependencies:
130
131
  - beta
131
132
  - 17
132
133
  version: 2.0.0.beta.17
133
- type: :development
134
- version_requirements: *id007
134
+ requirement: *id007
135
135
  - !ruby/object:Gem::Dependency
136
- name: sniff
136
+ type: :development
137
137
  prerelease: false
138
- requirement: &id008 !ruby/object:Gem::Requirement
138
+ name: sniff
139
+ version_requirements: &id008 !ruby/object:Gem::Requirement
139
140
  none: false
140
141
  requirements:
141
142
  - - ~>
@@ -146,24 +147,23 @@ dependencies:
146
147
  - 1
147
148
  - 12
148
149
  version: 0.1.12
149
- type: :development
150
- version_requirements: *id008
150
+ requirement: *id008
151
151
  - !ruby/object:Gem::Dependency
152
- name: emitter
152
+ type: :runtime
153
153
  prerelease: false
154
- requirement: &id009 !ruby/object:Gem::Requirement
154
+ name: emitter
155
+ version_requirements: &id009 !ruby/object:Gem::Requirement
155
156
  none: false
156
157
  requirements:
157
158
  - - ~>
158
159
  - !ruby/object:Gem::Version
159
- hash: 7
160
+ hash: 19
160
161
  segments:
161
162
  - 0
162
- - 0
163
- - 12
164
- version: 0.0.12
165
- type: :runtime
166
- version_requirements: *id009
163
+ - 1
164
+ - 4
165
+ version: 0.1.4
166
+ requirement: *id009
167
167
  description: A software model in Ruby for the greenhouse gas emissions of a meeting
168
168
  email: andy@rossmeissl.net
169
169
  executables: []
@@ -180,6 +180,8 @@ files:
180
180
  - lib/meeting/carbon_model.rb
181
181
  - lib/meeting/characterization.rb
182
182
  - lib/meeting/data.rb
183
+ - lib/meeting/fallback.rb
184
+ - lib/meeting/relationships.rb
183
185
  - lib/meeting/summarization.rb
184
186
  - lib/test_support/db/schema.rb
185
187
  - lib/test_support/meeting_record.rb