fossil 0.5.27 → 0.5.28

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.27
1
+ 0.5.28
data/fossil.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fossil}
8
- s.version = "0.5.27"
8
+ s.version = "0.5.28"
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"]
@@ -800,14 +800,12 @@ class TripLeg < Sequel::Model(:'trip legs')
800
800
  end
801
801
 
802
802
  def leg_status
803
- return "CANC" if cancel_code > 0
804
- return "VERI" if verify_date > 0
805
- return "FLOG" if status != 1 and flight_time_actual > 0
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.filter(:eta_gmt=>0).count
12
- #p TripLeg.filter(:arriv_time_act_gmt=>0).count
13
- t = TripLeg.first(:trip_number=>83106,:leg_number=>1)
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(
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 27
9
- version: 0.5.27
8
+ - 28
9
+ version: 0.5.28
10
10
  platform: ruby
11
11
  authors:
12
12
  - Patrick Lardin, Daniel Sudol