fossil 0.5.48 → 0.5.49
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 +1 -1
- data/fossil.gemspec +2 -2
- data/lib/models/flight_log_expense.rb +1 -1
- data/spec/models/flight_log_expense_spec.rb +4 -3
- data/spec/temp_spec.rb +25 -12
- metadata +2 -2
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.5. | 
| 1 | 
            +
            0.5.49
         | 
    
        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. | 
| 8 | 
            +
              s.version = "0.5.49"
         | 
| 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"]
         | 
| 12 | 
            -
              s.date = %q{2011-04- | 
| 12 | 
            +
              s.date = %q{2011-04-25}
         | 
| 13 13 | 
             
              s.description = %q{Access FOS/betrieve db with this Sequel based orm wrapper}
         | 
| 14 14 | 
             
              s.email = %q{dansudol@yahoo.com}
         | 
| 15 15 | 
             
              s.extra_rdoc_files = [
         | 
| @@ -170,7 +170,7 @@ class FlightLogExpense < Sequel::Model(:'flight log expenses') | |
| 170 170 | 
             
                  :leg_date      => leg_date,
         | 
| 171 171 | 
             
                  :trip_number   => leg.trip_number,
         | 
| 172 172 | 
             
                  :leg_number    => leg.leg_number,
         | 
| 173 | 
            -
                  :ac            => leg. | 
| 173 | 
            +
                  :ac            => leg.tail_number,
         | 
| 174 174 | 
             
                  :airport       => airport,
         | 
| 175 175 | 
             
                  :fbo           => fbo,
         | 
| 176 176 | 
             
                  :vendor        => vendor_name,
         | 
| @@ -74,13 +74,14 @@ describe FlightLogExpense do | |
| 74 74 | 
             
                    atlantic_fbo  = AirportFbo.new( :name => "ATLANTIC AVIATION SERVIC" )
         | 
| 75 75 | 
             
                    signature_fbo = AirportFbo.new( :name => "SIGNATURE FLIGHT SUPPORT" )
         | 
| 76 76 |  | 
| 77 | 
            -
                    @trip_leg = TripLeg.new( :trip_number => 12345,           :leg_number => 1, | 
| 77 | 
            +
                    @trip_leg = TripLeg.new( :trip_number => 12345,           :leg_number => 1,
         | 
| 78 78 | 
             
                                             :departure_icao => "KSFO",       :arrival_icao => "KTEB",
         | 
| 79 79 | 
             
                                             :departure_fbo => signature_fbo, :arrival_fbo => atlantic_fbo,
         | 
| 80 80 | 
             
                                             :dept_date_act_local => 40123,   :depart_date_local => 40124 )
         | 
| 81 81 |  | 
| 82 82 | 
             
                    @vendor = Vendor.new( :company_2 => "Landmark Aviation", :company_1 => "Landmark", :vendor_id => "LMAR" )
         | 
| 83 83 |  | 
| 84 | 
            +
                    stub(@trip_leg).tail_number { "N779XJ" }
         | 
| 84 85 | 
             
                    stub(@fe).trip_leg { @trip_leg }
         | 
| 85 86 | 
             
                    stub(@fe).vendor { @vendor }
         | 
| 86 87 | 
             
                    stub(@fe).fuel_rate { 4.12 }
         | 
| @@ -91,7 +92,7 @@ describe FlightLogExpense do | |
| 91 92 | 
             
                      :leg_date      => 40123,
         | 
| 92 93 | 
             
                      :trip_number   => 12345,
         | 
| 93 94 | 
             
                      :leg_number    => 1,
         | 
| 94 | 
            -
                      :ac            => " | 
| 95 | 
            +
                      :ac            => "N779XJ",
         | 
| 95 96 | 
             
                      :airport       => "KTEB",
         | 
| 96 97 | 
             
                      :fbo           => "ATLANTIC AVIATION SERVIC",
         | 
| 97 98 | 
             
                      :vendor        => "Landmark Aviation",
         | 
| @@ -129,4 +130,4 @@ describe FlightLogExpense do | |
| 129 130 | 
             
                FlightLogExpense.new(:arrival_airport => 0).type_string.should == "departure"
         | 
| 130 131 | 
             
                FlightLogExpense.new(:arrival_airport => 1).type_string.should == "arrival"
         | 
| 131 132 | 
             
              end
         | 
| 132 | 
            -
            end
         | 
| 133 | 
            +
            end
         | 
    
        data/spec/temp_spec.rb
    CHANGED
    
    | @@ -1,27 +1,40 @@ | |
| 1 | 
            -
            require_relative '../spec_dbr/spec_helper'
         | 
| 2 | 
            -
             | 
| 1 | 
            +
            #require_relative '../spec_dbr/spec_helper'
         | 
| 2 | 
            +
            require 'spec_helper'
         | 
| 3 3 |  | 
| 4 4 | 
             
            describe "FOS Licensing" do
         | 
| 5 5 | 
             
              before :all do
         | 
| 6 | 
            -
             | 
| 6 | 
            +
                set_fos_db([CityPair])
         | 
| 7 7 | 
             
            #    set_dbr_db([TripLeg, FlightLogExpense, Aircraft, Vendor, AirportFbo])
         | 
| 8 8 | 
             
            #    db = Sequel.fos_dbr(:username => 'datamart', :password => 'datap@ss', :adapter => 'mysql', :host => 'hrkdm', :database => 'dbr')
         | 
| 9 9 | 
             
            #    db.loggers=[Logger.new($stdout)]
         | 
| 10 10 | 
             
            #    [TripLeg, FlightLogExpense, Aircraft, Vendor, AirportFbo, AirportFuel].each { |m| m.db = db }
         | 
| 11 11 | 
             
              end
         | 
| 12 12 |  | 
| 13 | 
            -
              it " | 
| 14 | 
            -
                 | 
| 15 | 
            -
             | 
| 13 | 
            +
              it "exports the fos city pairs table" do
         | 
| 14 | 
            +
                File.open("city_pairs.csv", "w") do |f|
         | 
| 15 | 
            +
                  csv = ""
         | 
| 16 | 
            +
                  attributes = CityPair.first.keys
         | 
| 17 | 
            +
                  csv << attributes.to_flat_file_row( :delimeter => ',', :enclosed_by => '"') + "\n"
         | 
| 16 18 |  | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 19 | 
            +
                  CityPair.find_all.each do |cp|
         | 
| 20 | 
            +
                    csv << attributes.inject("") {|str, attr| str << "\"#{cp.send(attr)}\"," }.chop + "\n"
         | 
| 21 | 
            +
                  end
         | 
| 22 | 
            +
                  f.print(csv)
         | 
| 20 23 | 
             
                end
         | 
| 21 | 
            -
             | 
| 22 | 
            -
                p result
         | 
| 23 24 | 
             
              end
         | 
| 24 25 |  | 
| 26 | 
            +
              #it "pass a block to include?" do
         | 
| 27 | 
            +
                #fbos = ["ATLANTIC AVIATION SERVIC", "SIGNATURE FLIGHT SUPPORT", "LANDMARK AVIATION"]
         | 
| 28 | 
            +
                #search = "LANDMARK AVIATION EAST"
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                #result = nil
         | 
| 31 | 
            +
                #fbos.each do |fbo|
         | 
| 32 | 
            +
                   #result = fbo and break if search.match(/^#{fbo}.*/)
         | 
| 33 | 
            +
                #end
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                #p result
         | 
| 36 | 
            +
              #end
         | 
| 37 | 
            +
             | 
| 25 38 | 
             
            #  it "puts the lotion on the skin" do
         | 
| 26 39 | 
             
            #    legs = TripLeg.fuel_passdown_data(Date.parse('2011-02-06'), Date.parse('2011-02-06'), ["SIGNATURE FLIGHT SUPPORT"])
         | 
| 27 40 | 
             
            #    p "BLAH BLAH BLAH"
         | 
| @@ -44,4 +57,4 @@ describe "FOS Licensing" do | |
| 44 57 | 
             
            #  it "gets the aircraft licensing information" do
         | 
| 45 58 | 
             
            #    print Aircraft.select(:tail_number, :mobile_access).sql
         | 
| 46 59 | 
             
            #  end
         | 
| 47 | 
            -
            end
         | 
| 60 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 | 
             
            name: fossil
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 4 | 
             
              prerelease: 
         | 
| 5 | 
            -
              version: 0.5. | 
| 5 | 
            +
              version: 0.5.49
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors: 
         | 
| 8 8 | 
             
            - Daniel Sudol
         | 
| @@ -11,7 +11,7 @@ autorequire: | |
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 13 |  | 
| 14 | 
            -
            date: 2011-04- | 
| 14 | 
            +
            date: 2011-04-25 00:00:00 -07:00
         | 
| 15 15 | 
             
            default_executable: 
         | 
| 16 16 | 
             
            dependencies: 
         | 
| 17 17 | 
             
            - !ruby/object:Gem::Dependency 
         |