fossil 0.3.35 → 0.3.36
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/trip_leg.rb +4 -0
- data/spec/models/trip_leg_spec.rb +19 -0
- data/spec/sequel/model_patch_spec.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.36
|
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.36"
|
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-12}
|
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/trip_leg.rb
CHANGED
@@ -748,4 +748,8 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
748
748
|
def arrival_icao_expanded
|
749
749
|
"#{arrival_icao_val} #{arrival_airport__name} #{arrival_airport__city} ,#{arrival_airport__state_abbreviation}"
|
750
750
|
end
|
751
|
+
|
752
|
+
def trip_total_statute_miles
|
753
|
+
trip__total_statute_miles.to_f/10.0
|
754
|
+
end
|
751
755
|
end
|
@@ -33,6 +33,25 @@ describe TripLeg do
|
|
33
33
|
tl.actual_land_date_time_gmt.should == DateTime.new(1900, 1, 2, 0, 20, 0)
|
34
34
|
end
|
35
35
|
|
36
|
+
it "actual arrival date_time base are correctly calculating the tz offset" do
|
37
|
+
arr_date_act_gmt = Date.new(1900,1,2)
|
38
|
+
arriv_time_act_gmt = 1420
|
39
|
+
home_tz_gmt_offset = -70
|
40
|
+
tl = TripLeg.new(:arr_date_act_gmt => arr_date_act_gmt.to_fos_days, :arriv_time_act_gmt => arriv_time_act_gmt,
|
41
|
+
:home_tz_gmt_offset => home_tz_gmt_offset)
|
42
|
+
tl.actual_arrival_date_time_base.should == DateTime.new(1900,1,2,16,40,0)
|
43
|
+
end
|
44
|
+
|
45
|
+
it "actual departure date_time base are correctly calculating the tz offset" do
|
46
|
+
dept_date_act_gmt = Date.new(1900,1,2)
|
47
|
+
dept_time_act_gmt = 1420
|
48
|
+
home_tz_gmt_offset = -70
|
49
|
+
tl = TripLeg.new(:dept_date_act_gmt => dept_date_act_gmt.to_fos_days, :dept_time_act_gmt => dept_time_act_gmt,
|
50
|
+
:home_tz_gmt_offset=>home_tz_gmt_offset)
|
51
|
+
tl.actual_departure_date_time_base.should == DateTime.new(1900,1,2,16,40,0)
|
52
|
+
end
|
53
|
+
|
54
|
+
|
36
55
|
describe "should find correct passenger list" do
|
37
56
|
before :each do
|
38
57
|
@p1 = TripPassenger.new(:name=>"dan", :departure_leg_number=>0, :arrival_leg_number=>0, :lead_pax=>0)
|
@@ -144,7 +144,7 @@ describe "Sequel::Model extentions" do
|
|
144
144
|
@record.my_special_name_view.should == "01:00"
|
145
145
|
end
|
146
146
|
|
147
|
-
it "shows correct currency view" do
|
147
|
+
it "shows correct currency view" do
|
148
148
|
@record.price_currency.should == 12.15
|
149
149
|
@record.price_precision.should == 12.15
|
150
150
|
end
|
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.36
|
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-12 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|