guard-jruby-rspec 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,12 +9,13 @@ module Guard
9
9
 
10
10
  def initialize(watchers = [], options = {})
11
11
  @options = {
12
- :all_after_pass => true,
13
- :all_on_start => true,
14
- :keep_failed => true,
15
- :spec_paths => ["spec"],
16
- :run_all => {},
17
- :monitor_file => ".guard-jruby-rspec"
12
+ :all_after_pass => true,
13
+ :all_on_start => true,
14
+ :keep_failed => true,
15
+ :spec_paths => ["spec"],
16
+ :spec_file_suffix => "_spec.rb",
17
+ :run_all => {},
18
+ :monitor_file => ".guard-jruby-rspec"
18
19
  }.merge(options)
19
20
  @last_failed = false
20
21
  @failed_paths = []
@@ -69,7 +70,7 @@ module Guard
69
70
  alias_method :run_on_change, :run_on_changes
70
71
 
71
72
  def reload_paths(paths)
72
- paths.each do |p|
73
+ paths.reject {|p| p.end_with?(@options[:spec_file_suffix])}.each do |p|
73
74
  if File.exists?(p)
74
75
  if p == @options[:monitor_file]
75
76
  # begin
@@ -4,7 +4,7 @@ require 'guard/jruby-rspec/formatters/notification_rspec'
4
4
  module Guard
5
5
  class JRubyRSpec
6
6
  class Runner
7
-
7
+
8
8
  def initialize(options = {})
9
9
  @options = {
10
10
  :cli => [],
@@ -27,10 +27,10 @@ module Guard
27
27
  UI.info(message, :reset => true)
28
28
 
29
29
  # it might be a problem to run Rspec within this runtime. Might have to create an
30
- # embedded jruby.
30
+ # embedded jruby.
31
31
  if File.exists?(@pipefile)
32
32
  raise "not supported yet"
33
- # instead of writing to the pipefile, we should probably use a
33
+ # instead of writing to the pipefile, we should probably use a
34
34
  # formatter and write to /dev/null
35
35
  # orig_stdout = $stdout.clone
36
36
  # orig_stderr = $stderr.clone
@@ -43,10 +43,13 @@ module Guard
43
43
  # $stderr.reopen(orig_stderr)
44
44
  # end
45
45
  else
46
+ orig_configuration = ::RSpec.configuration
46
47
  begin
47
48
  ::RSpec::Core::Runner.run(rspec_arguments(paths, @options))
48
49
  rescue SyntaxError => e
49
50
  UI.error e.message
51
+ ensure
52
+ ::RSpec.instance_variable_set(:@configuration, orig_configuration)
50
53
  end
51
54
  end
52
55
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module JRubyRSpecVersion
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,26 +2,26 @@
2
2
  name: guard-jruby-rspec
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Joe Kutner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
16
  version_requirements: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 0.10.0
21
21
  none: false
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.0
27
27
  none: false
@@ -31,13 +31,13 @@ dependencies:
31
31
  name: guard-rspec
32
32
  version_requirements: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ! '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 0.7.3
37
37
  none: false
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ! '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: 0.7.3
43
43
  none: false
@@ -47,13 +47,13 @@ dependencies:
47
47
  name: rspec
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ~>
50
+ - - "~>"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '2.7'
53
53
  none: false
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - ~>
56
+ - - "~>"
57
57
  - !ruby/object:Gem::Version
58
58
  version: '2.7'
59
59
  none: false
@@ -66,21 +66,13 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
- - !binary |-
70
- bGliL2d1YXJkLWpydWJ5LXJzcGVjLnJi
71
- - !binary |-
72
- bGliL2d1YXJkL2pydWJ5LXJzcGVjLnJi
73
- - !binary |-
74
- bGliL2d1YXJkL2pydWJ5LXJzcGVjL2luc3BlY3Rvci5yYg==
75
- - !binary |-
76
- bGliL2d1YXJkL2pydWJ5LXJzcGVjL3J1bm5lci5yYg==
77
- - !binary |-
78
- bGliL2d1YXJkL2pydWJ5LXJzcGVjL3ZlcnNpb24ucmI=
79
- - !binary |-
80
- bGliL2d1YXJkL2pydWJ5LXJzcGVjL2Zvcm1hdHRlcnMvbm90aWZpY2F0aW9u
81
- X3JzcGVjLnJi
82
- - !binary |-
83
- bGliL2d1YXJkL2pydWJ5LXJzcGVjL3RlbXBsYXRlcy9HdWFyZGZpbGU=
69
+ - lib/guard-jruby-rspec.rb
70
+ - lib/guard/jruby-rspec.rb
71
+ - lib/guard/jruby-rspec/inspector.rb
72
+ - lib/guard/jruby-rspec/runner.rb
73
+ - lib/guard/jruby-rspec/version.rb
74
+ - lib/guard/jruby-rspec/formatters/notification_rspec.rb
75
+ - lib/guard/jruby-rspec/templates/Guardfile
84
76
  - LICENSE
85
77
  - README.md
86
78
  homepage: http://rubygems.org/gems/guard-jruby-rspec
@@ -91,14 +83,14 @@ require_paths:
91
83
  - lib
92
84
  required_ruby_version: !ruby/object:Gem::Requirement
93
85
  requirements:
94
- - - ! '>='
86
+ - - ">="
95
87
  - !ruby/object:Gem::Version
96
88
  version: !binary |-
97
89
  MA==
98
90
  none: false
99
91
  required_rubygems_version: !ruby/object:Gem::Requirement
100
92
  requirements:
101
- - - ! '>='
93
+ - - ">="
102
94
  - !ruby/object:Gem::Version
103
95
  version: 1.3.6
104
96
  none: false