fossil 0.4.8 → 0.4.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fossil.gemspec +7 -6
- data/lib/models/trip_leg.rb +13 -1
- metadata +4 -9
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.9
|
data/fossil.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fossil}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.9"
|
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-07-
|
12
|
+
s.date = %q{2010-07-13}
|
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 = [
|
@@ -149,7 +149,7 @@ Gem::Specification.new do |s|
|
|
149
149
|
s.homepage = %q{}
|
150
150
|
s.rdoc_options = ["--charset=UTF-8"]
|
151
151
|
s.require_paths = ["lib"]
|
152
|
-
s.rubygems_version = %q{1.3.
|
152
|
+
s.rubygems_version = %q{1.3.6}
|
153
153
|
s.summary = %q{Sequel orm wrapper to FOS}
|
154
154
|
s.test_files = [
|
155
155
|
"spec/hash_extentions_spec.rb",
|
@@ -175,7 +175,7 @@ Gem::Specification.new do |s|
|
|
175
175
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
176
176
|
s.specification_version = 3
|
177
177
|
|
178
|
-
if Gem::Version.new(Gem::
|
178
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
179
179
|
s.add_runtime_dependency(%q<sequel>, ["= 3.12.0"])
|
180
180
|
s.add_runtime_dependency(%q<activesupport>, ["= 2.3.5"])
|
181
181
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
@@ -190,3 +190,4 @@ Gem::Specification.new do |s|
|
|
190
190
|
s.add_dependency(%q<rspec>, [">= 0"])
|
191
191
|
end
|
192
192
|
end
|
193
|
+
|
data/lib/models/trip_leg.rb
CHANGED
@@ -725,18 +725,30 @@ class TripLeg < Sequel::Model(:'trip legs')
|
|
725
725
|
# (status==1 or verify_date > 0) and (deadhead==1 or pax_count==0) and [107, 115, 108, 104].include? leg_type_code
|
726
726
|
end
|
727
727
|
|
728
|
+
def verified?
|
729
|
+
(status == 1 or verify_date > 0)
|
730
|
+
end
|
731
|
+
|
732
|
+
def is_flown?
|
733
|
+
((verified? or flight_time_actual > 0) and cancel_code == 0)
|
734
|
+
end
|
735
|
+
|
728
736
|
def is_completed_leg?
|
729
737
|
is_flown? and (land_time_act_gmt!=1440 and land_time_act_gmt!=0)
|
730
738
|
end
|
731
739
|
|
732
740
|
def departed?
|
733
|
-
(
|
741
|
+
(t_o_time_act_gmt!=0 and t_o_time_act_gmt!=1440)
|
734
742
|
end
|
735
743
|
|
736
744
|
def delayed?
|
737
745
|
Time.now.utc > planned_departure_date_time_gmt and !departed?
|
738
746
|
end
|
739
747
|
|
748
|
+
def is_charter?
|
749
|
+
[100, 11].include? leg_type_code
|
750
|
+
end
|
751
|
+
|
740
752
|
# sort on lead_pax value to lead pax = 1 is first and the lead_pax values of 0 are all after
|
741
753
|
def passenger_list
|
742
754
|
return '' if trip__passengers.blank? or is_deadhead?
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 9
|
9
|
+
version: 0.4.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Patrick Lardin, Daniel Sudol
|
@@ -14,14 +14,13 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-13 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: sequel
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
24
|
requirements:
|
26
25
|
- - "="
|
27
26
|
- !ruby/object:Gem::Version
|
@@ -36,7 +35,6 @@ dependencies:
|
|
36
35
|
name: activesupport
|
37
36
|
prerelease: false
|
38
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
38
|
requirements:
|
41
39
|
- - "="
|
42
40
|
- !ruby/object:Gem::Version
|
@@ -51,7 +49,6 @@ dependencies:
|
|
51
49
|
name: rspec
|
52
50
|
prerelease: false
|
53
51
|
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
-
none: false
|
55
52
|
requirements:
|
56
53
|
- - ">="
|
57
54
|
- !ruby/object:Gem::Version
|
@@ -211,7 +208,6 @@ rdoc_options:
|
|
211
208
|
require_paths:
|
212
209
|
- lib
|
213
210
|
required_ruby_version: !ruby/object:Gem::Requirement
|
214
|
-
none: false
|
215
211
|
requirements:
|
216
212
|
- - ">="
|
217
213
|
- !ruby/object:Gem::Version
|
@@ -219,7 +215,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
219
215
|
- 0
|
220
216
|
version: "0"
|
221
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
|
-
none: false
|
223
218
|
requirements:
|
224
219
|
- - ">="
|
225
220
|
- !ruby/object:Gem::Version
|
@@ -229,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
224
|
requirements: []
|
230
225
|
|
231
226
|
rubyforge_project:
|
232
|
-
rubygems_version: 1.3.
|
227
|
+
rubygems_version: 1.3.6
|
233
228
|
signing_key:
|
234
229
|
specification_version: 3
|
235
230
|
summary: Sequel orm wrapper to FOS
|