emitter 0.1.10 → 0.1.11

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/lib/emitter.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module BrighterPlanet
2
2
  module Emitter
3
- BETA_EMITTERS = %{}
3
+ LIST = %w{automobile automobile_trip bus_trip computation diet flight fuel_purchase lodging meeting motorcycle pet purchase rail_trip residence}
4
+ BETA_LIST = %w{}
4
5
 
5
6
  REQUIRED_COMPONENTS = %w{carbon_model characterization data summarization}
6
7
  OPTIONAL_COMPONENTS = %w{fallback relationships}
@@ -52,6 +53,10 @@ module BrighterPlanet
52
53
  base.send :include, "::BrighterPlanet::#{common_camel}::Relationships".constantize
53
54
  end
54
55
  end
56
+
57
+ def self.classes
58
+ LIST.map(&:camelize).map(&:constantize)
59
+ end
55
60
 
56
61
  module ClassMethods
57
62
  def add_implicit_characteristics
@@ -63,7 +68,7 @@ module BrighterPlanet
63
68
 
64
69
  module Meta
65
70
  def beta?
66
- BETA_EMITTERS.include?(self.to_s.underscore)
71
+ BETA_LIST.include?(self.to_s.underscore)
67
72
  end
68
73
  end
69
74
  end
@@ -6,7 +6,7 @@ class Flight; extend BrighterPlanet::Emitter::Meta; end
6
6
  describe BrighterPlanet::Emitter::Meta do
7
7
  describe '.beta?' do
8
8
  it 'should return true for an emitter that is in beta' do
9
- BrighterPlanet::Emitter::BETA_EMITTERS = 'flight'
9
+ BrighterPlanet::Emitter::BETA_LIST = ['flight']
10
10
  Flight.should be_beta
11
11
  end
12
12
  it 'should return false for an emitter that is not in beta' do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 10
9
- version: 0.1.10
8
+ - 11
9
+ version: 0.1.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andy Rossmeissl
@@ -346,7 +346,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
346
346
  requirements:
347
347
  - - ">="
348
348
  - !ruby/object:Gem::Version
349
- hash: -507241873
349
+ hash: 309415069
350
350
  segments:
351
351
  - 0
352
352
  version: "0"