guard 2.12.1 → 2.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/guard +22 -10
  3. data/lib/guard/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 542d426a2c636cd85b3743881b15d82f5e1f7f17
4
- data.tar.gz: cdb10b37557cf465ac111d6de2af813990800810
3
+ metadata.gz: 87253f48163a3acc225be9e48f3f2490f5050e19
4
+ data.tar.gz: eae1d724e95f3ea6bd79e5ba319f0effb98a1346
5
5
  SHA512:
6
- metadata.gz: 691de8845c56ce3f7504d9dc856c08313c48f73b4d56dc67e07b6a4febf5b0431f5160aede3b85a6a557e1a29ed10f3947ab9da24d3a20c1ca6891910de6ac8f
7
- data.tar.gz: 5dee51aa89cb0c7baf23d0816a2fac58a1c58edb24af7d2accbf8f64da239623932f2b71b81ef668054a7b17c06e334429b73d0316021d16bf2497e13a1707b1
6
+ metadata.gz: 904ece1301c3125b2d094a5ddd228661a6dc5632d973729ade777e793982d8d1ed8f820f6e6a25b293ee097dd9835b8750a1224c92478cef0fcc599c0a7caef2
7
+ data.tar.gz: 1bd00a88245a6b828e219abb8ec724be5f1bc7e6b68dbabb4e67427be745cb26f6ec4d52c77ce2e415586c0f930391a1b9cd7ac6853805e4cfad1701751e1464
data/bin/guard CHANGED
@@ -1,18 +1,30 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- begin
4
- require "pathname"
5
- gemfile = Pathname(__FILE__).realpath + "../../Gemfile"
6
- if gemfile.exist?
7
- ENV["BUNDLE_GEMFILE"] ||= gemfile.to_s
8
- require "rubygems"
9
- require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
10
- else
11
- require "rubygems"
3
+ require "pathname"
4
+
5
+ default = Pathname(ENV.fetch("BUNDLE_GEMFILE", "Gemfile"))
6
+ relative_to_binstub = Pathname(__FILE__).realpath + "../../Gemfile"
7
+ gemfile = [default, relative_to_binstub].detect(&:exist?)
8
+
9
+ if gemfile
10
+ ENV["BUNDLE_GEMFILE"] = gemfile.to_s
11
+ require "rubygems"
12
+ require "bundler/setup"
13
+ else
14
+ require "rubygems"
15
+ end
16
+
17
+ def ignore_interrupts(*args)
18
+ pid = spawn(*args)
19
+ begin
20
+ Process.wait(pid)
21
+ rescue Interrupt
22
+ retry
12
23
  end
13
24
  end
14
25
 
15
- while !system(Gem.bin_path("guard", "_guard-core"), *ARGV) && $?.exitstatus == 2
26
+ guard_core_path = Gem.bin_path("guard", "_guard-core")
27
+ while !ignore_interrupts(guard_core_path, *ARGV) && $?.exitstatus == 2
16
28
  puts("Restarting guard...")
17
29
  end
18
30
  exit($?.exitstatus)
data/lib/guard/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "2.12.1"
2
+ VERSION = "2.12.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.1
4
+ version: 2.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor