fossil 0.5.44 → 0.5.45

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 CHANGED
@@ -1 +1 @@
1
- 0.5.44
1
+ 0.5.45
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.44"
8
+ s.version = "0.5.45"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Sudol", "Patrick Lardin"]
@@ -757,7 +757,7 @@ class TripLeg < Sequel::Model(:'trip legs')
757
757
  # subtracting the two datetimes yields a fraction of a day, so multiplying by minutes
758
758
  # in day ( 1440 ) to get total minutes difference. assumes flights not more than 24 hours.
759
759
  minutes_between = (planned_arrival_date_time_gmt - planned_departure_date_time_gmt) * 1440;
760
- Time.from_minutes(minutes_between)
760
+ DateTime.from_minutes(minutes_between)
761
761
  end
762
762
 
763
763
  def is_deadhead?
@@ -120,6 +120,10 @@ class DateTime
120
120
  (Date.from_fos_days(days).to_gm_time + minutes.minutes).to_datetime
121
121
  end
122
122
 
123
+ class << self
124
+ alias from_minutes from_fos_time
125
+ end
126
+
123
127
  def view
124
128
  to_s
125
129
  end
@@ -56,15 +56,9 @@ describe TripLeg do
56
56
  dept_date_act_gmt = Date.new(2000, 1, 1)
57
57
  tl = TripLeg.new(:arrival_date_gmt=>dept_date_act_gmt.to_fos_days, :eta_gmt=>40,
58
58
  :dept_date_gmt=>dept_date_act_gmt.to_fos_days, :etd_gmt=>20)
59
- tl.ebt_time.should == Time.from_minutes(20)
59
+ tl.ebt_time.should == DateTime.from_minutes(20)
60
60
  end
61
61
 
62
- it "ebt_time method produces correct Time with minutes" do
63
- dept_date_act_gmt = Date.new(2000, 1, 1)
64
- tl = TripLeg.new(:arrival_date_gmt=>dept_date_act_gmt.to_fos_days, :eta_gmt=>40,
65
- :dept_date_gmt=>dept_date_act_gmt.to_fos_days, :etd_gmt=>20)
66
- tl.ebt_time.should == Time.from_minutes(20)
67
- end
68
62
 
69
63
  it "actual take off date_time dates are after dept_date_act_gmt if take off time is less than depart time" do
70
64
  dept_date_act_gmt = Date.new(1900, 1, 1)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 44
9
- version: 0.5.44
8
+ - 45
9
+ version: 0.5.45
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Sudol