emitter 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/emitter.rb +5 -20
- metadata +4 -4
data/lib/emitter.rb
CHANGED
@@ -3,8 +3,7 @@ module BrighterPlanet
|
|
3
3
|
LIST = %w{automobile automobile_trip bus_trip computation diet flight fuel_purchase lodging meeting motorcycle pet purchase rail_trip residence}
|
4
4
|
BETA_LIST = %w{}
|
5
5
|
|
6
|
-
REQUIRED_COMPONENTS = %w{carbon_model characterization data summarization}
|
7
|
-
OPTIONAL_COMPONENTS = %w{fallback relationships}
|
6
|
+
REQUIRED_COMPONENTS = %w{carbon_model characterization data summarization fallback relationships}
|
8
7
|
def included(base)
|
9
8
|
base.extend Meta
|
10
9
|
base.extend ClassMethods
|
@@ -16,16 +15,6 @@ module BrighterPlanet
|
|
16
15
|
require "#{common_name}/#{component}"
|
17
16
|
end
|
18
17
|
|
19
|
-
extra = []
|
20
|
-
OPTIONAL_COMPONENTS.each do |component|
|
21
|
-
begin
|
22
|
-
require "#{common_name}/#{component}"
|
23
|
-
extra << component
|
24
|
-
rescue LoadError
|
25
|
-
# Oh well, we shouldn't need it.
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
18
|
require 'leap'
|
30
19
|
require 'cohort_scope'
|
31
20
|
base.extend ::Leap::Subject
|
@@ -43,15 +32,11 @@ module BrighterPlanet
|
|
43
32
|
base.extend ::SummaryJudgement
|
44
33
|
base.send :include, "::BrighterPlanet::#{common_camel}::Summarization".constantize
|
45
34
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
base.send :include, "::BrighterPlanet::#{common_camel}::Fallback".constantize
|
50
|
-
end
|
35
|
+
require 'falls_back_on'
|
36
|
+
require 'falls_back_on/active_record_ext'
|
37
|
+
base.send :include, "::BrighterPlanet::#{common_camel}::Fallback".constantize
|
51
38
|
|
52
|
-
|
53
|
-
base.send :include, "::BrighterPlanet::#{common_camel}::Relationships".constantize
|
54
|
-
end
|
39
|
+
base.send :include, "::BrighterPlanet::#{common_camel}::Relationships".constantize
|
55
40
|
end
|
56
41
|
|
57
42
|
def self.classes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emitter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
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-
|
22
|
+
date: 2010-12-07 00:00:00 -06:00
|
23
23
|
default_executable:
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|