spring 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 239b79db86842dc2c1d0e6a82ac63a28425da6bdb199a09be37e3e6dfcb47fed
4
- data.tar.gz: f1e458e7a273425bd93d12f7ab023b91164777b9051eb1da5be13d188d048399
3
+ metadata.gz: 90758ca717a756e672dfeaaf8295f17fcfa38f3ea3bc8bd27093a4354d45b82f
4
+ data.tar.gz: 82533f3a3e3f5dc53c3f89d3b2734557bfefcf06b5cbe714238dba64160d56a3
5
5
  SHA512:
6
- metadata.gz: d79805cb44ca16a90556ffeb726b05323d719db51165b2279d269f0fc43292c9ae6510c766e02f7f86d509b3556bdfaa36985c363d64827ad092091923299a43
7
- data.tar.gz: b8acb6feab70ddd8dbb337b9d8540e01a4f285fecee7ebeb15ce4fb43f666ce35376cad6286c1d91723f7f1c6e60055ce9c3bbac04174e8322452a120b894418
6
+ metadata.gz: 80d8a7138fa74ad857a43671e54234da3a9b6265727f170c21905694397ebe5ec9b1102dbce3098835157e49e808cbbc52d74e1894a228ab0b25e521987cc4ca
7
+ data.tar.gz: 4366760559dfa2bae19ce7478302b35ca050cd431e39241427dfb5666de3a4eb704039ccdc4b02634556041aba71cebe22a053f4553e63db9d7ecdfbb980bf66
data/README.md CHANGED
@@ -232,6 +232,7 @@ You can add these to your Gemfile for additional commands:
232
232
  * [spring-commands-testunit](https://github.com/jonleighton/spring-commands-testunit) - useful for
233
233
  running `Test::Unit` tests on Rails 3, since only Rails 4 allows you
234
234
  to use `rake test path/to/test` to run a particular test/directory.
235
+ * [spring-commands-parallel-tests](https://github.com/DocSpring/spring-commands-parallel-tests) - Adds the `parallel_*` commands from [`parallel_tests`](https://github.com/grosser/parallel_tests).
235
236
  * [spring-commands-teaspoon](https://github.com/alejandrobabio/spring-commands-teaspoon.git)
236
237
  * [spring-commands-m](https://github.com/gabrieljoelc/spring-commands-m.git)
237
238
  * [spring-commands-rubocop](https://github.com/p0deje/spring-commands-rubocop)
@@ -172,6 +172,11 @@ module Spring
172
172
  end
173
173
  end
174
174
 
175
+ # Ensure we boot the process in the directory the command was called from,
176
+ # not from the directory Spring started in
177
+ original_dir = Dir.pwd
178
+ Dir.chdir(env['PWD'] || original_dir)
179
+
175
180
  pid = fork {
176
181
  Process.setsid
177
182
  IGNORE_SIGNALS.each { |sig| trap(sig, "DEFAULT") }
@@ -237,6 +242,7 @@ module Spring
237
242
  # (i.e. to prevent `spring rake -T | grep db` from hanging forever),
238
243
  # even when exception is raised before forking (i.e. preloading).
239
244
  reset_streams
245
+ Dir.chdir(original_dir)
240
246
  end
241
247
 
242
248
  def terminate
@@ -94,6 +94,7 @@ module Spring
94
94
  @child, child_socket = UNIXSocket.pair
95
95
 
96
96
  Bundler.with_original_env do
97
+ bundler_dir = File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first)
97
98
  @pid = Process.spawn(
98
99
  {
99
100
  "RAILS_ENV" => app_env,
@@ -102,7 +103,7 @@ module Spring
102
103
  "SPRING_PRELOAD" => preload ? "1" : "0"
103
104
  },
104
105
  "ruby",
105
- "-I", File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first),
106
+ *(bundler_dir != RbConfig::CONFIG["rubylibdir"] ? ["-I", bundler_dir] : []),
106
107
  "-I", File.expand_path("../..", __FILE__),
107
108
  "-e", "require 'spring/application/boot'",
108
109
  3 => child_socket,
@@ -5,7 +5,11 @@ module Spring
5
5
  attr_accessor :application_root, :quiet
6
6
 
7
7
  def gemfile
8
- ENV['BUNDLE_GEMFILE'] || "Gemfile"
8
+ if /\s1.9.[0-9]/ === Bundler.ruby_scope.gsub(/[\/\s]+/,'')
9
+ ENV["BUNDLE_GEMFILE"] || "Gemfile"
10
+ else
11
+ Bundler.default_gemfile
12
+ end
9
13
  end
10
14
 
11
15
  def after_fork_callbacks
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spring
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-14 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.0.1
117
+ rubygems_version: 3.0.3
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Rails application preloader