guard 2.11.1 → 2.12.0

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: 1c08c0020f1277d3e88398066112cb1b4798d0f1
4
- data.tar.gz: ffcd381f2cd3cea854d6b88d321041a514cfffa5
3
+ metadata.gz: 5b69ff7c38770b8a29924a38a705223f786200d6
4
+ data.tar.gz: 4e2ee36f5c3d9a7cab2694159a42db76c9b90cbe
5
5
  SHA512:
6
- metadata.gz: 934c5636ffd82320f8d47d0b62773a43e69c57146f9d891d866967b1ce80be0e90284f1bb2c858cb18f13bc39ce804cff932498b36a93bb8e0a37715c11f533f
7
- data.tar.gz: 3fff026d2a99b080c45a45312dc66341e6b8e4b17ac1d150b9aa32e9add2429bbe7509ca1effe0490bfd2587df61132ed9a9470bb9efd35c5b92641edcf75a49
6
+ metadata.gz: f41277e89d009cadea030fef8d1f30940f092e64250b6e093b1f843082ce3bf23e10c764bac7eeb3ed6c6d800af309ce03c461ff6d9fea682b4be82695c35fb8
7
+ data.tar.gz: 1914c80a762e4988c07b05b4e4f53811647cfb046355cbed428be143aef11db75bc97e05572b51ead74f1a9b31ce441ef04ede888781e98a1db58c733747030b
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Guard
4
4
  =====
5
5
 
6
- [![Gem Version](https://badge.fury.io/rb/guard.png)](http://badge.fury.io/rb/guard) [![Build Status](https://travis-ci.org/guard/guard.png?branch=master)](https://travis-ci.org/guard/guard) [![Dependency Status](https://gemnasium.com/guard/guard.png)](https://gemnasium.com/guard/guard) [![Code Climate](https://codeclimate.com/github/guard/guard.png)](https://codeclimate.com/github/guard/guard) [![Coverage Status](https://coveralls.io/repos/guard/guard/badge.png?branch=master)](https://coveralls.io/r/guard/guard) [![Inline docs](http://inch-ci.org/github/guard/guard.png)](http://inch-ci.org/github/guard/guard)
6
+ [![Gem Version](https://img.shields.io/gem/v/guard.svg?style=flat)](https://rubygems.org/gems/guard) [![Build Status](https://travis-ci.org/guard/guard.svg)](https://travis-ci.org/guard/guard) [![Dependency Status](https://gemnasium.com/guard/guard.png)](https://gemnasium.com/guard/guard) [![Code Climate](https://codeclimate.com/github/guard/guard/badges/gpa.svg)](https://codeclimate.com/github/guard/guard) [![Test Coverage](https://codeclimate.com/github/guard/guard/badges/coverage.svg)](https://codeclimate.com/github/guard/guard) [![Inline docs](http://inch-ci.org/github/guard/guard.svg)](http://inch-ci.org/github/guard/guard)
7
7
 
8
8
  <img src="http://cl.ly/image/1k3o1r2Z3a0J/guard-Icon.png" alt="Guard Icon" align="right" />
9
9
  Guard is a command line tool to easily handle events on file system modifications.
data/bin/_guard-core ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "guard"
4
+
5
+ begin
6
+ require "guard/aruba_adapter"
7
+ rescue LoadError => e
8
+ abort "#{e.inspect} - perhaps you need to run using `bundle exec`?"
9
+ end
10
+
11
+ Guard::ArubaAdapter.new(ARGV.dup).execute!
data/bin/guard CHANGED
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "guard"
3
+ require "pathname"
4
+ ENV["BUNDLE_GEMFILE"] ||= (Pathname(__FILE__).realpath + "../../Gemfile").to_s
4
5
 
5
- begin
6
- require "guard/aruba_adapter"
7
- rescue LoadError => e
8
- abort "#{e.inspect} - perhaps you need to run using `bundle exec`?"
9
- end
6
+ require "rubygems"
7
+ require "bundler/setup"
10
8
 
11
- Guard::ArubaAdapter.new(ARGV.dup).execute!
9
+ while !system(Gem.bin_path("guard", "_guard-core"), *ARGV) && $?.exitstatus == 2
10
+ puts("Restarting guard...")
11
+ end
12
+ exit($?.exitstatus)
data/lib/guard.rb CHANGED
@@ -155,11 +155,7 @@ module Guard
155
155
  return if guardfiles.empty?
156
156
 
157
157
  if guardfiles.any? { |path| /^Guardfile$/.match(path) }
158
- UI.warning <<EOS
159
- Guardfile changed - Guard will exit so you can restart it manually.
160
-
161
- More info here: https://github.com/guard/guard/wiki/Guard-2.10.3-exits-when-Guardfile-is-changed
162
- EOS
158
+ UI.warning "Guardfile changed -- _guard-core will exit.\n"
163
159
  exit 2 # nonzero to break any while loop
164
160
  else
165
161
  msg = "Config changed: %s - Guard will exit so it can be restarted."
@@ -76,13 +76,14 @@ module Guard
76
76
 
77
77
  _ui(:info, format(INFO_TEMPLATE_ADDED, plugin_name))
78
78
 
79
- rescue Errno::ENOENT
79
+ rescue Errno::ENOENT => error
80
80
 
81
81
  name = plugin_name.downcase
82
82
  class_name = name.gsub("-", "").capitalize
83
83
  _ui(:error, "Could not load 'guard/#{name}'"\
84
84
  " or '~/.guard/templates/#{name}'"\
85
85
  " or find class Guard::#{class_name}")
86
+ _ui(:error, "Error is: #{error}")
86
87
  end
87
88
 
88
89
  # Adds the templates of all installed Guard implementations to an
@@ -55,8 +55,10 @@ module Guard
55
55
 
56
56
  def titles(scope = nil)
57
57
  hash = scope || to_hash
58
- return hash[:plugins].map(&:title) unless hash[:plugins].empty?
59
- return hash[:groups].map(&:title) unless hash[:groups].empty?
58
+ plugins = hash[:plugins]
59
+ groups = hash[:groups]
60
+ return plugins.map(&:title) unless plugins.nil? || plugins.empty?
61
+ return hash[:groups].map(&:title) unless groups.nil? || groups.empty?
60
62
  ["all"]
61
63
  end
62
64
 
@@ -23,7 +23,7 @@ module Guard
23
23
  DEPRECATED_IMPLICIT_CONNECT = "Calling Notiffany::Notifier.notify()" +
24
24
  " without a prior Notifier.connect() is deprecated"
25
25
 
26
- def self.notify(message, options)
26
+ def self.notify(message, options = {})
27
27
  unless @notifier
28
28
  # TODO: reenable again?
29
29
  # UI.deprecation(DEPRECTED_IMPLICIT_CONNECT)
@@ -9,8 +9,8 @@ module Guard
9
9
  # * Add its template to the Guardfile.
10
10
  #
11
11
  class PluginUtil
12
- ERROR_NO_GUARD_OR_CLASS = "Could not load 'guard/%s' or'\
13
- ' find class Guard::%s"
12
+ ERROR_NO_GUARD_OR_CLASS = "Could not load 'guard/%s' or" \
13
+ " find class Guard::%s"
14
14
 
15
15
  INFO_ADDED_GUARD_TO_GUARDFILE = "%s guard added to Guardfile,"\
16
16
  " feel free to edit it"
@@ -2,7 +2,7 @@
2
2
  # More info at https://github.com/guard/guard#readme
3
3
 
4
4
  ## Uncomment and set this to only include directories you want to watch
5
- # directories %w(app lib config test spec feature)
5
+ # directories %w(app lib config test spec features)
6
6
 
7
7
  ## Uncomment to clear the screen before every task
8
8
  # clearing :on
@@ -14,8 +14,8 @@
14
14
  ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15
15
  ##
16
16
  ## Note: if you are using the `directories` clause above and you are not
17
- ## watching the project directory ('.'), the you will want to move the Guardfile
18
- ## to a watched dir and symlink it back, e.g.
17
+ ## watching the project directory ('.'), then you will want to move
18
+ ## the Guardfile to a watched dir and symlink it back, e.g.
19
19
  #
20
20
  # $ mkdir config
21
21
  # $ mv Guardfile config/
data/lib/guard/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "2.11.1"
2
+ VERSION = "2.12.0"
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.11.1
4
+ version: 2.12.0
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-01-07 00:00:00.000000000 Z
11
+ date: 2015-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -127,12 +127,14 @@ email:
127
127
  - thibaud@thibaud.gg
128
128
  executables:
129
129
  - guard
130
+ - _guard-core
130
131
  extensions: []
131
132
  extra_rdoc_files: []
132
133
  files:
133
134
  - CHANGELOG.md
134
135
  - LICENSE
135
136
  - README.md
137
+ - bin/_guard-core
136
138
  - bin/guard
137
139
  - images/failed.png
138
140
  - images/guard.png
@@ -212,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
214
  version: '0'
213
215
  requirements: []
214
216
  rubyforge_project:
215
- rubygems_version: 2.2.2
217
+ rubygems_version: 2.4.5
216
218
  signing_key:
217
219
  specification_version: 4
218
220
  summary: Guard keeps an eye on your file modifications