fuel_purchase 0.0.13 → 0.0.14

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.
@@ -3,15 +3,5 @@ require 'emitter'
3
3
  module BrighterPlanet
4
4
  module FuelPurchase
5
5
  extend BrighterPlanet::Emitter
6
-
7
- def self.fuel_purchase_model
8
- if Object.const_defined? 'FuelPurchase'
9
- ::FuelPurchase
10
- elsif Object.const_defined? 'FuelPurchaseRecord'
11
- FuelPurchaseRecord
12
- else
13
- raise 'There is no fuel_purchase model'
14
- end
15
- end
16
6
  end
17
7
  end
@@ -0,0 +1,9 @@
1
+ module BrighterPlanet
2
+ module FuelPurchase
3
+ module Fallback
4
+ def self.included(base)
5
+ base.falls_back_on
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ module BrighterPlanet
2
+ module FuelPurchase
3
+ module Relationships
4
+ def self.included(target)
5
+ target.belongs_to :fuel_type
6
+ target.belongs_to :zip_code
7
+ target.belongs_to :state
8
+ target.belongs_to :petroleum_administration_for_defense_district
9
+ end
10
+ end
11
+ end
12
+ end
@@ -3,9 +3,4 @@ require 'fuel_purchase'
3
3
  class FuelPurchaseRecord < ActiveRecord::Base
4
4
  include Sniff::Emitter
5
5
  include ::BrighterPlanet::FuelPurchase
6
-
7
- belongs_to :fuel_type
8
- belongs_to :zip_code
9
- belongs_to :state
10
- belongs_to :petroleum_administration_for_defense_district
11
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuel_purchase
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 13
10
- version: 0.0.13
9
+ - 14
10
+ version: 0.0.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andy Rossmeissl
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-12-06 00:00:00 -06:00
22
+ date: 2010-12-07 00:00:00 -06:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
@@ -171,6 +171,8 @@ files:
171
171
  - lib/fuel_purchase/carbon_model.rb
172
172
  - lib/fuel_purchase/characterization.rb
173
173
  - lib/fuel_purchase/data.rb
174
+ - lib/fuel_purchase/fallback.rb
175
+ - lib/fuel_purchase/relationships.rb
174
176
  - lib/fuel_purchase/summarization.rb
175
177
  - lib/test_support/fuel_purchase_record.rb
176
178
  - features/support/env.rb