fossil 0.3.38 → 0.3.39
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fossil.gemspec +2 -2
- data/lib/models/airport_fbo.rb +3 -0
- data/lib/models/crew_leg.rb +2 -2
- data/lib/models/trip_leg.rb +9 -1
- data/spec/models/trip_leg_spec.rb +4 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.39
|
data/fossil.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fossil}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.39"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Patrick Lardin, Daniel Sudol"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-17}
|
13
13
|
s.description = %q{Access FOS/betrieve db with this Sequel based orm wrapper}
|
14
14
|
s.email = %q{plardin@xojet.com}
|
15
15
|
s.files = [
|
data/lib/models/airport_fbo.rb
CHANGED
data/lib/models/crew_leg.rb
CHANGED
@@ -3,12 +3,12 @@ class CrewLeg < Sequel::Model(:'crew legs')
|
|
3
3
|
|
4
4
|
# Many to one associations with composite primary keys
|
5
5
|
n_to_o :trip_legs, :class=>:TripLeg, :prefix=>'trip leg'
|
6
|
-
many_to_one :crew_name, :class=>:Personnel, :key=>:crew, :primary_key=>:
|
6
|
+
many_to_one :crew_name, :class=>:Personnel, :key=>:crew, :primary_key=>:'employee id'
|
7
7
|
|
8
8
|
# Code associations
|
9
9
|
code_association :position_code, :'position', :position
|
10
10
|
|
11
|
-
delegate :employee_name, :to => :crew_name
|
11
|
+
delegate :employee_name, :to => :crew_name, :allow_nil => true
|
12
12
|
|
13
13
|
#### BEGIN GENERATED SECTION ####
|
14
14
|
set_primary_key [:'kid - user', :'kid - mult', :'kid - comm', :'kid - date', :'kid - time']
|
data/lib/models/trip_leg.rb
CHANGED
@@ -27,7 +27,9 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
27
27
|
n_to_o :pax_hotel, :class=>:AirportService, :prefix=>'pax hotel'
|
28
28
|
n_to_o :planner, :class=>:Passenger, :prefix=>'planner'
|
29
29
|
n_to_o :trip_requester, :class=>:Passenger, :prefix=>'requester'
|
30
|
-
|
30
|
+
alias :departure_fbo :fueler
|
31
|
+
alias :arrival_fbo :airport_fbo
|
32
|
+
|
31
33
|
# Many to one associations with custom treatment
|
32
34
|
many_to_one :arrival_airport, :class=>:Airport, :key=>nil, :dataset=>
|
33
35
|
proc {
|
@@ -752,4 +754,10 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
752
754
|
def total_trip_statute_miles
|
753
755
|
trip__total_statute_miles.to_f/10.0
|
754
756
|
end
|
757
|
+
|
758
|
+
# converts nautical miles to statute miles with fractional bit
|
759
|
+
# silly because its so similar in value to statute_miles
|
760
|
+
def custom_statute_miles
|
761
|
+
((nautical_miles*1.150777*10).to_i)/10.0
|
762
|
+
end
|
755
763
|
end
|
@@ -51,6 +51,10 @@ describe TripLeg do
|
|
51
51
|
tl.actual_departure_date_time_base.should == DateTime.new(1900,1,2,16,40,0)
|
52
52
|
end
|
53
53
|
|
54
|
+
it "should properly convert nautical miles to statute miles with 1 significant digit" do
|
55
|
+
tl = TripLeg.new(:nautical_miles => 285)
|
56
|
+
tl.custom_statute_miles.should == 327.9
|
57
|
+
end
|
54
58
|
|
55
59
|
describe "should find correct passenger list" do
|
56
60
|
before :each do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fossil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Lardin, Daniel Sudol
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-17 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|