rspec-interactive 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfaebc90c8fc0856566eb671fb122248778540ce78832af3a4c7b8cc3e8374a2
4
- data.tar.gz: 476896ae26c3acf5fef26486ba7d3b5ee4caa2de220bb2c42b61f740989d6d92
3
+ metadata.gz: 448fb430c0970d2d6f3dc12a3a1b6577dde234516d0d7f3fdccc735be784919b
4
+ data.tar.gz: 650d41f575295fb43d1c97930ae49e4a7fe34aac1d4cb1ca2a7d3fe6a1cb25c6
5
5
  SHA512:
6
- metadata.gz: 20746051789c2591c9e398e65e645b343c994b1cae438f5c509d107217298af9bbef9d0c12327f446ed47214a7800c3ed594acad929fc48873280f5aed380c36
7
- data.tar.gz: e844ef291294500ca6702a876662f03f6c20ec261a4864eb43dacca7d8b17fd29b995ea567ccbb3c0d9170c204e24902679b0ca4e24aa4e3925c86026ba5eca3
6
+ metadata.gz: d5a4b51199209d0d248e1fc26a2d7e3cb4abf993eb2a61775162eda5107a2a97529bdd58867cb1e870a9c10f9da7c3ef60ce0ccd4ad484f6f900f9c2b0708a6f
7
+ data.tar.gz: f57523af399e9ca55303101479fbc0940c60095a0ffe93a2092255954fe5be3003bfc82c41c7a416df72a12d72fd4aae0d578b5d7f6da85c1385a9f620950227
data/.gitignore CHANGED
@@ -2,3 +2,5 @@ rspec-interactive-*.gem
2
2
  .rspec_interactive_history
3
3
  .rspec_interactive_config
4
4
  .idea
5
+ vendor
6
+ .bundle
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- ruby '3.0.0'
4
-
5
3
  source "https://rubygems.org"
6
4
 
7
5
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-interactive (0.9.4)
4
+ rspec-interactive (0.9.5)
5
5
  listen
6
6
  pry
7
7
  rspec-core
@@ -13,6 +13,7 @@ GEM
13
13
  coderay (1.1.3)
14
14
  diff-lcs (1.4.4)
15
15
  ffi (1.15.5)
16
+ ffi (1.15.5-java)
16
17
  listen (3.7.1)
17
18
  rb-fsevent (~> 0.10, >= 0.10.3)
18
19
  rb-inotify (~> 0.9, >= 0.9.10)
@@ -20,6 +21,10 @@ GEM
20
21
  pry (0.14.1)
21
22
  coderay (~> 1.1)
22
23
  method_source (~> 1.0)
24
+ pry (0.14.1-java)
25
+ coderay (~> 1.1)
26
+ method_source (~> 1.0)
27
+ spoon (~> 0.0)
23
28
  rb-fsevent (0.11.1)
24
29
  rb-inotify (0.10.1)
25
30
  ffi (~> 1.0)
@@ -38,16 +43,16 @@ GEM
38
43
  rspec-support (3.9.4)
39
44
  rspec-teamcity (1.0.0)
40
45
  rspec (>= 2.99, >= 2.14.2, < 4)
46
+ spoon (0.0.6)
47
+ ffi
41
48
 
42
49
  PLATFORMS
50
+ universal-java-11
43
51
  x86_64-darwin-20
44
52
 
45
53
  DEPENDENCIES
46
54
  rspec-expectations
47
55
  rspec-interactive!
48
56
 
49
- RUBY VERSION
50
- ruby 3.0.0p0
51
-
52
57
  BUNDLED WITH
53
58
  2.2.17
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module Interactive
5
- VERSION = "0.9.5"
5
+ VERSION = "0.9.6"
6
6
  end
7
7
  end
@@ -57,7 +57,7 @@ module RSpec
57
57
  load config_file if config_file
58
58
 
59
59
  check_rails
60
- trap_interrupt
60
+ maybe_trap_interrupt
61
61
  configure_pry
62
62
 
63
63
  @startup_thread = Thread.start do
@@ -95,7 +95,17 @@ module RSpec
95
95
  end
96
96
  end
97
97
 
98
- def self.trap_interrupt
98
+ def self.maybe_trap_interrupt
99
+ return unless RbConfig::CONFIG['ruby_install_name'] == 'jruby'
100
+
101
+ # When on JRuby, Pry traps interrupts and raises an Interrupt exception.
102
+ # Unfortunately, raising Interrupt is not enough when RSpec is running since it
103
+ # will only cause the current example to fail. We want to kill RSpec entirely
104
+ # if it is running so here we disable Pry's handling and rewrite it to include
105
+ # special handling for RSpec.
106
+
107
+ Pry.config.should_trap_interrupts = false
108
+
99
109
  trap('INT') do
100
110
  if @runner
101
111
  # We are on a different thread. There is a race here. Ignore nil.
@@ -119,9 +129,6 @@ module RSpec
119
129
  end
120
130
 
121
131
  def self.configure_pry
122
- # Prevent Pry from trapping too. It will break ctrl-c handling.
123
- Pry.config.should_trap_interrupts = false
124
-
125
132
  # Set up IO.
126
133
  Pry.config.input = Readline
127
134
  Pry.config.output = @output_stream
@@ -189,6 +196,7 @@ module RSpec
189
196
 
190
197
  # Run.
191
198
  exit_code = @runner.run
199
+ ensure
192
200
  @runner = nil
193
201
 
194
202
  # Reenable history
@@ -198,8 +206,6 @@ module RSpec
198
206
  RSpec.clear_examples
199
207
  RSpec.reset
200
208
  @config_cache.replay_configuration
201
- ensure
202
- @runner = nil
203
209
  end
204
210
 
205
211
  def self.rspec_for_server(client, args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-interactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Dower