Skip to content

Commit 4da3e2e

Browse files
committed
Merge pull request #431 from rails/grosser/client
use spring_client
2 parents 3ea8333 + 17cddaf commit 4da3e2e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ settings. Note that `~/.spring.rb` is loaded *before* bundler, but
294294
projects without having to be added to the project's Gemfile, require
295295
them in your `~/.spring.rb`.
296296

297-
`config/spring_preboot.rb` is also loaded before bundler and before a
297+
`config/spring_client.rb` is also loaded before bundler and before a
298298
server process is started, it can be used to add new top-level commands.
299299

300300
### Application root

lib/spring/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ def self.command_for(name)
4141

4242
# allow users to add hooks that do not run in the server
4343
# or modify start/stop
44-
if File.exist?("config/spring_preboot.rb")
45-
require "./config/spring_preboot.rb"
44+
if File.exist?("config/spring_client.rb")
45+
require "./config/spring_client.rb"
4646
end

lib/spring/test/acceptance_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ def exec_name
270270
assert_success "bin/rails runner 'puts 2'", stdout: "!callback!\n2"
271271
end
272272

273-
test "can define preboot tasks" do
274-
File.write("#{app.spring_config.sub('.rb', '_preboot.rb')}", <<-RUBY)
273+
test "can define client tasks" do
274+
File.write("#{app.spring_config.sub('.rb', '_client.rb')}", <<-RUBY)
275275
Spring::Client::COMMANDS["foo"] = lambda { |args| puts "bar -- \#{args.inspect}" }
276276
RUBY
277277
assert_success "bin/spring foo --baz", stdout: "bar -- [\"foo\", \"--baz\"]\n"

0 commit comments

Comments
 (0)