lib/spring/commands.rb in spring-0.9.0 vs lib/spring/commands.rb in spring-0.9.1
- old
+ new
@@ -19,19 +19,22 @@
commands.fetch name
end
require "spring/commands/rails"
require "spring/commands/rake"
- require "spring/commands/testunit"
- # If the config/spring.rb contains requires for commands from other gems,
- # then we need to be under bundler.
- require "bundler/setup"
-
# Load custom commands, if any.
# needs to be at the end to allow modification of existing commands.
config = File.expand_path("~/.spring.rb")
require config if File.exist?(config)
+
+ # If the config/spring.rb contains requires for commands from other gems,
+ # then we need to be under bundler.
+ require "bundler/setup"
+
+ Gem::Specification.map(&:name).grep(/^spring-commands-/).each do |command|
+ require command
+ end
config = File.expand_path("./config/spring.rb")
require config if File.exist?(config)
end