fossil 0.3.46 → 0.3.47

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/fossil.gemspec +1 -1
  3. data/lib/models/trip_leg.rb +15 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.46
1
+ 0.3.47
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.3.46"
8
+ s.version = "0.3.47"
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"]
@@ -728,7 +728,21 @@ class TripLeg < Sequel::Model(:'trip legs')
728
728
  end.compact.uniq.join(' : ')
729
729
  end
730
730
 
731
- #### aliases and special methods #####
731
+ def leg_status
732
+ return "CANC" if cancel_code > 0
733
+ return "VERI" if verify_date > 0
734
+ return "FLOG" if status != 1 and flight_time_actual > 0
735
+ case status
736
+ when 0 then "SCHED"
737
+ when 1 then "VERI"
738
+ when 10 then "CANC"
739
+ when 23 then "CANC"
740
+ when 21 then "MAINT"
741
+ when 20 then "SCHED" #really is "RESVD"
742
+ else "[#{status}]";
743
+ end
744
+ end
745
+
732
746
  # This method guarantees an icao for a view that needs one. If there is an icao, use it, otherwise make
733
747
  # it from the prefix and airport_id .. which works as an icao, but beware, because these put together
734
748
  # icao's that you make are valid icao codes, but you can't search the airport based it, since these
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.46
4
+ version: 0.3.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Lardin, Daniel Sudol