spring 1.1.0.beta2 → 1.1.0.beta3

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
  SHA1:
3
- metadata.gz: 9be8bb694add40714afc5a6b350c2efc4a5348d0
4
- data.tar.gz: 5af55d085e93f225c9d3ad9cdcbf89739a8dc6e4
3
+ metadata.gz: ec57b11dfce83e9e7ca74433cd0e18e0e4b499f3
4
+ data.tar.gz: 61e4462c800903ab2d66710ccc92544a2a5f251b
5
5
  SHA512:
6
- metadata.gz: 38c97ef6b3025ed82fca2d2784ead4c978deaab7226bf8504da55e4e8e7aa9d51ac49f5379ec1d27ab2fa9dd077623b99c8685e9f71c018dbfb74457b9f66958
7
- data.tar.gz: d9501f771bdaf0f9b9da74bc4353b6b73baeb99671384034fd8307c90c91ba212aa31e45f868ee6d92bd418da02404570722be2fe2e6a2688acb4600cace8af5
6
+ metadata.gz: 38741e9b52477feee7d28b28ea299438f46174f89e64ca16a5a34a9b673d723fd9b4830d9a216c958f3b5e2b8f66bc8bea2ca536fcfb498fb8c524ef508771ce
7
+ data.tar.gz: d0c5bdfcaacf59dae01f4701c2d974675a624485d10efbe6aab155055e773b696d332fc54ba4e24a285ce1127bc16a11f3323f6328d771c34e9fe0cb57898314
@@ -36,15 +36,14 @@ unless defined?(Spring)
36
36
  require "rubygems"
37
37
  require "bundler"
38
38
 
39
- match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
40
- version = match && match[1]
39
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
40
+ ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
41
+ ENV["GEM_HOME"] = ""
42
+ Gem.paths = ENV
41
43
 
42
- ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
43
- ENV["GEM_HOME"] = ""
44
- Gem.paths = ENV
45
-
46
- gem "spring", version
47
- require "spring/binstub"
44
+ gem "spring", match[1]
45
+ require "spring/binstub"
46
+ end
48
47
  end
49
48
  CODE
50
49
 
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "1.1.0.beta2"
2
+ VERSION = "1.1.0.beta3"
3
3
  end
@@ -62,7 +62,11 @@ module Spring
62
62
  end
63
63
 
64
64
  def log_file
65
- @log_file ||= log_file_path.open("w+")
65
+ @log_file ||= begin
66
+ tmp = path("tmp")
67
+ tmp.mkdir unless tmp.exist?
68
+ tmp.join("spring.log").open("w+")
69
+ end
66
70
  end
67
71
 
68
72
  def env
@@ -72,7 +76,7 @@ module Spring
72
76
  "HOME" => user_home.to_s,
73
77
  "RAILS_ENV" => nil,
74
78
  "RACK_ENV" => nil,
75
- "SPRING_LOG" => log_file_path.to_s
79
+ "SPRING_LOG" => log_file.path
76
80
  }
77
81
  end
78
82
 
@@ -258,13 +262,14 @@ module Spring
258
262
  end
259
263
 
260
264
  def system(command)
261
- Kernel.system("#{command} > /dev/null") or raise "command failed: #{command}"
262
- end
265
+ if ENV["SPRING_DEBUG"]
266
+ puts "$ #{command}\n"
267
+ else
268
+ command = "#{command} > /dev/null"
269
+ end
263
270
 
264
- def bundle
265
- return if @bundled
266
- application.bundle
267
- @bundled = true
271
+ Kernel.system(command) or raise "command failed: #{command}"
272
+ puts if ENV["SPRING_DEBUG"]
268
273
  end
269
274
 
270
275
  # Sporadic SSL errors keep causing test failures so there are anti-SSL workarounds here
@@ -295,7 +300,8 @@ module Spring
295
300
  end
296
301
  end
297
302
 
298
- bundle
303
+ install_spring
304
+
299
305
  application.run! "bundle exec rails g scaffold post title:string"
300
306
  application.run! "bundle exec rake db:migrate db:test:clone"
301
307
  end
@@ -305,23 +311,21 @@ module Spring
305
311
  end
306
312
 
307
313
  def install_spring
308
- unless @installed
309
- # Need to do this here too because the app may have been generated with
310
- # a different ruby
311
- bundle
314
+ return if @installed
312
315
 
313
- system("gem build spring.gemspec 2>/dev/null")
314
- application.run! "gem install ../../../spring-#{Spring::VERSION}.gem", timeout: nil
316
+ system("gem build spring.gemspec 2>&1")
317
+ application.run! "gem install ../../../spring-#{Spring::VERSION}.gem", timeout: nil
315
318
 
316
- FileUtils.rm_rf application.path("bin")
319
+ application.bundle
317
320
 
318
- if application.path("bin_original").exist?
319
- FileUtils.cp_r application.path("bin_original"), application.path("bin")
320
- end
321
+ FileUtils.rm_rf application.path("bin")
321
322
 
322
- application.run! "#{application.spring} binstub --all"
323
- @installed = true
323
+ if application.path("bin_original").exist?
324
+ FileUtils.cp_r application.path("bin_original"), application.path("bin")
324
325
  end
326
+
327
+ application.run! "#{application.spring} binstub --all"
328
+ @installed = true
325
329
  end
326
330
 
327
331
  def copy_to(path)
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.1.0.beta2
4
+ version: 1.1.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-12 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport