spring 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9ab248b060de48656183c39be797c8eb377d1eb
4
- data.tar.gz: 94bb1ce1cd992afa8930576f76a7c3d6678d9b5e
3
+ metadata.gz: 30764feb6f0f2e8031cb5b8b6728ec6ff27384d9
4
+ data.tar.gz: 08edd60b72a8e467acd95c1a0d1a3dec611d54c9
5
5
  SHA512:
6
- metadata.gz: 87bbd18c5b6e8370a741472faa21d7933541227307be14306d050244e2cd523d81ffa88afefcd015419c8a2fd54edcfd394192d7ab02af76c3c718826f536f28
7
- data.tar.gz: 1048881582aa1e47d94602144911752f208e57ae956d225f93b33310851074269f34785ce05dbf8deb19590fe084a617a238a49734de1f5cfba5858d18636251
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
- spring_bin_path = File.expand_path('../spring', __FILE__)
17
- load spring_bin_path
16
+ load File.expand_path('../spring', __FILE__)
18
17
  rescue LoadError => e
19
- raise unless e.message.end_with? spring_bin_path, 'spring/binstub'
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/rails"), <<-RUBY.strip_heredoc)
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
- APP_PATH = File.expand_path('../../config/application', __FILE__)
297
- require_relative '../config/boot'
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 --all", stdout: "upgraded"
310
+ assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
311
+ assert_equal expected, app.path("bin/rake").read
302
312
 
303
- expected = <<-RUBY.gsub(/^ /, "")
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
- #{Spring::Client::Binstub::LOADER.strip}
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
- expected = <<-RUBY.gsub(/^ /, "")
312
- #!/usr/bin/env ruby
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
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
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: 1.4.3
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-17 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport