guard 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,11 @@
1
- ## Master
1
+ ## 1.3.1 - 14 August, 2012
2
+
3
+ ### Improvements
4
+
5
+ - [#317][] Switch to Terminal-Notifier-Guard gem. ([@foxycoder][])
6
+ - [#315][] Improve Emacs detection. ([@maio][])
7
+
8
+ ## 1.3.0 - 3 August, 2012
2
9
 
3
10
  ### Bug fix
4
11
 
@@ -573,6 +580,8 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
573
580
  [#283]: https://github.com/guard/guard/issues/283
574
581
  [#298]: https://github.com/guard/guard/issues/298
575
582
  [#299]: https://github.com/guard/guard/issues/299
583
+ [#315]: https://github.com/guard/guard/issues/315
584
+ [#317]: https://github.com/guard/guard/issues/317
576
585
  [@Gazer]: https://github.com/Gazer
577
586
  [@Maher4Ever]: https://github.com/Maher4Ever
578
587
  [@alandipert]: https://github.com/alandipert
@@ -644,4 +653,4 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
644
653
  [@waldo]: https://github.com/waldo
645
654
  [@wereHamster]: https://github.com/wereHamster
646
655
  [@yannlugrin]: https://github.com/yannlugrin
647
- [@zonque]: https://github.com/zonque
656
+ [@zonque]: https://github.com/zonque
data/README.md CHANGED
@@ -7,7 +7,7 @@ This document contains a lot of information, please take your time and read thes
7
7
  any questions, ask them in our [Google group](http://groups.google.com/group/guard-dev) or on `#guard`
8
8
  (irc.freenode.net).
9
9
 
10
- Information on advanced topics like create your own Guard plugin, programatic use of Guard, hooks and callbacks and
10
+ Information on advanced topics like creating your own Guard plugin, programatic use of Guard, hooks and callbacks and
11
11
  more can be found in the [Guard wiki](https://github.com/guard/guard/wiki).
12
12
 
13
13
  Before you file an issue, make sure you have read the _[file an issue](#file-an-issue)_ section that contains some
@@ -179,15 +179,14 @@ end
179
179
 
180
180
  * Runs on Mac OS X 10.8 only
181
181
 
182
- The [terminal notifier](https://github.com/alloy/terminal-notifier) sends notifications to the OS X Notification Center.
183
- The notification center doesn't support different icons for different message types, and it even shows only the icon
184
- from Terminal.app.
182
+ The [terminal-notifier-guard](https://github.com/Springest/terminal-notifier-guard) sends notifications to the OS X
183
+ Notification Center.
185
184
 
186
- To use `terminal_notifier` you have to add it to your `Gemfile` and run bundler:
185
+ To use `terminal-notifier-guard` you have to add it to your `Gemfile` and run bundler:
187
186
 
188
187
  ```ruby
189
188
  group :development do
190
- gem 'terminal_notifier'
189
+ gem 'terminal-notifier-guard'
191
190
  end
192
191
  ```
193
192
 
@@ -779,7 +778,7 @@ When you file a bug, please try to follow these simple rules if applicable:
779
778
 
780
779
  **It's most likely that your bug gets resolved faster if you provide as much information as possible!**
781
780
 
782
- Development [![Dependency Status](https://gemnasium.com/guard/guard.png?branch=master)](https://gemnasium.com/guard/guard)
781
+ Development [![Dependency Status](https://gemnasium.com/guard/guard.png?branch=master)](https://gemnasium.com/guard/guard) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/guard/guard)
783
782
  -----------
784
783
 
785
784
  * Documentation hosted at [RubyDoc](http://rubydoc.info/github/guard/guard/master/frames).
@@ -179,7 +179,7 @@ module Guard
179
179
  #
180
180
  # @param [Hash] scopes hash with a Guard plugin or a group scope
181
181
  #
182
- def reload(scopes)
182
+ def reload(scopes = {})
183
183
  within_preserved_state do
184
184
  ::Guard::UI.clear
185
185
  ::Guard::UI.action_with_scopes('Reload', scopes)
@@ -192,7 +192,7 @@ module Guard
192
192
  #
193
193
  # @param [Hash] scopes hash with a Guard plugin or a group scope
194
194
  #
195
- def run_all(scopes)
195
+ def run_all(scopes = {})
196
196
  within_preserved_state do
197
197
  ::Guard::UI.clear
198
198
  ::Guard::UI.action_with_scopes('Run', scopes)
@@ -39,8 +39,8 @@ module Guard
39
39
  # Restore terminal settings
40
40
  #
41
41
  def restore_terminal_settings
42
- system('stty', @stty_save, '2>/dev/null') if @stty_save
42
+ system("stty #{ @stty_save } 2>/dev/null") if @stty_save
43
43
  end
44
-
44
+
45
45
  end
46
- end
46
+ end
@@ -25,12 +25,12 @@ module Guard
25
25
  # @return [Boolean] the availability status
26
26
  #
27
27
  def available?(silent = false)
28
- result = `#{DEFAULTS[:client]} --eval '1' 2> /dev/null || echo 0`
28
+ result = `#{DEFAULTS[:client]} --eval '1' 2> /dev/null || echo 'N/A'`
29
29
 
30
- if result.chomp! == "1"
31
- true
32
- else
30
+ if result.chomp! == "N/A"
33
31
  false
32
+ else
33
+ true
34
34
  end
35
35
  end
36
36
 
@@ -3,14 +3,14 @@ require 'guard/ui'
3
3
  module Guard
4
4
  module Notifier
5
5
 
6
- # System notifications using the [terminal_notifier](https://github.com/alloy/terminal-notifier gem.
6
+ # System notifications using the [terminal-notifier-guard](https://github.com/Springest/terminal-notifier-guard gem.
7
7
  #
8
8
  # This gem is available for OS X 10.8 Mountain Lion and sends notifications to the OS X
9
9
  # notification center.
10
10
  #
11
- # @example Add the `terminal_notifier` gem to your `Gemfile`
11
+ # @example Add the `terminal-notifier-guard` gem to your `Gemfile`
12
12
  # group :development
13
- # gem 'terminal-notifier'
13
+ # gem 'terminal-notifier-guard'
14
14
  # end
15
15
  #
16
16
  # @example Add the `:terminal_notifier` notifier to your `Guardfile`
@@ -21,16 +21,16 @@ module Guard
21
21
  #
22
22
  module TerminalNotifier
23
23
  extend self
24
-
24
+
25
25
  # Test if the notification library is available.
26
26
  #
27
27
  # @param [Boolean] silent true if no error messages should be shown
28
28
  # @return [Boolean] the availability status
29
29
  #
30
30
  def available?(silent=false)
31
- require 'terminal-notifier'
32
-
33
- if ::TerminalNotifier.available?
31
+ require 'terminal-notifier-guard'
32
+
33
+ if ::TerminalNotifier::Guard.available?
34
34
  true
35
35
  else
36
36
  ::Guard::UI.error 'The :terminal_notifier only runs on Mac OS X 10.8 and later.' unless silent
@@ -38,10 +38,10 @@ module Guard
38
38
  end
39
39
 
40
40
  rescue LoadError, NameError
41
- ::Guard::UI.error "Please add \"gem 'terminal-notifier'\" to your Gemfile and run Guard with \"bundle exec\"." unless silent
41
+ ::Guard::UI.error "Please add \"gem 'terminal-notifier-guard'\" to your Gemfile and run Guard with \"bundle exec\"." unless silent
42
42
  false
43
43
  end
44
-
44
+
45
45
  # Show a system notification.
46
46
  #
47
47
  # @param [String] type the notification type. Either 'success', 'pending', 'failed' or 'notify'
@@ -55,10 +55,11 @@ module Guard
55
55
  # @option options [String] open some url or file
56
56
  #
57
57
  def notify(type, title, message, image, options = { })
58
- require 'terminal-notifier'
58
+ require 'terminal-notifier-guard'
59
59
  options[:title] = [options[:app_name] || 'Guard', type.downcase.capitalize, title].join ' '
60
+ options.merge!(:type => type.to_sym, :message => message)
60
61
  options.delete :app_name if options[:app_name]
61
- ::TerminalNotifier.notify(message, options)
62
+ ::TerminalNotifier::Guard.execute(false, options)
62
63
  end
63
64
  end
64
65
  end
@@ -1,4 +1,4 @@
1
1
  module Guard
2
2
  # The current gem version of Guard
3
- VERSION = '1.3.0'
3
+ VERSION = '1.3.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-03 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 2.10.0
69
+ version: 2.11.0
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 2.10.0
77
+ version: 2.11.0
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: guard-rspec
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: 1.1.0
85
+ version: 1.2.1
86
86
  type: :development
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: 1.1.0
93
+ version: 1.2.1
94
94
  description: Guard is a command line tool to easily handle events on file system modifications.
95
95
  email:
96
96
  - thibaud@thibaud.me
@@ -151,7 +151,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  segments:
153
153
  - 0
154
- hash: -1136247660184135072
154
+ hash: 2920801038653850427
155
155
  required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  none: false
157
157
  requirements: