guard-rspec 2.2.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/guard/rspec.rb CHANGED
@@ -6,7 +6,7 @@ module Guard
6
6
  autoload :Runner, 'guard/rspec/runner'
7
7
  autoload :Inspector, 'guard/rspec/inspector'
8
8
 
9
- attr_accessor :last_failed, :failed_paths
9
+ attr_accessor :last_failed, :failed_paths, :runner, :inspector
10
10
 
11
11
  def initialize(watchers = [], options = {})
12
12
  super
@@ -54,7 +54,7 @@ module Guard
54
54
  single_spec = paths && paths.length == 1 && paths[0].include?("_spec") ? paths[0] : nil
55
55
  failed_specs = File.open(path) { |file| file.read.split("\n") }
56
56
  File.delete(path)
57
-
57
+
58
58
  if single_spec
59
59
  failed_specs = failed_specs.select{|p| p.include? single_spec}
60
60
  end
@@ -71,12 +71,12 @@ module Guard
71
71
  end
72
72
  end
73
73
  end
74
-
74
+
75
75
  unless focused
76
76
  paths += failed_paths if @options[:keep_failed]
77
77
  paths = @inspector.clean(paths)
78
78
  end
79
-
79
+
80
80
  if passed = @runner.run(paths)
81
81
  remove_failed(paths)
82
82
 
@@ -7,6 +7,8 @@ module Guard
7
7
 
8
8
  FAILURE_EXIT_CODE = 2
9
9
 
10
+ attr_accessor :options
11
+
10
12
  def initialize(options = {})
11
13
  @options = {
12
14
  :bundler => true,
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RSpecVersion
3
- VERSION = "2.2.2"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-28 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard