spring 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/spring/client/binstub.rb +3 -3
- data/lib/spring/test/acceptance_test.rb +25 -16
- data/lib/spring/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30764feb6f0f2e8031cb5b8b6728ec6ff27384d9
|
4
|
+
data.tar.gz: 08edd60b72a8e467acd95c1a0d1a3dec611d54c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2457ae2573cfb0ea9a28889094b6851ac1fa46917ead02db9454c04502765f2093be0adb2e0aba31b89b325159ec888d4ae452cdf5f51df996882d0c14624e4
|
7
|
+
data.tar.gz: 337f36f3422ad3dc34f07b4a5567a30cc82dc962dd486b5650a86a8d748e3cf93ab6b5a2479db2481c9091ae07a110ae521429d4cf03ab03c4c6883331ae9159
|
data/README.md
CHANGED
@@ -228,6 +228,7 @@ You can add these to your Gemfile for additional commands:
|
|
228
228
|
to use `rake test path/to/test` to run a particular test/directory.
|
229
229
|
* [spring-commands-teaspoon](https://github.com/alejandrobabio/spring-commands-teaspoon.git)
|
230
230
|
* [spring-commands-m](https://github.com/gabrieljoelc/spring-commands-m.git)
|
231
|
+
* [spring-commands-rubocop](https://github.com/p0deje/spring-commands-rubocop)
|
231
232
|
|
232
233
|
## Use without adding to bundle
|
233
234
|
|
@@ -13,10 +13,9 @@ module Spring
|
|
13
13
|
# should cause the "unsprung" version of the command to run.
|
14
14
|
LOADER = <<CODE
|
15
15
|
begin
|
16
|
-
|
17
|
-
load spring_bin_path
|
16
|
+
load File.expand_path('../spring', __FILE__)
|
18
17
|
rescue LoadError => e
|
19
|
-
raise unless e.message.
|
18
|
+
raise unless e.message.include?('spring')
|
20
19
|
end
|
21
20
|
CODE
|
22
21
|
|
@@ -51,6 +50,7 @@ CODE
|
|
51
50
|
BINSTUB_VARIATIONS = Regexp.union [
|
52
51
|
%{begin\n load File.expand_path("../spring", __FILE__)\nrescue LoadError\nend\n},
|
53
52
|
%{begin\n load File.expand_path('../spring', __FILE__)\nrescue LoadError\nend\n},
|
53
|
+
%{begin\n spring_bin_path = File.expand_path('../spring', __FILE__)\n load spring_bin_path\nrescue LoadError => e\n raise unless e.message.end_with? spring_bin_path, 'spring/binstub'\nend\n},
|
54
54
|
LOADER
|
55
55
|
]
|
56
56
|
|
@@ -275,6 +275,13 @@ module Spring
|
|
275
275
|
end
|
276
276
|
|
277
277
|
test "binstub upgrade with new binstub variations" do
|
278
|
+
expected = <<-RUBY.gsub(/^ /, "")
|
279
|
+
#!/usr/bin/env ruby
|
280
|
+
#{Spring::Client::Binstub::LOADER.strip}
|
281
|
+
require 'bundler/setup'
|
282
|
+
load Gem.bin_path('rake', 'rake')
|
283
|
+
RUBY
|
284
|
+
|
278
285
|
# older variation with double quotes
|
279
286
|
File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
|
280
287
|
#!/usr/bin/env ruby
|
@@ -286,36 +293,38 @@ module Spring
|
|
286
293
|
load Gem.bin_path('rake', 'rake')
|
287
294
|
RUBY
|
288
295
|
|
296
|
+
assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
|
297
|
+
assert_equal expected, app.path("bin/rake").read
|
298
|
+
|
289
299
|
# newer variation with single quotes
|
290
|
-
File.write(app.path("bin/
|
300
|
+
File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
|
291
301
|
#!/usr/bin/env ruby
|
292
302
|
begin
|
293
303
|
load File.expand_path('../spring', __FILE__)
|
294
304
|
rescue LoadError
|
295
305
|
end
|
296
|
-
|
297
|
-
|
298
|
-
require 'rails/commands'
|
306
|
+
require 'bundler/setup'
|
307
|
+
load Gem.bin_path('rake', 'rake')
|
299
308
|
RUBY
|
300
309
|
|
301
|
-
assert_success "bin/spring binstub
|
310
|
+
assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
|
311
|
+
assert_equal expected, app.path("bin/rake").read
|
302
312
|
|
303
|
-
|
313
|
+
# newer variation which checks end of exception message
|
314
|
+
File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
|
304
315
|
#!/usr/bin/env ruby
|
305
|
-
|
316
|
+
begin
|
317
|
+
spring_bin_path = File.expand_path('../spring', __FILE__)
|
318
|
+
load spring_bin_path
|
319
|
+
rescue LoadError => e
|
320
|
+
raise unless e.message.end_with? spring_bin_path, 'spring/binstub'
|
321
|
+
end
|
306
322
|
require 'bundler/setup'
|
307
323
|
load Gem.bin_path('rake', 'rake')
|
308
324
|
RUBY
|
309
|
-
assert_equal expected, app.path("bin/rake").read
|
310
325
|
|
311
|
-
|
312
|
-
|
313
|
-
#{Spring::Client::Binstub::LOADER.strip}
|
314
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
315
|
-
require_relative '../config/boot'
|
316
|
-
require 'rails/commands'
|
317
|
-
RUBY
|
318
|
-
assert_equal expected, app.path("bin/rails").read
|
326
|
+
assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
|
327
|
+
assert_equal expected, app.path("bin/rake").read
|
319
328
|
end
|
320
329
|
|
321
330
|
test "binstub remove with new binstub variations" do
|
data/lib/spring/version.rb
CHANGED
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: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|