sniff 0.1.10 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,12 +7,16 @@ Given /^an? (.+) emission$/ do |emitter|
|
|
7
7
|
@activity_hash = {}
|
8
8
|
end
|
9
9
|
|
10
|
-
Given /^an? (.+)
|
10
|
+
Given /^an? (.+) has nothing$/ do |emitter|
|
11
|
+
Given "a #{emitter} emission"
|
12
|
+
end
|
13
|
+
|
14
|
+
Given /^an? (.+) has "(.+)" of "(.*)"$/ do |emitter, field, value|
|
11
15
|
Given "a #{emitter} emission"
|
12
16
|
Given "it has \"#{field}\" of \"#{value}\""
|
13
17
|
end
|
14
18
|
|
15
|
-
Given /^it
|
19
|
+
Given /^it has "(.+)" of "(.*)"$/ do |field, value|
|
16
20
|
if value.present?
|
17
21
|
methods = field.split('.')
|
18
22
|
context = @activity_hash
|
@@ -26,7 +30,7 @@ Given /^it (has|used) "(.+)" (of\s?)?"(.*)"$/ do |_, field, __, value|
|
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
29
|
-
Given /^the current date is (.+)$/ do |current_date|
|
33
|
+
Given /^the current date is "(.+)"$/ do |current_date|
|
30
34
|
@current_date = Time.parse(current_date)
|
31
35
|
end
|
32
36
|
|
@@ -42,28 +46,27 @@ When /^emissions are calculated$/ do
|
|
42
46
|
@characteristics = @activity.deliberations[:emission].characteristics
|
43
47
|
end
|
44
48
|
|
45
|
-
Then /^the emission value should be within ([\d\.]+) kgs of ([\d\.]+)$/ do |cusion, emissions|
|
49
|
+
Then /^the emission value should be within "([\d\.]+)" kgs of "([\d\.]+)"$/ do |cusion, emissions|
|
46
50
|
@emission.should_not be_nil
|
47
51
|
@emission.should be_close(emissions.to_f, cusion.to_f)
|
48
52
|
end
|
49
53
|
|
50
|
-
Then /^the calculation should have used committees (.*)$/ do |committee_list|
|
54
|
+
Then /^the calculation should have used committees "(.*)"$/ do |committee_list|
|
51
55
|
committees = committee_list.split(/,\s*/)
|
52
56
|
committees.each do |committee|
|
53
57
|
@characteristics.keys.should include(committee)
|
54
58
|
end
|
55
59
|
end
|
56
60
|
|
57
|
-
Then /^the (.+) committee should be close to ([^,]+), \+\/-(.+)$/ do |committee, value, cusion|
|
61
|
+
Then /^the (.+) committee should be close to "([^,]+)", \+\/-"(.+)"$/ do |committee, value, cusion|
|
58
62
|
@characteristics[committee.to_sym].to_f.should be_close(value.to_f, cusion.to_f)
|
59
63
|
end
|
60
64
|
|
61
|
-
Then /^the (.+) committee should be exactly (.*)$/ do |committee, value|
|
65
|
+
Then /^the (.+) committee should be exactly "(.*)"$/ do |committee, value|
|
62
66
|
@characteristics[committee.to_sym].to_s.should == value
|
63
67
|
end
|
64
68
|
|
65
|
-
Then /^the active_subtimeframe committee should have timeframe (.*)$/ do |tf_string|
|
69
|
+
Then /^the active_subtimeframe committee should have timeframe "(.*)"$/ do |tf_string|
|
66
70
|
days, start, finish = tf_string.split(/,\s*/)
|
67
71
|
@characteristics[:active_subtimeframe].to_s.should =~ /#{days} days starting #{start} ending #{finish}/
|
68
72
|
end
|
69
|
-
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sniff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 3
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 12
|
10
|
+
version: 0.1.12
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Derek Kastner
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-09-07 00:00:00 -07:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: activerecord
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: -1848230024
|
27
30
|
segments:
|
28
31
|
- 3
|
29
32
|
- 0
|
@@ -36,9 +39,11 @@ dependencies:
|
|
36
39
|
name: activesupport
|
37
40
|
prerelease: false
|
38
41
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
39
43
|
requirements:
|
40
44
|
- - ">="
|
41
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: -1848230024
|
42
47
|
segments:
|
43
48
|
- 3
|
44
49
|
- 0
|
@@ -51,9 +56,11 @@ dependencies:
|
|
51
56
|
name: sqlite3-ruby
|
52
57
|
prerelease: false
|
53
58
|
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
54
60
|
requirements:
|
55
61
|
- - ">="
|
56
62
|
- !ruby/object:Gem::Version
|
63
|
+
hash: 27
|
57
64
|
segments:
|
58
65
|
- 1
|
59
66
|
- 3
|
@@ -65,9 +72,11 @@ dependencies:
|
|
65
72
|
name: common_name
|
66
73
|
prerelease: false
|
67
74
|
requirement: &id004 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
68
76
|
requirements:
|
69
77
|
- - ">="
|
70
78
|
- !ruby/object:Gem::Version
|
79
|
+
hash: 17
|
71
80
|
segments:
|
72
81
|
- 0
|
73
82
|
- 1
|
@@ -79,23 +88,27 @@ dependencies:
|
|
79
88
|
name: earth
|
80
89
|
prerelease: false
|
81
90
|
requirement: &id005 !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
82
92
|
requirements:
|
83
|
-
- -
|
93
|
+
- - ~>
|
84
94
|
- !ruby/object:Gem::Version
|
95
|
+
hash: 95
|
85
96
|
segments:
|
86
97
|
- 0
|
87
98
|
- 0
|
88
|
-
-
|
89
|
-
version: 0.0.
|
99
|
+
- 32
|
100
|
+
version: 0.0.32
|
90
101
|
type: :runtime
|
91
102
|
version_requirements: *id005
|
92
103
|
- !ruby/object:Gem::Dependency
|
93
104
|
name: timeframe
|
94
105
|
prerelease: false
|
95
106
|
requirement: &id006 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
96
108
|
requirements:
|
97
109
|
- - ">="
|
98
110
|
- !ruby/object:Gem::Version
|
111
|
+
hash: 15
|
99
112
|
segments:
|
100
113
|
- 0
|
101
114
|
- 0
|
@@ -107,9 +120,11 @@ dependencies:
|
|
107
120
|
name: bundler
|
108
121
|
prerelease: false
|
109
122
|
requirement: &id007 !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
110
124
|
requirements:
|
111
125
|
- - ">="
|
112
126
|
- !ruby/object:Gem::Version
|
127
|
+
hash: 3
|
113
128
|
segments:
|
114
129
|
- 0
|
115
130
|
version: "0"
|
@@ -119,9 +134,11 @@ dependencies:
|
|
119
134
|
name: jeweler
|
120
135
|
prerelease: false
|
121
136
|
requirement: &id008 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
122
138
|
requirements:
|
123
139
|
- - ">="
|
124
140
|
- !ruby/object:Gem::Version
|
141
|
+
hash: 3
|
125
142
|
segments:
|
126
143
|
- 0
|
127
144
|
version: "0"
|
@@ -131,9 +148,11 @@ dependencies:
|
|
131
148
|
name: rake
|
132
149
|
prerelease: false
|
133
150
|
requirement: &id009 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
134
152
|
requirements:
|
135
153
|
- - ">="
|
136
154
|
- !ruby/object:Gem::Version
|
155
|
+
hash: 3
|
137
156
|
segments:
|
138
157
|
- 0
|
139
158
|
version: "0"
|
@@ -143,9 +162,11 @@ dependencies:
|
|
143
162
|
name: rspec
|
144
163
|
prerelease: false
|
145
164
|
requirement: &id010 !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
146
166
|
requirements:
|
147
167
|
- - ">="
|
148
168
|
- !ruby/object:Gem::Version
|
169
|
+
hash: 62196417
|
149
170
|
segments:
|
150
171
|
- 2
|
151
172
|
- 0
|
@@ -159,9 +180,11 @@ dependencies:
|
|
159
180
|
name: rcov
|
160
181
|
prerelease: false
|
161
182
|
requirement: &id011 !ruby/object:Gem::Requirement
|
183
|
+
none: false
|
162
184
|
requirements:
|
163
185
|
- - ">="
|
164
186
|
- !ruby/object:Gem::Version
|
187
|
+
hash: 3
|
165
188
|
segments:
|
166
189
|
- 0
|
167
190
|
version: "0"
|
@@ -171,9 +194,11 @@ dependencies:
|
|
171
194
|
name: rdoc
|
172
195
|
prerelease: false
|
173
196
|
requirement: &id012 !ruby/object:Gem::Requirement
|
197
|
+
none: false
|
174
198
|
requirements:
|
175
199
|
- - ">="
|
176
200
|
- !ruby/object:Gem::Version
|
201
|
+
hash: 3
|
177
202
|
segments:
|
178
203
|
- 0
|
179
204
|
version: "0"
|
@@ -183,9 +208,11 @@ dependencies:
|
|
183
208
|
name: fast_timestamp
|
184
209
|
prerelease: false
|
185
210
|
requirement: &id013 !ruby/object:Gem::Requirement
|
211
|
+
none: false
|
186
212
|
requirements:
|
187
213
|
- - ">="
|
188
214
|
- !ruby/object:Gem::Version
|
215
|
+
hash: 23
|
189
216
|
segments:
|
190
217
|
- 0
|
191
218
|
- 0
|
@@ -221,6 +248,8 @@ files:
|
|
221
248
|
- lib/test_support/db/fixtures/urbanities.csv
|
222
249
|
- lib/test_support/db/fixtures/zip_codes.csv
|
223
250
|
- README.markdown
|
251
|
+
- spec/lib/sniff/database_spec.rb
|
252
|
+
- spec/spec_helper.rb
|
224
253
|
has_rdoc: true
|
225
254
|
homepage: http://github.com/brighterplanet/sniff
|
226
255
|
licenses: []
|
@@ -231,23 +260,27 @@ rdoc_options:
|
|
231
260
|
require_paths:
|
232
261
|
- lib
|
233
262
|
required_ruby_version: !ruby/object:Gem::Requirement
|
263
|
+
none: false
|
234
264
|
requirements:
|
235
265
|
- - ">="
|
236
266
|
- !ruby/object:Gem::Version
|
267
|
+
hash: 3
|
237
268
|
segments:
|
238
269
|
- 0
|
239
270
|
version: "0"
|
240
271
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
272
|
+
none: false
|
241
273
|
requirements:
|
242
274
|
- - ">="
|
243
275
|
- !ruby/object:Gem::Version
|
276
|
+
hash: 3
|
244
277
|
segments:
|
245
278
|
- 0
|
246
279
|
version: "0"
|
247
280
|
requirements: []
|
248
281
|
|
249
282
|
rubyforge_project:
|
250
|
-
rubygems_version: 1.3.
|
283
|
+
rubygems_version: 1.3.7
|
251
284
|
signing_key:
|
252
285
|
specification_version: 3
|
253
286
|
summary: Test support for Brighter Planet carbon gems
|