fossil 0.5.23 → 0.5.24

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.23
1
+ 0.5.24
data/fossil.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fossil}
8
- s.version = "0.5.23"
8
+ s.version = "0.5.24"
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{2011-01-20}
12
+ s.date = %q{2011-01-21}
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.extra_rdoc_files = [
@@ -11,7 +11,7 @@ module Sequel
11
11
  db = Sequel.mysql(opts)
12
12
  db.extend(MySql::Pervasive::DatabaseMethods)
13
13
  # require the dbr libs
14
- Dir.glob('../dbr_models*.rb').each{|f| require f}
14
+ Dir["#{File.dirname(__FILE__)}/../dbr_models/*.rb"].each{|f| load f}
15
15
  db
16
16
  end
17
17
 
@@ -27,18 +27,9 @@ describe Sequel do
27
27
  @db.should_not be nil
28
28
  end
29
29
 
30
- it "actually works to see dbr tables" do
31
- [TripLeg,Trip,Quote,Aircraft,Code,CrewLeg].each{|model| model.db=@db}
32
- # TripLeg.first.should_not be nil
33
- # TripLeg.first.trip.should_not be nil
34
- p Trip.eager_graph(:quote).sql
35
- # p TripLeg.select(:trip_number).eager_graph(:trip).sql
36
- # p TripLeg.filter(:id=>"WERJ-1-17-40385-1243").first
37
- # p TripLeg.filter(:'trip legs__trip_number'=>68070,:leg_number=>5).eager_graph(:crew_legs => [:crew_name, :position_code]).sql
38
- # t = TripLeg.filter(:'trip legs__trip_number'=>68070,:leg_number=>5).eager_graph(:crew_legs => [:crew_name, :position_code]).all.first
39
- # p [t.status,t.division,t.regulation,t.closed,t.ete,t.department,t.deadhead,t.company]
40
- # p TripLeg.filter(:id=>"WERJ-1-17-40385-1243").eager_graph(:aircraft).all.first
41
- # TripLeg.filter(:'trip legs__kid_date'=>40475..40475, :cancel_code=>0,:leg_type_code=>7).eager_graph(:crew_legs=>:position_code).all.size.should == 3
30
+ it "actually loaded the dbr files" do
31
+ [Trip,Quote].each{|model| model.db=@db}
32
+ Trip.eager_graph(:quote).sql.should =~ /(`quote`.`id` = `trips`.`quote_id`)/
42
33
  end
43
34
  end
44
35
 
@@ -51,6 +42,5 @@ describe Sequel do
51
42
  it "converts fos_id to key that can be used to query model" do
52
43
  Sequel.fos_id_to_lookup_key("MERE-0-8-40443-1259").should == ['MERE',0,8,40443,1259]
53
44
  end
54
-
55
45
  end
56
46
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 23
9
- version: 0.5.23
8
+ - 24
9
+ version: 0.5.24
10
10
  platform: ruby
11
11
  authors:
12
12
  - Patrick Lardin, Daniel Sudol
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-20 00:00:00 -08:00
17
+ date: 2011-01-21 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency