rspec-interactive 0.9.12 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -2
- data/lib/rspec-interactive/rspec_core_parser.rb +22 -0
- data/lib/rspec-interactive/version.rb +1 -1
- data/lib/rspec-interactive.rb +7 -3
- data/{runner → scripts}/rspec-interactive-run +1 -1
- data/tests/parse_error_test.rb +17 -0
- metadata +6 -7
- data/runner/Gemfile +0 -5
- data/runner/Gemfile.lock +0 -14
- data/runner/README.md +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fa7f485edd73e508aae2ef78bc0a1e6732ff68d21426167286593a403d62e8d
|
4
|
+
data.tar.gz: ce16787bd05a0fb8f58ee345b5364e3b7ecd2ae4c6facff80de4c79da1529e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67d4cf6b38665652da822cf984a147b8e6446a508436e89adf40606cdaa661060d4b089541b43b4524e4549265cb4e6a72e8c9355b6a376c6ba41de6f3a59421
|
7
|
+
data.tar.gz: 98d9746462b2de2bdde2c0041d52401f333032760aaee6355a387a6753533d0fd0bf2363574f71b6855d502c9c2c06cb3e99ae78c6fca077de641ed088f3234b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rspec-interactive (0.9.
|
4
|
+
rspec-interactive (0.9.13)
|
5
5
|
pry
|
6
6
|
rspec-core
|
7
7
|
rspec-teamcity (= 1.0.0)
|
@@ -11,7 +11,6 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
coderay (1.1.3)
|
13
13
|
diff-lcs (1.4.4)
|
14
|
-
ffi (1.15.5)
|
15
14
|
ffi (1.15.5-java)
|
16
15
|
method_source (1.0.0)
|
17
16
|
pry (0.14.1)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rspec/core/option_parser'
|
2
|
+
|
3
|
+
# RSpec::Core::Parser calls abort on parse error. This kills the process.
|
4
|
+
# Here we replace abort so that it will raise instead.
|
5
|
+
|
6
|
+
# In some cases abort is called in response to an exception. If we simply raise,
|
7
|
+
# the original exception will be logged as the cause. This will lead to duplicate
|
8
|
+
# messaging. Here we define our own exception so that we can ensure no cause is
|
9
|
+
# logged.
|
10
|
+
class ParseError < StandardError
|
11
|
+
def cause
|
12
|
+
nil
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
module RSpec::Core
|
17
|
+
class Parser
|
18
|
+
def abort(msg)
|
19
|
+
raise ParseError.new(msg)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/rspec-interactive.rb
CHANGED
@@ -16,6 +16,7 @@ require 'rspec-interactive/refresh_command'
|
|
16
16
|
require 'rspec-interactive/rspec_command'
|
17
17
|
require 'rspec-interactive/rspec_config_cache'
|
18
18
|
require 'rspec-interactive/rspec_core_example'
|
19
|
+
require 'rspec-interactive/rspec_core_parser'
|
19
20
|
require 'rspec-interactive/rubo_cop_command'
|
20
21
|
require 'rspec-interactive/runner'
|
21
22
|
require 'rspec-interactive/stdio'
|
@@ -275,11 +276,14 @@ module RSpec
|
|
275
276
|
end
|
276
277
|
|
277
278
|
def self.rubo_cop(args)
|
278
|
-
|
279
|
-
|
280
|
-
|
279
|
+
begin
|
280
|
+
require 'rubocop'
|
281
|
+
rescue LoadError
|
281
282
|
@error_stream.puts "fatal: RuboCop not found. Is the gem installed in this project?"
|
283
|
+
return
|
282
284
|
end
|
285
|
+
|
286
|
+
RuboCop::CLI.new.run args
|
283
287
|
end
|
284
288
|
|
285
289
|
def self.eval(line, options, &block)
|
@@ -9,7 +9,7 @@ require 'socket'
|
|
9
9
|
port: 5678
|
10
10
|
}
|
11
11
|
|
12
|
-
|
12
|
+
OptionParser.new do |opts|
|
13
13
|
opts.banner = "Executes RSpec by connecting to a running RSpec Interactive shell.\n\n"\
|
14
14
|
"Usage: bundle exec rspec-interactive-run [--host <host>] [--port <port>] [rspec-args]"
|
15
15
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require_relative 'support/test_helper'
|
2
|
+
|
3
|
+
Test.test "parse error" do
|
4
|
+
await_prompt
|
5
|
+
input "rspec --foo"
|
6
|
+
await_prompt
|
7
|
+
input "exit"
|
8
|
+
await_termination
|
9
|
+
expect_equal "output", output.gsub(/^from .*lib\/rspec-interactive/, 'from [...]'), <<~EOF
|
10
|
+
[1] pry(main)> rspec --foo
|
11
|
+
ParseError: invalid option: --foo
|
12
|
+
|
13
|
+
Please use --help for a listing of valid options
|
14
|
+
from [...]/rspec_core_parser.rb:19:in `abort'
|
15
|
+
[1] pry(main)> exit
|
16
|
+
EOF
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-interactive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Dower
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-core
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/rspec-interactive/rspec_command.rb
|
86
86
|
- lib/rspec-interactive/rspec_config_cache.rb
|
87
87
|
- lib/rspec-interactive/rspec_core_example.rb
|
88
|
+
- lib/rspec-interactive/rspec_core_parser.rb
|
88
89
|
- lib/rspec-interactive/rubo_cop_command.rb
|
89
90
|
- lib/rspec-interactive/runner.rb
|
90
91
|
- lib/rspec-interactive/stdio.rb
|
@@ -93,11 +94,8 @@ files:
|
|
93
94
|
- lib/rspec-interactive/version.rb
|
94
95
|
- lib/teamcity/spec/runner/formatter/teamcity/formatter.rb
|
95
96
|
- rspec-interactive.gemspec
|
96
|
-
- runner/Gemfile
|
97
|
-
- runner/Gemfile.lock
|
98
|
-
- runner/README.md
|
99
|
-
- runner/rspec-interactive-run
|
100
97
|
- scripts/release.sh
|
98
|
+
- scripts/rspec-interactive-run
|
101
99
|
- scripts/run-with-local-dep.sh
|
102
100
|
- tests/debugged_spec_test.rb
|
103
101
|
- tests/eof_test.rb
|
@@ -105,6 +103,7 @@ files:
|
|
105
103
|
- tests/failing_spec_test.rb
|
106
104
|
- tests/glob_test.rb
|
107
105
|
- tests/line_number_test.rb
|
106
|
+
- tests/parse_error_test.rb
|
108
107
|
- tests/passing_spec_test.rb
|
109
108
|
- tests/rerun_failed_specs_test.rb
|
110
109
|
- tests/spec_with_syntax_error_test.rb
|
@@ -132,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
131
|
- !ruby/object:Gem::Version
|
133
132
|
version: '0'
|
134
133
|
requirements: []
|
135
|
-
rubygems_version: 3.
|
134
|
+
rubygems_version: 3.3.3
|
136
135
|
signing_key:
|
137
136
|
specification_version: 4
|
138
137
|
summary: An interactive console for running specs.
|
data/runner/Gemfile
DELETED
data/runner/Gemfile.lock
DELETED
data/runner/README.md
DELETED