Skip to content

Commit fa6960e

Browse files
authored
Remove Spork preloader (#4811)
- Spork is old and unsupported - I wasn't able to get it working with modern ruby - Spring is the modern implementation of the same concept
1 parent a1d94ac commit fa6960e

File tree

5 files changed

+2
-87
lines changed

5 files changed

+2
-87
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ group :development do
9595
gem 'listen'
9696
gem 'roodi'
9797
gem 'solargraph'
98-
gem 'spork', git: 'https://github.com/sporkrb/spork', ref: '224df49' # '~> 1.0rc'
9998
gem 'spring'
10099
gem 'spring-commands-rspec'
101100
end

Gemfile.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ GIT
3232
azure-core (~> 0.1.13)
3333
nokogiri (~> 1.6, >= 1.6.8)
3434

35-
GIT
36-
remote: https://github.com/sporkrb/spork
37-
revision: 224df492657e617a0c93c0319e78f0eefee5b636
38-
ref: 224df49
39-
specs:
40-
spork (1.0.0rc4)
41-
4235
GEM
4336
remote: https://rubygems.org/
4437
specs:
@@ -691,7 +684,6 @@ DEPENDENCIES
691684
sinatra (~> 4.2)
692685
sinatra-contrib
693686
solargraph
694-
spork!
695687
spring
696688
spring-commands-rspec
697689
statsd-ruby (~> 1.5.0)

scripts/file_watcher.rb

Lines changed: 0 additions & 29 deletions
This file was deleted.

spec/README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -159,27 +159,3 @@ real 18.628 2.077 13.934 19.062 21.821
159159
user 0.177 0.032 0.129 0.185 0.233
160160
sys 0.103 0.014 0.078 0.107 0.126
161161
```
162-
163-
#### Spork (Legacy)
164-
165-
Spork is an older implementation of the same "forking" strategy implemented by Spring.
166-
167-
### Running Individual Tests
168-
169-
In one terminal, change to the `Cloud Controller` root directory and run `bundle exec spork`
170-
171-
In a separate terminal, you can run selected unit tests quickly by running them with the `--drb` option, as in:
172-
173-
bundle exec rspec --drb spec/unit/models/services/service_plan_visibility_spec.rb
174-
175-
You can configure your IDE to take advantage of spork by inserting the `--drb` option. If `spork` isn't running `rspec` will ignore the `--drb` option and run the test the usual slower way.
176-
177-
Press Ctrl-C in the first terminal to stop running `spork`.
178-
179-
### Running Tests Automatically When Files Change
180-
181-
In one terminal, change to the `Cloud Controller` root directory and run `bundle exec scripts/file-watcher.rb`
182-
183-
As files change, they, or their related spec files, will be run automatically.
184-
185-
Press Ctrl-C to stop running `file-watcher.rb`.

spec/spec_helper.rb

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,5 @@
33
require 'mock_redis'
44
require 'spec_helper_helper'
55

6-
begin
7-
require 'spork'
8-
# uncomment the following line to use spork with the debugger
9-
# require 'spork/ext/ruby-debug'
10-
11-
run_spork = !`ps | grep spork | grep -v grep`.empty?
12-
rescue LoadError
13-
run_spork = false
14-
end
15-
16-
if run_spork
17-
Spork.prefork do
18-
# Loading more in this block will cause your tests to run faster. However,
19-
# if you change any configuration or code from libraries loaded here, you'll
20-
# need to restart spork for it to take effect.
21-
SpecHelperHelper.init
22-
end
23-
Spork.each_run do
24-
# This code will be run each time you run your specs.
25-
SpecHelperHelper.each_run
26-
end
27-
else
28-
SpecHelperHelper.init
29-
SpecHelperHelper.each_run
30-
end
6+
SpecHelperHelper.init
7+
SpecHelperHelper.each_run

0 commit comments

Comments
 (0)