sniff 0.7.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/sniff/emitter.rb CHANGED
@@ -9,23 +9,15 @@ module Sniff
9
9
  def parent_class
10
10
  Emitter
11
11
  end
12
-
13
- def visible_effective_characteristics
14
- characteristics.effective.reject { |_, c| c.hidden? }
15
- end
16
-
17
- def retired?
18
- has_attribute?(:retirement) and retirement
19
- end
20
-
12
+
21
13
  module ClassMethods
22
14
  def from_params_hash(params = Hash.new)
23
15
  resolved_params = Hash.new
24
16
  associations = reflect_on_all_associations
25
17
  params.each do |k, v|
26
18
  next if v.blank?
27
- c = characteristics[k.to_sym]
28
- next if c.nil?
19
+ c = characterization[k.to_sym]
20
+ next unless c
29
21
  if associations.map(&:name).include?(c.name.to_sym)
30
22
  association = associations.find { |a| a.name == c.name.to_sym }
31
23
  klass = association.options[:class_name] || association.name.to_s.pluralize.classify
data/lib/sniff/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sniff
2
- VERSION = "0.7.3"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -45,7 +45,7 @@ When /^the "(.*)" committee is calculated$/ do |committee_name|
45
45
  @expectations.map(&:call)
46
46
  @decision ||= @activity.decisions[:emission]
47
47
  @committee = @decision.committees.find { |c| c.name.to_s == committee_name }
48
- args = [@activity, @characteristics]
48
+ args = [@characteristics]
49
49
  if @characteristics[:timeframe]
50
50
  args << [@characteristics[:timeframe]]
51
51
  else
@@ -1,5 +1,5 @@
1
1
  require "dirigible/fallback"
2
- require 'characterizable'
2
+ require 'charisma'
3
3
  require 'cohort_scope'
4
4
  require 'data_miner'
5
5
  require 'dirigible/carbon_model'
@@ -20,7 +20,7 @@ module BrighterPlanet
20
20
  base.extend Leap::Subject
21
21
  base.send :include, CarbonModel
22
22
 
23
- base.send :include, Characterizable
23
+ base.send :include, Charisma
24
24
  base.send :include, Characterization
25
25
  # add_implicit_characteristics
26
26
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sniff
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.3
5
+ version: 0.8.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Derek Kastner
@@ -10,11 +10,12 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-27 00:00:00 -04:00
13
+ date: 2011-06-02 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
+ prerelease: false
18
19
  requirement: &id001 !ruby/object:Gem::Requirement
19
20
  none: false
20
21
  requirements:
@@ -22,10 +23,10 @@ dependencies:
22
23
  - !ruby/object:Gem::Version
23
24
  version: 3.0.0
24
25
  type: :runtime
25
- prerelease: false
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aaronh-chronic
29
+ prerelease: false
29
30
  requirement: &id002 !ruby/object:Gem::Requirement
30
31
  none: false
31
32
  requirements:
@@ -33,10 +34,10 @@ dependencies:
33
34
  - !ruby/object:Gem::Version
34
35
  version: 0.3.9
35
36
  type: :runtime
36
- prerelease: false
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: bueller
40
+ prerelease: false
40
41
  requirement: &id003 !ruby/object:Gem::Requirement
41
42
  none: false
42
43
  requirements:
@@ -44,10 +45,10 @@ dependencies:
44
45
  - !ruby/object:Gem::Version
45
46
  version: 0.0.5
46
47
  type: :runtime
47
- prerelease: false
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: cucumber
51
+ prerelease: false
51
52
  requirement: &id004 !ruby/object:Gem::Requirement
52
53
  none: false
53
54
  requirements:
@@ -55,10 +56,10 @@ dependencies:
55
56
  - !ruby/object:Gem::Version
56
57
  version: "0"
57
58
  type: :runtime
58
- prerelease: false
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: earth
62
+ prerelease: false
62
63
  requirement: &id005 !ruby/object:Gem::Requirement
63
64
  none: false
64
65
  requirements:
@@ -66,10 +67,10 @@ dependencies:
66
67
  - !ruby/object:Gem::Version
67
68
  version: 0.4.5
68
69
  type: :runtime
69
- prerelease: false
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rake
73
+ prerelease: false
73
74
  requirement: &id006 !ruby/object:Gem::Requirement
74
75
  none: false
75
76
  requirements:
@@ -77,10 +78,10 @@ dependencies:
77
78
  - !ruby/object:Gem::Version
78
79
  version: 0.9.0
79
80
  type: :runtime
80
- prerelease: false
81
81
  version_requirements: *id006
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: rcov
84
+ prerelease: false
84
85
  requirement: &id007 !ruby/object:Gem::Requirement
85
86
  none: false
86
87
  requirements:
@@ -88,10 +89,10 @@ dependencies:
88
89
  - !ruby/object:Gem::Version
89
90
  version: "0"
90
91
  type: :runtime
91
- prerelease: false
92
92
  version_requirements: *id007
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: rdoc
95
+ prerelease: false
95
96
  requirement: &id008 !ruby/object:Gem::Requirement
96
97
  none: false
97
98
  requirements:
@@ -99,10 +100,10 @@ dependencies:
99
100
  - !ruby/object:Gem::Version
100
101
  version: "0"
101
102
  type: :runtime
102
- prerelease: false
103
103
  version_requirements: *id008
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: dkastner-rocco
106
+ prerelease: false
106
107
  requirement: &id009 !ruby/object:Gem::Requirement
107
108
  none: false
108
109
  requirements:
@@ -110,10 +111,10 @@ dependencies:
110
111
  - !ruby/object:Gem::Version
111
112
  version: "0"
112
113
  type: :runtime
113
- prerelease: false
114
114
  version_requirements: *id009
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rspec
117
+ prerelease: false
117
118
  requirement: &id010 !ruby/object:Gem::Requirement
118
119
  none: false
119
120
  requirements:
@@ -121,10 +122,10 @@ dependencies:
121
122
  - !ruby/object:Gem::Version
122
123
  version: "2"
123
124
  type: :runtime
124
- prerelease: false
125
125
  version_requirements: *id010
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: sqlite3-ruby
128
+ prerelease: false
128
129
  requirement: &id011 !ruby/object:Gem::Requirement
129
130
  none: false
130
131
  requirements:
@@ -132,10 +133,10 @@ dependencies:
132
133
  - !ruby/object:Gem::Version
133
134
  version: 1.3.0
134
135
  type: :runtime
135
- prerelease: false
136
136
  version_requirements: *id011
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: timecop
139
+ prerelease: false
139
140
  requirement: &id012 !ruby/object:Gem::Requirement
140
141
  none: false
141
142
  requirements:
@@ -143,21 +144,21 @@ dependencies:
143
144
  - !ruby/object:Gem::Version
144
145
  version: "0"
145
146
  type: :runtime
146
- prerelease: false
147
147
  version_requirements: *id012
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: timeframe
150
+ prerelease: false
150
151
  requirement: &id013 !ruby/object:Gem::Requirement
151
152
  none: false
152
153
  requirements:
153
- - - ~>
154
+ - - ">="
154
155
  - !ruby/object:Gem::Version
155
156
  version: 0.0.8
156
157
  type: :runtime
157
- prerelease: false
158
158
  version_requirements: *id013
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: sandbox
161
+ prerelease: false
161
162
  requirement: &id014 !ruby/object:Gem::Requirement
162
163
  none: false
163
164
  requirements:
@@ -165,18 +166,17 @@ dependencies:
165
166
  - !ruby/object:Gem::Version
166
167
  version: "0"
167
168
  type: :development
168
- prerelease: false
169
169
  version_requirements: *id014
170
170
  - !ruby/object:Gem::Dependency
171
171
  name: emitter
172
+ prerelease: false
172
173
  requirement: &id015 !ruby/object:Gem::Requirement
173
174
  none: false
174
175
  requirements:
175
176
  - - ">="
176
177
  - !ruby/object:Gem::Version
177
- version: "0"
178
+ version: 0.5.0
178
179
  type: :development
179
- prerelease: false
180
180
  version_requirements: *id015
181
181
  description: Provides development and test environment for emitter gems
182
182
  email: derek.kastner@brighterplanet.com
@@ -229,7 +229,7 @@ files:
229
229
  - spec/lib/test_support/cucumber/support/values_spec.rb
230
230
  - spec/spec_helper.rb
231
231
  has_rdoc: true
232
- homepage: http://github.com/brighterplanet/sniff
232
+ homepage: https://github.com/brighterplanet/sniff
233
233
  licenses: []
234
234
 
235
235
  post_install_message:
@@ -242,9 +242,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
242
  requirements:
243
243
  - - ">="
244
244
  - !ruby/object:Gem::Version
245
- hash: 4317022014224165339
246
- segments:
247
- - 0
248
245
  version: "0"
249
246
  required_rubygems_version: !ruby/object:Gem::Requirement
250
247
  none: false