guard 2.12.5 → 2.12.6

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: a6cb2b065313fadd1e7938935252c4ba5ff98631
4
- data.tar.gz: fbe543cde3dac216174ef74dbc7ef8a7d97c307c
3
+ metadata.gz: 8e15b3952cdcf0c7bc0630dc7ea778b232a41a4d
4
+ data.tar.gz: 0815439ec78d643499d434c892a1813f5b00d8e4
5
5
  SHA512:
6
- metadata.gz: 53c56440d62730e2f4b7c31006dc88854042fee6ef6abcd0f9840a7efbc01b7393176383e630078465c356da681c3d864f5747f4f1e0d62f43cb1eaabb5b11b0
7
- data.tar.gz: 43d9c9262a46f4a0d7129be5db869db6daecf3994057e89b5f2138e74a66b934a649045ae9c58d70756f53ebec3d768ad323a49042afc997c6f87b7f6cb933f4
6
+ metadata.gz: 7e7d66058a18aa51dcb60fe7a293ea38c7e6f8bc6e5e50521f5148af70674afcffceb50d3c61450d56a5a6bb067c40356388528e714771c83542dd074f999a25
7
+ data.tar.gz: 88a5e72ec2292dd3c53ac95a443dbfaca092900ca3ac68cbde0396a7a79de9978e84f03e3c94009cede1bbd18bfac454b4921db5b786a3f85f5fe1f5ea715bcb
data/README.md CHANGED
@@ -17,12 +17,12 @@ If you have
17
17
  any questions about the Guard usage or want to share some information with the Guard community, please go to one of
18
18
  the following places:
19
19
 
20
- * [Google+ community](https://plus.google.com/u/1/communities/110022199336250745477)
21
- * [Google group](http://groups.google.com/group/guard-dev)
22
- * [StackOverflow](http://stackoverflow.com/questions/tagged/guard)
23
- * IRC channel `#guard` (irc.freenode.net) for chatting
20
+ * [Google+ community](https://plus.google.com/u/1/communities/110022199336250745477).
21
+ * [Google group](http://groups.google.com/group/guard-dev).
22
+ * [StackOverflow](http://stackoverflow.com/questions/tagged/guard).
23
+ * IRC channel `#guard` (irc.freenode.net) for chatting.
24
24
 
25
- Information on advanced topics like creating your own Guard plugin, programatic use of Guard, hooks and callbacks and
25
+ Information on advanced topics like creating your own Guard plugin, programmatic use of Guard, hooks and callbacks and
26
26
  more can be found in the [Guard wiki](https://github.com/guard/guard/wiki).
27
27
 
28
28
  Before you file an issue, make sure you have read the _[known issues](#issues)_ and _[file an issue](#file-an-issue)_ sections that contains some important information.
@@ -86,7 +86,7 @@ If you're getting sick of typing `bundle exec` all the time, try one of the foll
86
86
 
87
87
  * (Recommended) Running `bundle binstub guard` will create `bin/guard` in your
88
88
  project, which means running `bin/guard` (tab completion will save you a key
89
- stroke or two) will have the exact same result as `bundle exec guard`
89
+ stroke or two) will have the exact same result as `bundle exec guard`.
90
90
 
91
91
  * Or, for RubyGems >= 2.2.0 (at least, though the more recent the better),
92
92
  simply set the `RUBYGEMS_GEMDEPS` environment variable to `-` (for autodetecting
@@ -171,9 +171,9 @@ Please try to follow these simple rules:
171
171
 
172
172
  #### Core Team
173
173
 
174
- * R.I.P. :broken_heart: [Michael Kessler](https://github.com/netzpirat) ([@netzpirat](http://twitter.com/netzpirat), [flinkfinger.com](http://www.flinkfinger.com))
175
- * [Rémy Coutable](https://github.com/rymai)
176
- * [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](http://twitter.com/thibaudgg), [thibaud.gg](http://thibaud.gg/))
174
+ * R.I.P. :broken_heart: [Michael Kessler](https://github.com/netzpirat) ([@netzpirat](http://twitter.com/netzpirat), [flinkfinger.com](http://www.flinkfinger.com)).
175
+ * [Rémy Coutable](https://github.com/rymai).
176
+ * [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) ([@thibaudgg](http://twitter.com/thibaudgg), [thibaud.gg](http://thibaud.gg/)).
177
177
 
178
178
  #### Contributors
179
179
 
data/lib/guard.rb CHANGED
@@ -154,10 +154,15 @@ module Guard
154
154
  guardfiles = modified.select { |path| /^(?:.+\/)?Guardfile$/.match(path) }
155
155
  return if guardfiles.empty?
156
156
 
157
- if guardfiles.any? { |path| /^Guardfile$/.match(path) }
157
+ guardfile = Pathname("Guardfile").realpath
158
+ real_guardfiles = guardfiles.detect do |path|
159
+ /^Guardfile$/.match(path) || Pathname(path).expand_path == guardfile
160
+ end
161
+
162
+ if real_guardfiles
158
163
  UI.warning "Guardfile changed -- _guard-core will exit.\n"
159
164
  exit 2 # nonzero to break any while loop
160
- else
165
+ else # e.g. templates/Guardfile
161
166
  msg = "Config changed: %s - Guard will exit so it can be restarted."
162
167
  UI.info format(msg, guardfiles.inspect)
163
168
  exit 0 # 0 so any shell while loop can continue
data/lib/guard/cli.rb CHANGED
@@ -110,6 +110,15 @@ module Guard
110
110
  # @see Guard.start
111
111
  #
112
112
  def start
113
+ if defined?(JRUBY_VERSION)
114
+ unless options[:no_interactions]
115
+ abort "\nSorry, JRuby and interactive mode are incompatible.\n"\
116
+ "As a workaround, use the '-i' option instead.\n\n"\
117
+ "More info: \n"\
118
+ " * https://github.com/guard/guard/issues/754\n"\
119
+ " * https://github.com/jruby/jruby/issues/2383\n\n"
120
+ end
121
+ end
113
122
  exit(Cli::Environments::Valid.new(options).start_guard)
114
123
  end
115
124
 
@@ -34,13 +34,17 @@ module Guard
34
34
  Guardfile::Evaluator.new(session.evaluator_options).evaluate
35
35
  rescue Guardfile::Evaluator::NoGuardfileError
36
36
  generator.create_guardfile
37
+ rescue Guard::Guardfile::Evaluator::NoPluginsError
38
+ # Do nothing - just the error
37
39
  end
38
40
 
39
41
  return 0 if bare # 0 - exit code
40
42
 
41
43
  # Evaluate because it might have existed and creating was skipped
42
- # FIXME: still, I don't know why this is needed
43
- Guardfile::Evaluator.new(session.evaluator_options).evaluate
44
+ begin
45
+ Guardfile::Evaluator.new(session.evaluator_options).evaluate
46
+ rescue Guard::Guardfile::Evaluator::NoPluginsError
47
+ end
44
48
 
45
49
  if plugin_names.empty?
46
50
  generator.initialize_all_templates
@@ -15,7 +15,7 @@ module Guard
15
15
  end
16
16
 
17
17
  # Stub everything else
18
- def notification
18
+ def notification(_notifier, _opts = {})
19
19
  end
20
20
 
21
21
  def interactor(_options)
@@ -129,7 +129,11 @@ module Guard
129
129
  # TODO: move this to Generator?
130
130
  options = Guard.state.session.evaluator_options
131
131
  evaluator = Guardfile::Evaluator.new(options)
132
- evaluator.evaluate
132
+ begin
133
+ evaluator.evaluate
134
+ rescue Guard::Guardfile::Evaluator::NoPluginsError
135
+ end
136
+
133
137
  if evaluator.guardfile_include?(name)
134
138
  UI.info "Guardfile already includes #{ name } guard"
135
139
  else
@@ -2,17 +2,9 @@
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 features)
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
6
7
 
7
- ## Uncomment to clear the screen before every task
8
- # clearing :on
9
-
10
- ## Guard internally checks for changes in the Guardfile and exits.
11
- ## If you want Guard to automatically start up again, run guard in a
12
- ## shell loop, e.g.:
13
- ##
14
- ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15
- ##
16
8
  ## Note: if you are using the `directories` clause above and you are not
17
9
  ## watching the project directory ('.'), then you will want to move
18
10
  ## the Guardfile to a watched dir and symlink it back, e.g.
data/lib/guard/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "2.12.5"
2
+ VERSION = "2.12.6"
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.5
4
+ version: 2.12.6
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-03-14 00:00:00.000000000 Z
11
+ date: 2015-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
- rubygems_version: 2.4.5
218
+ rubygems_version: 2.4.7
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Guard keeps an eye on your file modifications