sniff 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,18 +11,26 @@ module Sniff
11
11
  new(&blk).define_tasks
12
12
  end
13
13
 
14
- attr_accessor :earth_domains, :cucumber, :rspec, :rcov, :rocco, :bueller
14
+ attr_accessor :earth_domains, :cucumber, :rspec, :coverage, :rocco, :bueller
15
15
 
16
16
  def initialize
17
17
  self.earth_domains = :all
18
18
  self.cucumber = true
19
19
  self.rspec = false
20
- self.rcov = true
20
+ self.coverage = true
21
21
  self.rocco = true
22
22
  self.bueller = true
23
23
  yield self if block_given?
24
24
  end
25
25
 
26
+ def ruby18?
27
+ RUBY_VERSION =~ /^1\.8/ ? true : false
28
+ end
29
+
30
+ def rcov=(val)
31
+ self.coverage = val
32
+ end
33
+
26
34
  def gemname
27
35
  @gemname ||= File.basename(Dir.glob(File.join(Dir.pwd, '*.gemspec')).first, '.gemspec')
28
36
  end
@@ -35,6 +43,20 @@ module Sniff
35
43
  end
36
44
 
37
45
  def define_tasks
46
+ if coverage && ruby18?
47
+ require 'rcov'
48
+ elsif coverage
49
+ task :simplecov do
50
+ require 'simplecov'
51
+
52
+ SimpleCov.start do
53
+ add_filter '/spec/'
54
+ add_filter '/features/'
55
+ add_filter '/vendor/'
56
+ end
57
+ end
58
+ end
59
+
38
60
  task :console do
39
61
  require 'sniff'
40
62
  cwd = Dir.pwd
@@ -133,13 +155,15 @@ module Sniff
133
155
  end
134
156
  end
135
157
 
136
- if rcov
158
+ if coverage && ruby18?
137
159
  desc "Run cucumber tests with RCov"
138
160
  Cucumber::Rake::Task.new(:features_with_coverage) do |t|
139
161
  t.cucumber_opts = "features --format pretty"
140
162
  t.rcov = true
141
163
  t.rcov_opts = ['--exclude', 'features']
142
164
  end
165
+ elsif coverage
166
+ task :features_with_coverage => [:simplecov, :features]
143
167
  end
144
168
  end
145
169
 
@@ -155,13 +179,15 @@ module Sniff
155
179
  end
156
180
  end
157
181
 
158
- if rcov
182
+ if coverage && ruby18?
159
183
  desc "Run specs with RCov"
160
184
  RSpec::Core::RakeTask.new(:examples_with_coverage) do |t|
161
185
  t.rcov = true
162
186
  t.rcov_opts = ['--exclude', 'spec']
163
187
  t.rspec_opts = '-Ispec'
164
188
  end
189
+ elsif coverage
190
+ task :examples_with_coverage => [:simplecov, :examples]
165
191
  end
166
192
  end
167
193
 
@@ -1,3 +1,3 @@
1
1
  module Sniff
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
@@ -52,7 +52,7 @@ Sniff::RakeTasks.define_tasks
52
52
  `cd #{flight_path} && NO_PUSH=true rake pages`
53
53
 
54
54
  git('log -n 1', File.join(flight_path, 'docs')).
55
- should =~ /rebuild pages/
55
+ should =~ /rebuild pages/i
56
56
  end
57
57
  end
58
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sniff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-13 00:00:00.000000000 -04:00
13
- default_executable:
12
+ date: 2011-06-17 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: activesupport
17
- requirement: &2155180580 !ruby/object:Gem::Requirement
16
+ requirement: &2152992840 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ! '>='
@@ -22,10 +21,10 @@ dependencies:
22
21
  version: '3'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2155180580
24
+ version_requirements: *2152992840
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: aaronh-chronic
28
- requirement: &2155180060 !ruby/object:Gem::Requirement
27
+ requirement: &2152530440 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ! '>='
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: 0.3.9
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *2155180060
35
+ version_requirements: *2152530440
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: bueller
39
- requirement: &2155179540 !ruby/object:Gem::Requirement
38
+ requirement: &2152508100 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ! '>='
@@ -44,10 +43,10 @@ dependencies:
44
43
  version: 0.0.5
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *2155179540
46
+ version_requirements: *2152508100
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: create_table
50
- requirement: &2155179080 !ruby/object:Gem::Requirement
49
+ requirement: &2152450780 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ! '>='
@@ -55,10 +54,10 @@ dependencies:
55
54
  version: '0'
56
55
  type: :runtime
57
56
  prerelease: false
58
- version_requirements: *2155179080
57
+ version_requirements: *2152450780
59
58
  - !ruby/object:Gem::Dependency
60
59
  name: cucumber
61
- requirement: &2155178440 !ruby/object:Gem::Requirement
60
+ requirement: &2152438040 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ! '>='
@@ -66,10 +65,10 @@ dependencies:
66
65
  version: '0'
67
66
  type: :runtime
68
67
  prerelease: false
69
- version_requirements: *2155178440
68
+ version_requirements: *2152438040
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: earth
72
- requirement: &2155177840 !ruby/object:Gem::Requirement
71
+ requirement: &2152362420 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ! '>='
@@ -77,10 +76,10 @@ dependencies:
77
76
  version: 0.4.5
78
77
  type: :runtime
79
78
  prerelease: false
80
- version_requirements: *2155177840
79
+ version_requirements: *2152362420
81
80
  - !ruby/object:Gem::Dependency
82
81
  name: rake
83
- requirement: &2155177220 !ruby/object:Gem::Requirement
82
+ requirement: &2152358200 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ! '>='
@@ -88,10 +87,10 @@ dependencies:
88
87
  version: 0.9.0
89
88
  type: :runtime
90
89
  prerelease: false
91
- version_requirements: *2155177220
90
+ version_requirements: *2152358200
92
91
  - !ruby/object:Gem::Dependency
93
92
  name: rcov
94
- requirement: &2155176820 !ruby/object:Gem::Requirement
93
+ requirement: &2152317720 !ruby/object:Gem::Requirement
95
94
  none: false
96
95
  requirements:
97
96
  - - ! '>='
@@ -99,10 +98,10 @@ dependencies:
99
98
  version: '0'
100
99
  type: :runtime
101
100
  prerelease: false
102
- version_requirements: *2155176820
101
+ version_requirements: *2152317720
103
102
  - !ruby/object:Gem::Dependency
104
103
  name: rdoc
105
- requirement: &2155176300 !ruby/object:Gem::Requirement
104
+ requirement: &2152247120 !ruby/object:Gem::Requirement
106
105
  none: false
107
106
  requirements:
108
107
  - - ! '>='
@@ -110,10 +109,10 @@ dependencies:
110
109
  version: '0'
111
110
  type: :runtime
112
111
  prerelease: false
113
- version_requirements: *2155176300
112
+ version_requirements: *2152247120
114
113
  - !ruby/object:Gem::Dependency
115
114
  name: dkastner-rocco
116
- requirement: &2155175420 !ruby/object:Gem::Requirement
115
+ requirement: &2152218520 !ruby/object:Gem::Requirement
117
116
  none: false
118
117
  requirements:
119
118
  - - ! '>='
@@ -121,10 +120,10 @@ dependencies:
121
120
  version: '0'
122
121
  type: :runtime
123
122
  prerelease: false
124
- version_requirements: *2155175420
123
+ version_requirements: *2152218520
125
124
  - !ruby/object:Gem::Dependency
126
125
  name: rspec
127
- requirement: &2155174780 !ruby/object:Gem::Requirement
126
+ requirement: &2152173260 !ruby/object:Gem::Requirement
128
127
  none: false
129
128
  requirements:
130
129
  - - ~>
@@ -132,10 +131,21 @@ dependencies:
132
131
  version: '2'
133
132
  type: :runtime
134
133
  prerelease: false
135
- version_requirements: *2155174780
134
+ version_requirements: *2152173260
135
+ - !ruby/object:Gem::Dependency
136
+ name: simplecov
137
+ requirement: &2152150180 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ type: :runtime
144
+ prerelease: false
145
+ version_requirements: *2152150180
136
146
  - !ruby/object:Gem::Dependency
137
147
  name: sqlite3-ruby
138
- requirement: &2155174140 !ruby/object:Gem::Requirement
148
+ requirement: &2152018840 !ruby/object:Gem::Requirement
139
149
  none: false
140
150
  requirements:
141
151
  - - ! '>='
@@ -143,10 +153,10 @@ dependencies:
143
153
  version: 1.3.0
144
154
  type: :runtime
145
155
  prerelease: false
146
- version_requirements: *2155174140
156
+ version_requirements: *2152018840
147
157
  - !ruby/object:Gem::Dependency
148
158
  name: timecop
149
- requirement: &2155173660 !ruby/object:Gem::Requirement
159
+ requirement: &2151921900 !ruby/object:Gem::Requirement
150
160
  none: false
151
161
  requirements:
152
162
  - - ! '>='
@@ -154,10 +164,10 @@ dependencies:
154
164
  version: '0'
155
165
  type: :runtime
156
166
  prerelease: false
157
- version_requirements: *2155173660
167
+ version_requirements: *2151921900
158
168
  - !ruby/object:Gem::Dependency
159
169
  name: timeframe
160
- requirement: &2155172900 !ruby/object:Gem::Requirement
170
+ requirement: &2151909660 !ruby/object:Gem::Requirement
161
171
  none: false
162
172
  requirements:
163
173
  - - ! '>='
@@ -165,10 +175,10 @@ dependencies:
165
175
  version: 0.0.8
166
176
  type: :runtime
167
177
  prerelease: false
168
- version_requirements: *2155172900
178
+ version_requirements: *2151909660
169
179
  - !ruby/object:Gem::Dependency
170
180
  name: sandbox
171
- requirement: &2155172460 !ruby/object:Gem::Requirement
181
+ requirement: &2151875600 !ruby/object:Gem::Requirement
172
182
  none: false
173
183
  requirements:
174
184
  - - ! '>='
@@ -176,10 +186,10 @@ dependencies:
176
186
  version: '0'
177
187
  type: :development
178
188
  prerelease: false
179
- version_requirements: *2155172460
189
+ version_requirements: *2151875600
180
190
  - !ruby/object:Gem::Dependency
181
191
  name: emitter
182
- requirement: &2155171900 !ruby/object:Gem::Requirement
192
+ requirement: &2151861520 !ruby/object:Gem::Requirement
183
193
  none: false
184
194
  requirements:
185
195
  - - ! '>='
@@ -187,7 +197,7 @@ dependencies:
187
197
  version: 0.5.0
188
198
  type: :development
189
199
  prerelease: false
190
- version_requirements: *2155171900
200
+ version_requirements: *2151861520
191
201
  description: Provides development and test environment for emitter gems
192
202
  email: derek.kastner@brighterplanet.com
193
203
  executables: []
@@ -238,7 +248,6 @@ files:
238
248
  - spec/lib/sniff/rake_tasks_spec.rb
239
249
  - spec/lib/test_support/cucumber/support/values_spec.rb
240
250
  - spec/spec_helper.rb
241
- has_rdoc: true
242
251
  homepage: https://github.com/brighterplanet/sniff
243
252
  licenses: []
244
253
  post_install_message:
@@ -254,7 +263,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
263
  version: '0'
255
264
  segments:
256
265
  - 0
257
- hash: 3830723489194360646
266
+ hash: 4083404508806820875
258
267
  required_rubygems_version: !ruby/object:Gem::Requirement
259
268
  none: false
260
269
  requirements:
@@ -263,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
272
  version: '0'
264
273
  requirements: []
265
274
  rubyforge_project:
266
- rubygems_version: 1.6.2
275
+ rubygems_version: 1.8.5
267
276
  signing_key:
268
277
  specification_version: 3
269
278
  summary: Test support for Brighter Planet carbon gems