flight 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/features/flight_committees.feature +92 -130
- data/features/flight_emissions.feature +18 -18
- data/lib/flight/carbon_model.rb +339 -247
- data/lib/flight/data.rb +4 -5
- data/lib/flight/relationships.rb +9 -9
- metadata +19 -4
data/lib/flight/data.rb
CHANGED
@@ -16,13 +16,12 @@ module BrighterPlanet
|
|
16
16
|
string 'seat_class_name'
|
17
17
|
string 'country_iso_3166_code'
|
18
18
|
date 'date'
|
19
|
-
string '
|
20
|
-
string '
|
21
|
-
string '
|
22
|
-
string '
|
19
|
+
string 'origin_airport_iata_code'
|
20
|
+
string 'destination_airport_iata_code'
|
21
|
+
string 'aircraft_bp_code'
|
22
|
+
string 'aircraft_class_code'
|
23
23
|
string 'airline_iata_code'
|
24
24
|
integer 'segments_per_trip'
|
25
|
-
float 'dogleg_factor'
|
26
25
|
end
|
27
26
|
|
28
27
|
process "pull orphans" do
|
data/lib/flight/relationships.rb
CHANGED
@@ -2,15 +2,15 @@ module BrighterPlanet
|
|
2
2
|
module Flight
|
3
3
|
module Relationships
|
4
4
|
def self.included(target)
|
5
|
-
target.belongs_to :distance_class, :class_name => 'FlightDistanceClass', :foreign_key => '
|
6
|
-
target.belongs_to :fuel_type, :foreign_key => '
|
7
|
-
target.belongs_to :seat_class, :class_name => 'FlightSeatClass', :foreign_key => '
|
8
|
-
target.belongs_to :country, :foreign_key => '
|
9
|
-
target.belongs_to :origin_airport, :class_name => 'Airport'
|
10
|
-
target.belongs_to :destination_airport, :class_name => 'Airport'
|
11
|
-
target.belongs_to :aircraft, :foreign_key => '
|
12
|
-
target.belongs_to :aircraft_class, :foreign_key => '
|
13
|
-
target.belongs_to :airline, :foreign_key => '
|
5
|
+
target.belongs_to :distance_class, :class_name => 'FlightDistanceClass', :foreign_key => 'distance_class_name'
|
6
|
+
target.belongs_to :fuel_type, :foreign_key => 'fuel_type_name'
|
7
|
+
target.belongs_to :seat_class, :class_name => 'FlightSeatClass', :foreign_key => 'seat_class_name'
|
8
|
+
target.belongs_to :country, :foreign_key => 'country_iso_3166_code'
|
9
|
+
target.belongs_to :origin_airport, :class_name => 'Airport', :foreign_key => 'origin_airport_iata_code'
|
10
|
+
target.belongs_to :destination_airport, :class_name => 'Airport', :foreign_key => 'destination_airport_iata_code'
|
11
|
+
target.belongs_to :aircraft, :foreign_key => 'aircraft_bp_code'
|
12
|
+
target.belongs_to :aircraft_class, :foreign_key => 'aircraft_class_code'
|
13
|
+
target.belongs_to :airline, :foreign_key => 'airline_iata_code'
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
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
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andy Rossmeissl
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2010-
|
21
|
+
date: 2010-11-06 00:00:00 -04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
@@ -163,6 +163,21 @@ dependencies:
|
|
163
163
|
type: :runtime
|
164
164
|
prerelease: false
|
165
165
|
version_requirements: *id010
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: earth
|
168
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
segments:
|
174
|
+
- 0
|
175
|
+
- 2
|
176
|
+
- 7
|
177
|
+
version: 0.2.7
|
178
|
+
type: :runtime
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: *id011
|
166
181
|
description: A software model in Ruby for the greenhouse gas emissions of a flight
|
167
182
|
email: andy@rossmeissl.net
|
168
183
|
executables: []
|
@@ -202,7 +217,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
202
217
|
requirements:
|
203
218
|
- - ">="
|
204
219
|
- !ruby/object:Gem::Version
|
205
|
-
hash: -
|
220
|
+
hash: -696785283
|
206
221
|
segments:
|
207
222
|
- 0
|
208
223
|
version: "0"
|