File tree Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Expand file tree Collapse file tree 2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 1
1
command = File . basename ( $0)
2
2
bin_path = File . expand_path ( "../../../bin/spring" , __FILE__ )
3
3
4
- # When we run a command which does not go through Spring (e.g. DISABLE_SPRING
5
- # is used, or we just call 'rails' or something) then we get this warning from
6
- # Rubygems:
7
- #
8
- # WARN: Unresolved specs during Gem::Specification.reset: activesupport (<= 5.1, >= 4.2)
9
- # WARN: Clearing out unresolved specs.
10
- # Please report a bug if this causes problems.
11
- #
12
- # This happens due to our dependency on activesupport, when Bundler.setup gets
13
- # called. We don't actually *use* the dependency; it is purely there to
14
- # restrict the Rails version that we're compatible with.
15
- #
16
- # When the warning is shown, Rubygems just does the below.
17
- # Therefore, by doing it ourselves here, we can avoid the warning.
18
- if Gem ::Specification . respond_to? ( :unresolved_deps )
19
- Gem ::Specification . unresolved_deps . clear
20
- else
21
- Gem . unresolved_deps . clear
22
- end
23
-
24
4
if command == "spring"
25
5
load bin_path
26
6
else
Original file line number Diff line number Diff line change @@ -13,11 +13,7 @@ Gem::Specification.new do |gem|
13
13
gem . files = Dir [ "LICENSE.txt" , "README.md" , "lib/**/*" , "bin/*" ]
14
14
gem . executables = gem . files . grep ( %r{^bin/} ) . map { |f | File . basename ( f ) }
15
15
16
- # We don't directly use Active Support (Spring needs to be able to run
17
- # without gem dependencies), but this will ensure that this version of
18
- # Spring can't be installed alongside an incompatible Rails version.
19
- gem . add_dependency 'activesupport' , '>= 4.2'
20
-
21
16
gem . add_development_dependency 'rake'
22
17
gem . add_development_dependency 'bump'
18
+ gem . add_development_dependency 'activesupport'
23
19
end
You can’t perform that action at this time.
0 commit comments