automobile_trip 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2009 Andy Rossmeissl
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2009 Andy Rossmeissl
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -1,17 +1,17 @@
1
- = automobile_trip
2
-
3
- Description goes here.
4
-
5
- == Note on Patches/Pull Requests
6
-
7
- * Fork the project.
8
- * Make your feature addition or bug fix.
9
- * Add tests for it. This is important so I don't break it in a
10
- future version unintentionally.
11
- * Commit, do not mess with rakefile, version, or history.
12
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
- * Send me a pull request. Bonus points for topic branches.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2010 Andy Rossmeissl. See LICENSE for details.
1
+ = automobile_trip
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
+ * Send me a pull request. Bonus points for topic branches.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2010 Andy Rossmeissl. See LICENSE for details.
@@ -9,79 +9,8 @@ module BrighterPlanet
9
9
  base.decide :emission, :with => :characteristics do
10
10
  committee :emission do
11
11
  quorum 'from fuel consumed and emission factor' do
12
- #, :needs => [:fuel_consumed, :emission_factor] do |characteristics|
13
- # characteristics[:fuel_consumed] * characteristics[:emission_factor]
14
12
  16.0
15
13
  end
16
-
17
- quorum 'default' do
18
- raise "The emission committee's default quorum should never be called"
19
- end
20
- end
21
-
22
- committee :emission_factor do
23
- quorum 'from fuel type', :needs => :fuel_type do |characteristics|
24
- # characteristics[:fuel_type].emission_factor
25
- end
26
-
27
- quorum 'default' do
28
- # AutomobileTrip.fallback.emission_factor
29
- end
30
- end
31
-
32
- committee :fuel_consumed do
33
- quorum 'from fuel cost and fuel price' do
34
- # fuel_cost / fuel_price
35
- end
36
-
37
- quorum 'from distance and fuel efficiency', :needs => [:distance, :average_fuel_efficiency] do |characteristics|
38
- # characteristics[:distance] / characteristics[:average_fuel_efficiency]
39
- end
40
- end
41
-
42
- committee :fuel_price do
43
- # quorum 'from location'
44
- #
45
- # end
46
-
47
- quorum 'from fuel type' do
48
-
49
- end
50
- end
51
-
52
- committee :distance do
53
- quorum 'from duration and speed' do
54
- # duration * speed
55
- end
56
- end
57
-
58
- committee :average_fuel_efficiency do
59
- quorum 'from variant' do # variant includes make, year, and model
60
- end
61
-
62
- quorum 'from model' do # model includes make and year
63
- end
64
-
65
- quorum 'from year' do # year includes make
66
- end
67
-
68
- quorum 'from make' do
69
- end
70
- end
71
-
72
- committee :fuel_type do
73
- quorum 'from variant' do
74
- end
75
-
76
- quorum 'from model' do
77
- end
78
-
79
- quorum 'from make' do
80
- end
81
-
82
- quorum 'default' do
83
- # AutomobileTrip.fallback.fuel_type
84
- end
85
14
  end
86
15
  end
87
16
  end
@@ -0,0 +1,65 @@
1
+ committee :emission_factor do
2
+ quorum 'from fuel type', :needs => :fuel_type do |characteristics|
3
+ # characteristics[:fuel_type].emission_factor
4
+ end
5
+
6
+ quorum 'default' do
7
+ # AutomobileTrip.fallback.emission_factor
8
+ end
9
+ end
10
+
11
+ committee :fuel_consumed do
12
+ quorum 'from fuel cost and fuel price' do
13
+ # fuel_cost / fuel_price
14
+ end
15
+
16
+ quorum 'from distance and fuel efficiency', :needs => [:distance, :average_fuel_efficiency] do |characteristics|
17
+ # characteristics[:distance] / characteristics[:average_fuel_efficiency]
18
+ end
19
+ end
20
+
21
+ committee :fuel_price do
22
+ # quorum 'from location'
23
+ #
24
+ # end
25
+
26
+ quorum 'from fuel type' do
27
+
28
+ end
29
+ end
30
+
31
+ committee :distance do
32
+ quorum 'from duration and speed' do
33
+ # duration * speed
34
+ end
35
+ end
36
+
37
+ committee :average_fuel_efficiency do
38
+ quorum 'from variant' do # variant includes make, year, and model
39
+ end
40
+
41
+ quorum 'from model' do # model includes make and year
42
+ end
43
+
44
+ quorum 'from year' do # year includes make
45
+ end
46
+
47
+ quorum 'from make' do
48
+ end
49
+ end
50
+
51
+ committee :fuel_type do
52
+ quorum 'from variant' do
53
+ end
54
+
55
+ quorum 'from model' do
56
+ end
57
+
58
+ quorum 'from make' do
59
+ end
60
+
61
+ quorum 'default' do
62
+ # AutomobileTrip.fallback.fuel_type
63
+ end
64
+ end
65
+
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automobile_trip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 0
9
- - 3
10
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
11
10
  platform: ruby
12
11
  authors:
13
12
  - Andy Rossmeissl
@@ -23,32 +22,27 @@ date: 2010-09-09 00:00:00 -04:00
23
22
  default_executable:
24
23
  dependencies:
25
24
  - !ruby/object:Gem::Dependency
26
- type: :development
27
- prerelease: false
28
25
  name: activerecord
29
- version_requirements: &id001 !ruby/object:Gem::Requirement
30
- none: false
26
+ prerelease: false
27
+ requirement: &id001 !ruby/object:Gem::Requirement
31
28
  requirements:
32
29
  - - "="
33
30
  - !ruby/object:Gem::Version
34
- hash: -1848230024
35
31
  segments:
36
32
  - 3
37
33
  - 0
38
34
  - 0
39
35
  - beta4
40
36
  version: 3.0.0.beta4
41
- requirement: *id001
42
- - !ruby/object:Gem::Dependency
43
37
  type: :development
44
- prerelease: false
38
+ version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
45
40
  name: bundler
46
- version_requirements: &id002 !ruby/object:Gem::Requirement
47
- none: false
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
48
43
  requirements:
49
44
  - - ">="
50
45
  - !ruby/object:Gem::Version
51
- hash: 62196359
52
46
  segments:
53
47
  - 1
54
48
  - 0
@@ -56,77 +50,67 @@ dependencies:
56
50
  - beta
57
51
  - 2
58
52
  version: 1.0.0.beta.2
59
- requirement: *id002
60
- - !ruby/object:Gem::Dependency
61
53
  type: :development
62
- prerelease: false
54
+ version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
63
56
  name: cucumber
64
- version_requirements: &id003 !ruby/object:Gem::Requirement
65
- none: false
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
66
59
  requirements:
67
60
  - - "="
68
61
  - !ruby/object:Gem::Version
69
- hash: 57
70
62
  segments:
71
63
  - 0
72
64
  - 8
73
65
  - 3
74
66
  version: 0.8.3
75
- requirement: *id003
76
- - !ruby/object:Gem::Dependency
77
67
  type: :development
78
- prerelease: false
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
79
70
  name: jeweler
80
- version_requirements: &id004 !ruby/object:Gem::Requirement
81
- none: false
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
82
73
  requirements:
83
74
  - - "="
84
75
  - !ruby/object:Gem::Version
85
- hash: 7
86
76
  segments:
87
77
  - 1
88
78
  - 4
89
79
  - 0
90
80
  version: 1.4.0
91
- requirement: *id004
92
- - !ruby/object:Gem::Dependency
93
81
  type: :development
94
- prerelease: false
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
95
84
  name: rake
96
- version_requirements: &id005 !ruby/object:Gem::Requirement
97
- none: false
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
98
87
  requirements:
99
88
  - - ">="
100
89
  - !ruby/object:Gem::Version
101
- hash: 3
102
90
  segments:
103
91
  - 0
104
92
  version: "0"
105
- requirement: *id005
106
- - !ruby/object:Gem::Dependency
107
93
  type: :development
108
- prerelease: false
94
+ version_requirements: *id005
95
+ - !ruby/object:Gem::Dependency
109
96
  name: rdoc
110
- version_requirements: &id006 !ruby/object:Gem::Requirement
111
- none: false
97
+ prerelease: false
98
+ requirement: &id006 !ruby/object:Gem::Requirement
112
99
  requirements:
113
100
  - - ">="
114
101
  - !ruby/object:Gem::Version
115
- hash: 3
116
102
  segments:
117
103
  - 0
118
104
  version: "0"
119
- requirement: *id006
120
- - !ruby/object:Gem::Dependency
121
105
  type: :development
122
- prerelease: false
106
+ version_requirements: *id006
107
+ - !ruby/object:Gem::Dependency
123
108
  name: rspec
124
- version_requirements: &id007 !ruby/object:Gem::Requirement
125
- none: false
109
+ prerelease: false
110
+ requirement: &id007 !ruby/object:Gem::Requirement
126
111
  requirements:
127
112
  - - "="
128
113
  - !ruby/object:Gem::Version
129
- hash: 62196417
130
114
  segments:
131
115
  - 2
132
116
  - 0
@@ -134,39 +118,36 @@ dependencies:
134
118
  - beta
135
119
  - 17
136
120
  version: 2.0.0.beta.17
137
- requirement: *id007
138
- - !ruby/object:Gem::Dependency
139
121
  type: :development
140
- prerelease: false
122
+ version_requirements: *id007
123
+ - !ruby/object:Gem::Dependency
141
124
  name: sniff
142
- version_requirements: &id008 !ruby/object:Gem::Requirement
143
- none: false
125
+ prerelease: false
126
+ requirement: &id008 !ruby/object:Gem::Requirement
144
127
  requirements:
145
128
  - - "="
146
129
  - !ruby/object:Gem::Version
147
- hash: 9
148
130
  segments:
149
131
  - 0
150
132
  - 0
151
133
  - 11
152
134
  version: 0.0.11
153
- requirement: *id008
135
+ type: :development
136
+ version_requirements: *id008
154
137
  - !ruby/object:Gem::Dependency
155
- type: :runtime
156
- prerelease: false
157
138
  name: emitter
158
- version_requirements: &id009 !ruby/object:Gem::Requirement
159
- none: false
139
+ prerelease: false
140
+ requirement: &id009 !ruby/object:Gem::Requirement
160
141
  requirements:
161
142
  - - ">="
162
143
  - !ruby/object:Gem::Version
163
- hash: 29
164
144
  segments:
165
145
  - 0
166
146
  - 0
167
147
  - 1
168
148
  version: 0.0.1
169
- requirement: *id009
149
+ type: :runtime
150
+ version_requirements: *id009
170
151
  description: A software model in Ruby for the greenhouse gas emissions of an automobile trip
171
152
  email: andy@rossmeissl.net
172
153
  executables: []
@@ -182,11 +163,9 @@ files:
182
163
  - lib/automobile_trip.rb
183
164
  - lib/automobile_trip/carbon_model.rb
184
165
  - lib/automobile_trip/characterization.rb
166
+ - lib/automobile_trip/committee_structure.rb
185
167
  - lib/automobile_trip/data.rb
186
168
  - lib/automobile_trip/summarization.rb
187
- - features/support/env.rb
188
- - features/automobile_trip_committees.feature
189
- - features/automobile_trip_emissions.feature
190
169
  has_rdoc: true
191
170
  homepage: http://github.com/brighterplanet/automobile_trip
192
171
  licenses: []
@@ -197,27 +176,23 @@ rdoc_options:
197
176
  require_paths:
198
177
  - lib
199
178
  required_ruby_version: !ruby/object:Gem::Requirement
200
- none: false
201
179
  requirements:
202
180
  - - ">="
203
181
  - !ruby/object:Gem::Version
204
- hash: 3
205
182
  segments:
206
183
  - 0
207
184
  version: "0"
208
185
  required_rubygems_version: !ruby/object:Gem::Requirement
209
- none: false
210
186
  requirements:
211
187
  - - ">="
212
188
  - !ruby/object:Gem::Version
213
- hash: 3
214
189
  segments:
215
190
  - 0
216
191
  version: "0"
217
192
  requirements: []
218
193
 
219
194
  rubyforge_project:
220
- rubygems_version: 1.3.7
195
+ rubygems_version: 1.3.6
221
196
  signing_key:
222
197
  specification_version: 3
223
198
  summary: A carbon model