Permalink
Browse files

Merge branch 'master' into scope-plugins-and-groups

Conflicts:
	lib/guard/interactor.rb
  • Loading branch information...
2 parents 43e75f3 + 005a06a commit 4c034a544d3d1a690acd40941803368061158ad3 @netzpirat netzpirat committed Dec 19, 2012
Showing with 29 additions and 4 deletions.
  1. +4 −1 CHANGELOG.md
  2. +1 −1 README.md
  3. +8 −1 lib/guard.rb
  4. +1 −0 lib/guard/interactor.rb
  5. +1 −1 lib/guard/notifiers/gntp.rb
  6. +14 −0 spec/guard_spec.rb
View
@@ -13,6 +13,7 @@
### Bug fixes
+- [#377][] Add the 'a' alias for the 'all' Pry command. (reported by [@cknadler][], fixed by [@rymai][])
- [#365][] Fix terminal reset redirect to null devise on Windows. ([@cablegram][])
- [#365][] Fix Emacs notifier detection on Windows. ([@cablegram][])
- [#361][] Tmux notifier affects only the local session. ([@netzpirat][])
@@ -683,6 +684,7 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
[#367]: https://github.com/guard/guard/issues/367
[#368]: https://github.com/guard/guard/issues/368
[#369]: https://github.com/guard/guard/issues/369
+[#377]: https://github.com/guard/guard/issues/377
[@Gazer]: https://github.com/Gazer
[@Maher4Ever]: https://github.com/Maher4Ever
[@alandipert]: https://github.com/alandipert
@@ -695,6 +697,7 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
[@capotej]: https://github.com/capotej
[@ches]: https://github.com/ches
[@chrisberkhout]: https://github.com/chrisberkhout
+[@cknadler]: https://github.com/cknadler
[@d1]: https://github.com/d1
[@dgutov]: https://github.com/dgutov
[@dnagir]: https://github.com/dnagir
@@ -766,4 +769,4 @@ The Listen integration has been supervised by [@thibaudgg][] and executed by [@M
[@waldo]: https://github.com/waldo
[@wereHamster]: https://github.com/wereHamster
[@yannlugrin]: https://github.com/yannlugrin
-[@zonque]: https://github.com/zonque
+[@zonque]: https://github.com/zonque
View
@@ -101,7 +101,7 @@ group :development do
end
```
-### System notifications
+## System notifications
You can configure Guard to make use of the following system notification libraries:
View
@@ -417,7 +417,14 @@ def locate_guard(name)
#
def guard_gem_names
if Gem::Version.create(Gem::VERSION) >= Gem::Version.create('1.8.0')
- Gem::Specification.find_all.select { |x| x.name =~ /^guard-/ }
+ Gem::Specification.find_all.select do |x|
+ if x.name =~ /^guard-/
+ true
+ elsif x.name != "guard"
+ guard_plugin_path = File.join(x.full_gem_path, "lib/guard/#{x.name}.rb")
+ File.exists?( guard_plugin_path )
+ end
+ end
else
Gem.source_index.find_name(/^guard-/)
end.map { |x| x.name.sub(/^guard-/, '') }
View
@@ -27,6 +27,7 @@ class Interactor
# List of shortcuts for each interactor command
SHORTCUTS = {
:help => 'h',
+ :all => 'a',
:reload => 'r',
:change => 'c',
:show => 's',
@@ -57,7 +57,7 @@ def registered!
# @return [Boolean] the availability status
#
def available?(silent = false)
- if RbConfig::CONFIG['host_os'] =~ /darwin|linux|freebsd|openbsd|sunos|solaris|mswin|mingw/
+ if RbConfig::CONFIG['host_os'] =~ /darwin|linux|freebsd|openbsd|sunos|solaris|mswin|mingw|cygwin/
require 'ruby_gntp'
true
View
@@ -841,6 +841,20 @@ class Inline < Guard
gems = Guard.guard_gem_names
gems.should include("rspec")
end
+
+ it "returns the list of embedded guard gems" do
+ gem1 = stub(:gem, :name => "gem1", :full_gem_path => '/gem1' )
+ gem2 = stub(:gem, :name => "gem2", :full_gem_path => '/gem2' )
+ gem3 = stub(:gem, :name => "guard", :full_gem_path => '/guard' )
+
+ File.should_receive(:exists?).with('/gem1/lib/guard/gem1.rb').and_return(false)
+ File.should_receive(:exists?).with('/gem2/lib/guard/gem2.rb').and_return(true)
+
+ Gem::Specification.should_receive(:find_all).and_return([gem1, gem2, gem3])
+
+ Guard.guard_gem_names.should == ['gem2']
+ end
+
end
describe ".debug_command_execution" do

0 comments on commit 4c034a5

Please sign in to comment.