guard 2.15.1 → 2.16.0

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
  SHA256:
3
- metadata.gz: 22fe26bc775c6c1dcd06cb993a5b36357d7bdac496f9bee7042ced368f93c090
4
- data.tar.gz: a3be74a8d33d2e1514b8dfc67d3794891966cb240de71f78965de51178c47ad3
3
+ metadata.gz: 6028e51f5d1af8b50a11ed0b2d222b513aa4ee844b6ae881abae85914b91be2f
4
+ data.tar.gz: '09661a90820c8821a148d7091eaca9e2307826450ec4e5785e397a7bbba04836'
5
5
  SHA512:
6
- metadata.gz: ed1f15710d36a2fddc83045941236336781b951222d351d2bee3927410ac46fc828895f56f6a5bf6caa0e6dade4f28c05ca0406aefb87edae30aad5058fff220
7
- data.tar.gz: 10dd2d5ced4531688aca194eaa0aed14ddd58c5cd6018e6602bf63f96f145bb19f7e221b96ffdb59a99fda8bcb7eb207fdcad08f100256ff184b8f2150b7f0f3
6
+ metadata.gz: 53ee842c043a00283654646d3a47cc57962f80e12ec171ecf61666bd65d2d5b23dc29e788ed25f72861db03fc9185905e34fd3b877ac6a3be3637fbf9f1400f1
7
+ data.tar.gz: 6dcdbe28398673c04ad1a62127d83e913cc019afdbb2927ea0807abf0baf4f68882957f656801e86d951798ad543ec8cda99e2e26f7225041f4840c771e35448
data/README.md CHANGED
@@ -84,10 +84,10 @@ If you're getting sick of typing `bundle exec` all the time, try one of the foll
84
84
  * (Recommended) Running `bundle binstub guard` will create `bin/guard` in your
85
85
  project, which means running `bin/guard` (tab completion will save you a key
86
86
  stroke or two) will have the exact same result as `bundle exec guard`.
87
-
87
+
88
88
  * Or, you can `alias be="bundle exec"` in your `.bashrc` or similar and the execute only `be guard`.
89
- **Protip**: It will work for all comands executed in `bundle exec` context!
90
-
89
+ **Protip**: It will work for all comands executed in `bundle exec` context!
90
+
91
91
 
92
92
  * Or, for RubyGems >= 2.2.0 (at least, though the more recent the better),
93
93
  simply set the `RUBYGEMS_GEMDEPS` environment variable to `-` (for autodetecting
@@ -130,8 +130,8 @@ Just launch Guard inside your Ruby or Rails project with:
130
130
  $ bundle exec guard
131
131
  ```
132
132
 
133
- Guard will look for a `Guardfile` in your current directory. If it does not find one, it will look in your `$HOME`
134
- directory for a `.Guardfile`.
133
+ Guard will look for a `Guardfile` or `guardfile.rb` in your current directory. If it does not find one, it will look
134
+ in your `$HOME` directory for a `.Guardfile`.
135
135
 
136
136
  Please look here to see all the [command line options for Guard](https://github.com/guard/guard/wiki/Command-line-options-for-Guard)
137
137
 
@@ -37,7 +37,8 @@ module Guard
37
37
  #
38
38
  # There are two possible locations for the `Guardfile`:
39
39
  #
40
- # * The `Guardfile` in the current directory where Guard has been started
40
+ # * The `Guardfile` or `guardfile.rb` in the current directory where Guard
41
+ # has been started
41
42
  # * The `.Guardfile` in your home directory.
42
43
  #
43
44
  # In addition, if a user configuration `.guard.rb` in your home directory is
@@ -18,6 +18,12 @@ module Guard
18
18
  class Evaluator
19
19
  Deprecated::Evaluator.add_deprecated(self) unless Config.new.strict?
20
20
 
21
+ DEFAULT_GUARDFILES = %w(
22
+ guardfile.rb
23
+ Guardfile
24
+ ~/.Guardfile
25
+ ).freeze
26
+
21
27
  ERROR_NO_GUARDFILE = "No Guardfile found,"\
22
28
  " please create one with `guard init`."
23
29
 
@@ -178,14 +184,16 @@ module Guard
178
184
  end
179
185
 
180
186
  def _use_default!
181
- @path, @contents = _read("Guardfile")
182
- @type = :default
183
- rescue Errno::ENOENT
184
- begin
185
- @path, @contents = _read("~/.Guardfile")
186
- @type = :default
187
- rescue Errno::ENOENT
188
- fail NoGuardfileError, ERROR_NO_GUARDFILE
187
+ DEFAULT_GUARDFILES.each do |guardfile|
188
+ begin
189
+ @path, @contents = _read(guardfile)
190
+ @type = :default
191
+ break
192
+ rescue Errno::ENOENT
193
+ if guardfile == DEFAULT_GUARDFILES.last
194
+ fail NoGuardfileError, ERROR_NO_GUARDFILE
195
+ end
196
+ end
189
197
  end
190
198
  end
191
199
 
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "2.15.1"
2
+ VERSION = "2.16.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.15.1
4
+ version: 2.16.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: 2019-09-02 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor