guard 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,159 @@
1
+ ## 0.4.1 - June 7, 2011
2
+
3
+ ### Improvements
4
+
5
+ - Pull request [#77](https://github.com/guard/guard/pull/77): Refactor `get_guard_class` to first try the constant and fallback to require + various tweaks ([@mislav][])
6
+ - Notifier improvement, don't use system notification library if could not be required ([@yannlugrin][])
7
+
8
+ ## 0.4.0 - June 5, 2011
9
+
10
+ ### Bugs fixes:
11
+
12
+ - In Ruby < 1.9, Symbol#downcase doesn't exist! ([@rymai][])
13
+
14
+ ### New features:
15
+
16
+ - Pull request [#73](https://github.com/guard/guard/pull/73): Allow DSL's `group` method to accept a Symbol as group name. ([@johnbintz][])
17
+ - Pull request [#51](https://github.com/guard/guard/pull/51): Allow options (like :priority) to be passed through to the Notifier. ([@indirect][] and [@netzpirat][])
18
+
19
+ ### Improvements
20
+
21
+ - Pull request [#74](https://github.com/guard/guard/pull/74): Added link definitions to make the CHANGELOG more DRY! That's for sure now, we have the cleanest CHANGELOG ever! (even the link definitions are sorted alphabetically!) ([@pcreux][])
22
+
23
+ ## 0.4.0.rc - May 28, 2011
24
+
25
+ ### Bugs fixes:
26
+
27
+ - Pull request [#69](https://github.com/guard/guard/pull/69): Fixed typo in README: Ctr-/ => Ctr-\\. ([@tinogomes][])
28
+ - Pull request [#66](https://github.com/guard/guard/pull/66): Support for dashes in guard names. ([@johnbintz][])
29
+ - Require `guard/ui` because `Guard::Notifier` can be required without full Guard. ([@yannlugrin][])
30
+ - Handled quick file (<1s) modification. Avoid to catch modified files without content modification (sha1 checksum). ([@thibaudgg][] and [@netzpirat][])
31
+ - Fixed `Guard::Notifier` (when growl/libnotify not present). ([@thibaudgg][])
32
+ - Fixed Rubygems deprecation messages. ([@thibaudgg][])
33
+
34
+ ### New features:
35
+
36
+ - Pull request [#67](https://github.com/guard/guard/pull/67): Allow Guardfile in `$HOME` folder. ([@hashrocketeer][])
37
+ - Pull request [#64](https://github.com/guard/guard/pull/64): Windows notifications support. ([@stereobooster][])
38
+ - Pull request [#63](https://github.com/guard/guard/pull/63): Refactor listeners to work as a library. ([@niklas][])
39
+ - Use `ENV["GUARD_NOTIFY"]` to disable notifications. ([@thibaudgg][])
40
+ - Cleaning up all specs. ([@netzpirat][])
41
+ - Pull request [#60](https://github.com/guard/guard/pull/60): Added Windows support. ([@stereobooster][])
42
+ - Pull request [#58](https://github.com/guard/guard/pull/58): Extract code from signal handlers into methods. ([@nicksieger][])
43
+ - Pull request [#55](https://github.com/guard/guard/pull/55): It is now possible to pass `:guardfile` (a Guardfile path) or `:guardfile_contents` (the content of a Guardfile) to `Guard::Dsl.evaluate_guardfile`. Hence this allows the use of `Guard::Dsl.evaluate_guardfile` in a programmatic manner. ([@anithri][], improved by [@rymai][])
44
+
45
+
46
+ ## 0.3.4 - April 24, 2011
47
+
48
+ ### Bugs fixes:
49
+
50
+ - Issue [#41](https://github.com/guard/guard/issues/41): Removed useless Bundler requirement. ([@thibaudgg][])
51
+
52
+ ### New features:
53
+
54
+ - Changed CHANGELOG from RDOC to Markdown and cleaned it! Let's celebrate! ([@rymai][])
55
+ - Changed README from RDOC to Markdown! Let's celebrate! ([@thibaudgg][])
56
+ - Issue [#48](https://github.com/guard/guard/issues/48): Adding support for inline Guard classes rather than requiring a gem. ([@jrsacks][])
57
+
58
+
59
+ ## 0.3.3 - April 18, 2011
60
+
61
+ ### Bugs fixes:
62
+
63
+ - Fixed `new_modified_files` rerun conditions on `Guard.run_on_change_for_all_guards`. ([@thibaudgg][])
64
+
65
+
66
+ ## 0.3.2 - April 17, 2011
67
+
68
+ ### Bugs fixes:
69
+
70
+ - Pull request [#43](https://github.com/guard/guard/pull/43): Fixed `guard init` command. ([@brainopia][])
71
+
72
+
73
+ ## 0.3.1 - April 14, 2011
74
+
75
+ ### Bugs fixes:
76
+
77
+ - Return unique filenames from Linux listener. (Marian Schubert)
78
+ - `Guard.get_guard_class` return wrong class when loaded nested class. ([@koshigoe][])
79
+ - Issue [#35](https://github.com/guard/guard/issues/35): Fixed open-gem/gem_open dependency problem by using `gem which` to locate guards gem path. (reported by [@thierryhenrio][], fixed by [@thibaudgg][])
80
+ - Issue [#38](https://github.com/guard/guard/issues/38) & Pull request [#39](https://github.com/guard/guard/issues/39): Fixed an invalid ANSI escape code in `Guard::UI.reset_line`. ([@gix][])
81
+
82
+ ### New features:
83
+
84
+ - Issue [#28](https://github.com/guard/guard/issues/28): New `-n` command line option to disable notifications (Growl / Libnotify). ([@thibaudgg][])
85
+
86
+
87
+ ## 0.3.0 - January 19, 2011
88
+
89
+ ### Bugs fixes:
90
+
91
+ - Avoid launching `run_on_change` guards method when no files matched. `--clear` guard argument is now usable. ([@thibaudgg][])
92
+
93
+ ### New features:
94
+
95
+ - The whole directory is now watched during `run_on_change` to detect new files modifications. ([@thibaudgg][])
96
+ - Pull request [#26](https://github.com/guard/guard/pull/26): New DSL method: `group` allows you to group several guards. New CLI option: `--group group_name` to specify certain groups of guards to start. ([@netzpirat][])
97
+ - `watch` patterns are now more strict: strings are matched with `String#==`, `Regexp` are matched with `Regexp#match`. ([@rymai][])
98
+ - A deprecation warning is displayed if your `Guardfile` contains `String` that look like `Regexp` (bad!). ([@rymai][])
99
+ - It's now possible to return an `Enumerable` in the `watch` optional blocks in the `Guardfile`. ([@rymai][])
100
+
101
+ ### New specs:
102
+
103
+ - `Guard::Watcher`. ([@rymai][])
104
+ - Pull request [#13](https://github.com/guard/guard/pull/13): `Guard::Dsl`. ([@oliamb][])
105
+
106
+
107
+ ## 0.2.2 - October 25, 2010
108
+
109
+ ### Bugs fixes:
110
+
111
+ - Issue [#5](https://github.com/guard/guard/issues/5): avoid creating new copy of `fsevent_watch` every time a file is changed. (reported by [@stouset][], fixed by [@thibaudgg][])
112
+
113
+
114
+ ## 0.2.1 - October 24, 2010
115
+
116
+ ### Bugs fixes:
117
+
118
+ - Pull request [#7](https://github.com/guard/guard/pull/7): Fixes for Linux support. ([@yannlugrin][]))
119
+ - Pull request [#6](https://github.com/guard/guard/pull/6): Locate guard now chomp newline in result path. ([@yannlugrin][]))
120
+
121
+
122
+ ## 0.2.0 - October 21, 2010
123
+
124
+ ### Bugs fixes:
125
+
126
+ - Issue [#3](https://github.com/guard/guard/issues/3): `guard init <guard-name>` no more need `Gemfile` but `open_gem` is required now. (reported by [@wereHamster][], fixed by [@thibaudgg][])
127
+ - Issue [#2](https://github.com/guard/guard/issues/2): 1.8.6 compatibility. (reported by [@veged][], fixed by [@thibaudgg][])
128
+ - Removes Growl & Libnotify dependencies. ([@thibaudgg][])
129
+
130
+
131
+ ## 0.2.0.beta.1 - October 17, 2010
132
+
133
+ ### New features:
134
+
135
+ - Improved listeners support (`rb-fsevent` & `rb-inotify`). ([@thibaudgg][])
136
+ - Added polling listening fallback. ([@thibaudgg][])
137
+
138
+ [@anithri]: https://github.com/anithri
139
+ [@brainopia]: https://github.com/brainopia
140
+ [@gix]: https://github.com/gix
141
+ [@hashrocketeer]: https://github.com/hashrocketeer
142
+ [@indirect]: https://github.com/indirect
143
+ [@johnbintz]: https://github.com/johnbintz
144
+ [@jrsacks]: https://github.com/jrsacks
145
+ [@koshigoe]: https://github.com/koshigoe
146
+ [@netzpirat]: https://github.com/netzpirat
147
+ [@nicksieger]: https://github.com/nicksieger
148
+ [@niklas]: https://github.com/niklas
149
+ [@oliamb]: https://github.com/oliamb
150
+ [@pcreux]: https://github.com/pcreux
151
+ [@rymai]: https://github.com/rymai
152
+ [@stereobooster]: https://github.com/stereobooster
153
+ [@stouset]: https://github.com/stouset
154
+ [@thibaudgg]: https://github.com/thibaudgg
155
+ [@thierryhenrio]: https://github.com/thierryhenrio
156
+ [@tinogomes]: https://github.com/tinogomes
157
+ [@veged]: https://github.com/veged
158
+ [@wereHamster]: https://github.com/wereHamster
159
+ [@yannlugrin]: https://github.com/yannlugrin
data/README.md CHANGED
@@ -56,9 +56,10 @@ Install the Growl gem if you want notification support:
56
56
  $ gem install growl
57
57
  ```
58
58
 
59
- And add it to you Gemfile:
59
+ And add them to your Gemfile:
60
60
 
61
61
  ``` ruby
62
+ gem 'rb-fsevent'
62
63
  gem 'growl'
63
64
  ```
64
65
 
@@ -76,9 +77,10 @@ Install the Libnotify gem if you want notification support:
76
77
  $ gem install libnotify
77
78
  ```
78
79
 
79
- And add it to you Gemfile:
80
+ And add them to your Gemfile:
80
81
 
81
82
  ``` ruby
83
+ gem 'rb-inotify'
82
84
  gem 'libnotify'
83
85
  ```
84
86
 
@@ -90,6 +92,19 @@ Install the rb-fchange gem for [Directory Change Notification](http://msdn.micro
90
92
  $ gem install rb-fchange
91
93
  ```
92
94
 
95
+ Install the Notifu gem if you want notification support:
96
+
97
+ ``` bash
98
+ $ gem install rb-notifu
99
+ ```
100
+
101
+ And add them to your Gemfile:
102
+
103
+ ``` ruby
104
+ gem 'rb-fchange'
105
+ gem 'rb-notifu'
106
+ ```
107
+
93
108
  Usage
94
109
  -----
95
110
 
@@ -81,15 +81,21 @@ module Guard
81
81
  end
82
82
 
83
83
  def get_guard_class(name)
84
- try_to_load_gem(name)
85
- self.const_get(self.constants.find { |klass_name| klass_name.to_s.downcase == name.to_s.downcase.gsub('-', '') })
86
- rescue TypeError
87
- UI.error "Could not find load find gem 'guard-#{name}' or find class Guard::#{name}"
88
- end
89
-
90
- def try_to_load_gem(name)
91
- require "guard/#{name.to_s.downcase}"
92
- rescue LoadError
84
+ try_require = false
85
+ const_name = name.to_s.downcase.gsub('-', '')
86
+ begin
87
+ require "guard/#{name.downcase}" if try_require
88
+ self.const_get(self.constants.find {|c| c.to_s.downcase == const_name })
89
+ rescue TypeError
90
+ unless try_require
91
+ try_require = true
92
+ retry
93
+ else
94
+ UI.error "Could not find class Guard::#{const_name.capitalize}"
95
+ end
96
+ rescue LoadError
97
+ UI.error "Could not load 'guard/#{name.downcase}' or find class Guard::#{const_name.capitalize}"
98
+ end
93
99
  end
94
100
 
95
101
  def locate_guard(name)
@@ -23,10 +23,13 @@ module Guard
23
23
 
24
24
  def self.usable?
25
25
  require 'rb-fsevent'
26
- if !defined?(FSEvent::VERSION) || Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.4.0')
26
+ if !defined?(FSEvent::VERSION) || (defined?(Gem::Version) &&
27
+ Gem::Version.new(FSEvent::VERSION) < Gem::Version.new('0.4.0'))
27
28
  UI.info "Please update rb-fsevent (>= 0.4.0)"
29
+ false
30
+ else
31
+ true
28
32
  end
29
- true
30
33
  rescue LoadError
31
34
  UI.info "Please install rb-fsevent gem for Mac OSX FSEvents support"
32
35
  false
@@ -24,10 +24,13 @@ module Guard
24
24
 
25
25
  def self.usable?
26
26
  require 'rb-inotify'
27
- if !defined?(INotify::VERSION) || Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.8.5')
27
+ if !defined?(INotify::VERSION) || (defined?(Gem::Version) &&
28
+ Gem::Version.new(INotify::VERSION.join('.')) < Gem::Version.new('0.8.5'))
28
29
  UI.info "Please update rb-inotify (>= 0.8.5)"
30
+ false
31
+ else
32
+ true
29
33
  end
30
- true
31
34
  rescue LoadError
32
35
  UI.info "Please install rb-inotify gem for Linux inotify support"
33
36
  false
@@ -46,19 +46,19 @@ module Guard
46
46
  def self.notify_mac(title, message, image, options)
47
47
  require_growl # need for guard-rspec formatter that is called out of guard scope
48
48
  default_options = { :title => title, :icon => image_path(image), :name => "Guard" }
49
- Growl.notify message, default_options.merge(options)
49
+ Growl.notify message, default_options.merge(options) if enabled?
50
50
  end
51
51
 
52
52
  def self.notify_linux(title, message, image, options)
53
53
  require_libnotify # need for guard-rspec formatter that is called out of guard scope
54
54
  default_options = { :body => message, :summary => title, :icon_path => image_path(image) }
55
- Libnotify.show default_options.merge(options)
55
+ Libnotify.show default_options.merge(options) if enabled?
56
56
  end
57
57
 
58
58
  def self.notify_windows(title, message, image, options)
59
59
  require_rbnotifu # need for guard-rspec formatter that is called out of guard scope
60
60
  default_options = { :message => message, :title => title, :type => image_level(image), :time => 3 }
61
- Notifu.show default_options.merge(options)
61
+ Notifu.show default_options.merge(options) if enabled?
62
62
  end
63
63
 
64
64
  def self.image_path(image)
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1" unless defined? VERSION
3
3
  end
metadata CHANGED
@@ -1,71 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: guard
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
4
5
  prerelease:
5
- version: 0.4.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Thibaud Guillaume-Gentil
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-06-05 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-06-07 00:00:00.000000000 +02:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &2153399780 !ruby/object:Gem::Requirement
19
18
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
24
23
  type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: rspec
28
24
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: *2153399780
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: &2153399240 !ruby/object:Gem::Requirement
30
29
  none: false
31
- requirements:
30
+ requirements:
32
31
  - - ~>
33
- - !ruby/object:Gem::Version
32
+ - !ruby/object:Gem::Version
34
33
  version: 2.6.0
35
34
  type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: guard-rspec
39
35
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
36
+ version_requirements: *2153399240
37
+ - !ruby/object:Gem::Dependency
38
+ name: guard-rspec
39
+ requirement: &2153398740 !ruby/object:Gem::Requirement
41
40
  none: false
42
- requirements:
41
+ requirements:
43
42
  - - ~>
44
- - !ruby/object:Gem::Version
43
+ - !ruby/object:Gem::Version
45
44
  version: 0.3.1
46
45
  type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: thor
50
46
  prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ version_requirements: *2153398740
48
+ - !ruby/object:Gem::Dependency
49
+ name: thor
50
+ requirement: &2153398280 !ruby/object:Gem::Requirement
52
51
  none: false
53
- requirements:
52
+ requirements:
54
53
  - - ~>
55
- - !ruby/object:Gem::Version
54
+ - !ruby/object:Gem::Version
56
55
  version: 0.14.6
57
56
  type: :runtime
58
- version_requirements: *id004
59
- description: Guard is a command line tool to easily handle events on files modifications.
60
- email:
57
+ prerelease: false
58
+ version_requirements: *2153398280
59
+ description: Guard is a command line tool to easily handle events on file system modifications.
60
+ email:
61
61
  - thibaud@thibaud.me
62
- executables:
62
+ executables:
63
63
  - guard
64
64
  extensions: []
65
-
66
65
  extra_rdoc_files: []
67
-
68
- files:
66
+ files:
69
67
  - bin/guard
70
68
  - images/failed.png
71
69
  - images/pending.png
@@ -87,32 +85,30 @@ files:
87
85
  - lib/guard.rb
88
86
  - LICENSE
89
87
  - README.md
90
- homepage: http://rubygems.org/gems/guard
88
+ - CHANGELOG.md
89
+ has_rdoc: true
90
+ homepage: https://github.com/guard/guard
91
91
  licenses: []
92
-
93
92
  post_install_message:
94
93
  rdoc_options: []
95
-
96
- require_paths:
94
+ require_paths:
97
95
  - lib
98
- required_ruby_version: !ruby/object:Gem::Requirement
96
+ required_ruby_version: !ruby/object:Gem::Requirement
99
97
  none: false
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: "0"
104
- required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
103
  none: false
106
- requirements:
107
- - - ">="
108
- - !ruby/object:Gem::Version
104
+ requirements:
105
+ - - ! '>='
106
+ - !ruby/object:Gem::Version
109
107
  version: 1.3.6
110
108
  requirements: []
111
-
112
109
  rubyforge_project: guard
113
- rubygems_version: 1.8.1
110
+ rubygems_version: 1.6.2
114
111
  signing_key:
115
112
  specification_version: 3
116
- summary: Guard keep an eye on your files modifications.
113
+ summary: Guard keeps an eye on your file modifications
117
114
  test_files: []
118
-