guard 2.1.0 → 2.1.1

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: 6500e7d2927db23543d36ec1dc5574f0678e68b6
4
- data.tar.gz: ebb55bd7d63bacfd3a927bbe7060ad5c4eaecd5c
3
+ metadata.gz: 53af35fa31798f99a8230636673520c16f4c7e72
4
+ data.tar.gz: 210eae70340553a7bcbd008ae728c936739e2cad
5
5
  SHA512:
6
- metadata.gz: 071db2999a5902a860dfd4c25635dee9a72c309fe92246f0998072ed4904593df288c4c36fba61703b1f1a5e63a7688f497bb706a80cdb1d5defa3d7d5bd5aa5
7
- data.tar.gz: b8c9f33e9272a26a29f25e293963a48107c1f0f595cecfaf43fa6037b93ebf8560e1848598cadb7b7e15d50f8d2729576bbb5c5b3301e993373c0f04b8a38e45
6
+ metadata.gz: 47b4e5af3573d6a44f428dcd6cfcec942548ff69dcd702ad1f5a752f2b7e921ffddc10a85944912b75907c692f9d130b2ef3d102e12a13f8a670d0880eb3f2b6
7
+ data.tar.gz: d610139610407063ca8f4533335ccf009d950c40328017cb0f545149955a4659cc529ca9a6f5bbc37d778610cb2da584c8a81892d9052577a44c1b3de8d63f47
@@ -188,8 +188,9 @@ module Guard
188
188
  options[:guardfile_path] = guardfile_path
189
189
  options[:guardfile_contents] = File.read(guardfile_path)
190
190
  rescue => ex
191
+ ::Guard::UI.error "Error reading file #{ guardfile_path }:"
191
192
  ::Guard::UI.error ex.inspect
192
- ::Guard::UI.error("Error reading file #{ guardfile_path }")
193
+ ::Guard::UI.error ex.backtrace
193
194
  exit 1
194
195
  end
195
196
 
@@ -90,7 +90,10 @@ module Guard
90
90
  # Turn notifications on. If no notifications are defined in the `Guardfile`
91
91
  # Guard auto detects the first available library.
92
92
  #
93
- def turn_on
93
+ # @param [Hash] options the turn_on options
94
+ # @option options [Boolean] silent disable any logging
95
+ #
96
+ def turn_on(opts = {})
94
97
  _auto_detect_notification if notifiers.empty? && (!::Guard.options || ::Guard.options[:notify])
95
98
 
96
99
  if notifiers.empty?
@@ -98,7 +101,7 @@ module Guard
98
101
  else
99
102
  notifiers.each do |notifier|
100
103
  notifier_class = _get_notifier_module(notifier[:name])
101
- ::Guard::UI.info "Guard is using #{ notifier_class.title } to send notifications."
104
+ ::Guard::UI.info "Guard is using #{ notifier_class.title } to send notifications." unless opts[:silent]
102
105
 
103
106
  notifier_class.turn_on if notifier_class.respond_to?(:turn_on)
104
107
  end
@@ -174,6 +177,7 @@ module Guard
174
177
  notifier.notify(message, opts)
175
178
  rescue Exception => e
176
179
  ::Guard::UI.error "Error sending notification with #{ notifier.name }: #{ e.message }"
180
+ ::Guard::UI.debug e.backtrace.join("\n")
177
181
  end
178
182
  end
179
183
  end
@@ -100,9 +100,10 @@ module Guard
100
100
  require "guard/#{ name.downcase }" if try_require
101
101
 
102
102
  @plugin_class ||= ::Guard.const_get(_plugin_constant)
103
- rescue TypeError
103
+ rescue TypeError => typeError
104
104
  if try_require
105
105
  ::Guard::UI.error "Could not find class Guard::#{ _constant_name }"
106
+ ::Guard::UI.error typeError.backtrace.join("\n")
106
107
  else
107
108
  try_require = true
108
109
  retry
@@ -110,7 +111,7 @@ module Guard
110
111
  rescue LoadError => loadError
111
112
  unless options[:fail_gracefully]
112
113
  ::Guard::UI.error "Could not load 'guard/#{ name.downcase }' or find class Guard::#{ _constant_name }"
113
- ::Guard::UI.error loadError.to_s
114
+ ::Guard::UI.error loadError.backtrace.join("\n")
114
115
  end
115
116
  end
116
117
  end
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
@@ -122,8 +122,9 @@ module Guard
122
122
  def call_action(matches)
123
123
  begin
124
124
  @action.arity > 0 ? @action.call(matches) : @action.call
125
- rescue Exception => e
126
- ::Guard::UI.error "Problem with watch action!\n#{ e.message }\n\n#{ e.backtrace.join("\n") }"
125
+ rescue Exception => ex
126
+ ::Guard::UI.error "Problem with watch action!\n#{ ex.message }"
127
+ ::Guard::UI.error ex.backtrace.join("\n")
127
128
  end
128
129
  end
129
130
 
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.1.0
4
+ version: 2.1.1
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: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2013-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -193,9 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  requirements: []
195
195
  rubyforge_project:
196
- rubygems_version: 2.0.7
196
+ rubygems_version: 2.1.8
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Guard keeps an eye on your file modifications
200
200
  test_files: []
201
- has_rdoc: