preek 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc66d75c60afea8fc34f0ab395268d29698ff0fd
4
- data.tar.gz: 2cd1af5168dd19c51340767e057311ec93e2b998
3
+ metadata.gz: 5aed7619266d23f50974bc835c2ce37a3ce50838
4
+ data.tar.gz: 3a1a111b77ddb81b401d5cc843d97e6e390dc213
5
5
  SHA512:
6
- metadata.gz: 22fe8c9460bb5a087ebff9ba5c28df2bdc92094b332620e4553839138969dd517e213ce535c832961a255039e559d974e84edd765707feac1da5cbd5643b2307
7
- data.tar.gz: 278da11c18cf1fa2424123cd846ff8dd4f4ba287fef7765dac0d42256ce6ddc100d52887a31776e45379a448a13d0ccea10519634b0927bdf3832c4815dabed5
6
+ metadata.gz: 0bf532309c7c3ac351a2c2d4a9af0b202a38c6060209b9b92cdaa81d44bc8120c21cb51a3934b71e3f00d8d9c0b4f70038da1b1827e3669fe98906243d0a255d
7
+ data.tar.gz: 5157bab1bf7bb8f6c4ebb82efc0e4dd4ea6554efd7b6f8405d4f2779d258b8f64855840f0dac224ee927e450aad54c6a7ee29bf04a16b1c1c40c538f785e8715
data/lib/preek/cli.rb CHANGED
@@ -40,8 +40,8 @@ module Preek
40
40
  def git
41
41
  files = git_status
42
42
  if $?.exitstatus == 0 && !files.empty?
43
- args = files.scan(/[ M?]+(.*\.rb)/)
44
- smell *args.flatten
43
+ args = files.scan(/[ M?]+(.*\.rb)/).flatten
44
+ smell *args unless args.empty?
45
45
  end
46
46
  end
47
47
 
data/lib/preek/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Preek
2
- VERSION = "1.4.1"
2
+ VERSION = "1.4.2"
3
3
  end
data/spec/cli_spec.rb CHANGED
@@ -161,11 +161,19 @@ describe Preek::CLI do
161
161
 
162
162
  describe 'Git' do
163
163
  Given(:cli) { Preek::CLI.new }
164
- Given(:git_output){" M .travis.yml\n M Gemfile\n M lib/random/file.rb\n M preek.gemspec\n"}
165
164
  Given{cli.stub(:git_status).and_return(git_output)}
166
- Given{cli.should_receive(:smell).with('lib/random/file.rb')}
167
-
168
165
  When{cli.git}
169
- Then{}
166
+
167
+ context 'with ruby file' do
168
+ Given(:git_output){" M .travis.yml\n M Gemfile\n M lib/random/file.rb\n M preek.gemspec\n"}
169
+ Given{cli.should_receive(:smell).with('lib/random/file.rb')}
170
+ Then{}
171
+ end
172
+
173
+ context 'without ruby file' do
174
+ Given(:git_output){" M .travis.yml\n M Gemfile\n M preek.gemspec\n"}
175
+ Given{cli.should_not receive(:smell)}
176
+ Then{}
177
+ end
170
178
  end
171
179
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preek
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Neverland