fossil 0.5.27 → 0.5.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/fossil.gemspec +1 -1
- data/lib/models/trip_leg.rb +4 -6
- data/spec/silly_spec.rb +9 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.28
|
data/fossil.gemspec
CHANGED
data/lib/models/trip_leg.rb
CHANGED
@@ -800,14 +800,12 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
800
800
|
end
|
801
801
|
|
802
802
|
def leg_status
|
803
|
-
return "
|
804
|
-
return "
|
805
|
-
return "
|
803
|
+
return "VERI" if verify_date > 0 or status == 1
|
804
|
+
return "FLOG" if flight_time_actual > 0
|
805
|
+
return "CANC" if cancel_code == 1 or [10,23].include? status
|
806
806
|
case status.to_i
|
807
|
-
when 0 then "SCHED"
|
808
|
-
when 1 then "VERI"
|
809
|
-
when 10,23 then "CANC"
|
810
807
|
when 21 then "MAINT"
|
808
|
+
when 0 then "SCHED"
|
811
809
|
when 20 then "SCHED" #really is "RESVD"
|
812
810
|
else status
|
813
811
|
end
|
data/spec/silly_spec.rb
CHANGED
@@ -5,12 +5,16 @@ require 'pp'
|
|
5
5
|
# 800 557-9965
|
6
6
|
# 0279507735
|
7
7
|
|
8
|
-
DB = Sequel.fos('fosprod', :loggers=>[Logger.new($stdout)])
|
8
|
+
#DB = Sequel.fos('fosprod', :loggers=>[Logger.new($stdout)])
|
9
9
|
#DB = Sequel.fos('flyos', :loggers=>[Logger.new($stdout)])
|
10
|
-
TripLeg.db = DB
|
11
|
-
#p TripLeg.
|
12
|
-
#p TripLeg.filter
|
13
|
-
|
10
|
+
#TripLeg.db = DB
|
11
|
+
#p TripLeg.select(:cancel_code).distinct(:cancel_code)
|
12
|
+
#p TripLeg.filter{ cancel_code >1 }.count
|
13
|
+
|
14
|
+
#p TripLeg.first(:trip_number=>85176,:leg_number=>2).fill_hash(
|
15
|
+
# [:cancel_code,:verify_date,:status,:flight_time_actual]
|
16
|
+
#)
|
17
|
+
|
14
18
|
#p t.actual_departure_date_time_gmt.to_time
|
15
19
|
#p t.actual_departure_date_time_gmt.to_time.utc
|
16
20
|
#pp t.fill_hash(
|