emitter 0.3.4 → 0.3.5

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/emitter.gemspec CHANGED
@@ -4,7 +4,7 @@ require "emitter/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'emitter'
7
- s.version = "0.3.4"
7
+ s.version = Emitter::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Andy Rossmeissl", "Seamus Abshere", "Ian Hough", "Matt Kling", 'Derek Kastner']
10
10
  s.email = %q{derek@brighterplanet.com}
@@ -1,3 +1,3 @@
1
1
  module Emitter
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.5'
3
3
  end
data/lib/emitter.rb CHANGED
@@ -37,6 +37,8 @@ module BrighterPlanet
37
37
  require "#{common_name}/#{component}"
38
38
  end
39
39
 
40
+ base.instance_variable_set :@emission_scope, @emission_scope if @emission_scope
41
+
40
42
  require 'leap'
41
43
  require 'cohort_scope'
42
44
  base.extend ::Leap::Subject
@@ -60,17 +62,23 @@ module BrighterPlanet
60
62
 
61
63
  base.send :include, "::BrighterPlanet::#{common_camel}::Relationships".constantize
62
64
  end
63
-
65
+
64
66
  def self.classes
65
67
  LIST.map(&:camelize).map(&:constantize)
66
68
  end
67
69
 
70
+ def scope(statement)
71
+ @emission_scope = statement
72
+ end
73
+
68
74
  module ClassMethods
69
75
  def add_implicit_characteristics
70
76
  decisions[:emission].committees.map(&:name).reject { |c| characteristics.keys.unshift(:emission).include? c }.each do |c|
71
77
  characterize { has c }
72
78
  end
73
79
  end
80
+
81
+ def emission_scope; @emission_scope end
74
82
  end
75
83
 
76
84
  module Meta
data/spec/emitter_spec.rb CHANGED
@@ -31,6 +31,10 @@ describe BrighterPlanet::Emitter do
31
31
  Aircraft.send :include, BrighterPlanet::Biplane
32
32
  end.should_not raise_error
33
33
  end
34
+
35
+ it 'should state its own scope' do
36
+ Airship.emission_scope.should == 'Anthropogenic emissions resulting from the inflation, launching, and acceleration of dirigibles'
37
+ end
34
38
  end
35
39
  end
36
40
 
@@ -3,5 +3,6 @@ require 'emitter'
3
3
  module BrighterPlanet
4
4
  module Dirigible
5
5
  extend BrighterPlanet::Emitter
6
+ scope 'Anthropogenic emissions resulting from the inflation, launching, and acceleration of dirigibles'
6
7
  end
7
8
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andy Rossmeissl
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2011-02-08 00:00:00 -05:00
21
+ date: 2011-02-14 00:00:00 -05:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -242,7 +242,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - ">="
244
244
  - !ruby/object:Gem::Version
245
- hash: 2896490800850256272
245
+ hash: -4132117571188824115
246
246
  segments:
247
247
  - 0
248
248
  version: "0"
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
251
  requirements:
252
252
  - - ">="
253
253
  - !ruby/object:Gem::Version
254
- hash: 2896490800850256272
254
+ hash: -4132117571188824115
255
255
  segments:
256
256
  - 0
257
257
  version: "0"