kevinrutherford-reek 0.3.1.5 → 0.3.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/reek/spec.rb CHANGED
@@ -5,6 +5,10 @@ module Reek
5
5
  #
6
6
  # Provides matchers for Rspec, making it easy to check code quality.
7
7
  #
8
+ # If you require this module somewhere within your spec (or in your spec_helper),
9
+ # Reek will arrange to update Spec::Runner's config so that it knows about the
10
+ # matchers defined here.
11
+ #
8
12
  # === Examples
9
13
  #
10
14
  # Here's a spec that ensures there are no smell warnings in the current project:
@@ -17,6 +21,12 @@ module Reek
17
21
  # end
18
22
  # end
19
23
  #
24
+ # And here's an even simpler way to do the same:
25
+ #
26
+ # it 'has no code smells' do
27
+ # Dir['lib/**/*.rb'].should_not reek
28
+ # end
29
+ #
20
30
  # Here's a simple check of a code fragment:
21
31
  #
22
32
  # 'def equals(other) other.thing == self.thing end'.should_not reek
@@ -128,3 +138,9 @@ module Reek
128
138
  end
129
139
  end
130
140
  end
141
+
142
+ if Object.const_defined?(:Spec)
143
+ Spec::Runner.configure do |config|
144
+ config.include(Reek::Spec)
145
+ end
146
+ end
data/lib/reek.rb CHANGED
@@ -4,5 +4,5 @@ require 'reek/report'
4
4
  require 'reek/smells/smells'
5
5
 
6
6
  module Reek # :doc:
7
- VERSION = '0.3.1.5'
7
+ VERSION = '0.3.1.6'
8
8
  end
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,3 @@ rescue LoadError
9
9
  end
10
10
 
11
11
  require 'reek/spec'
12
-
13
- Spec::Runner.configure do |config|
14
- config.include(Reek::Spec)
15
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kevinrutherford-reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.5
4
+ version: 0.3.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rutherford