diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index cfcc4b0..9660adb 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -3,6 +3,7 @@ Bugs fixes: - Fixes for 1.8.6 compatibility (issue #2) +- guard init no more need Gemfile presence but open_gem is required now (issue #3) == 0.2.0.beta.1 (Oct 17, 2010) diff --git a/Gemfile.lock b/Gemfile.lock index ea14785..0f517bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,16 +2,23 @@ PATH remote: . specs: guard (0.2.0.beta.1) - bundler (~> 1.0.2) + open_gem (~> 1.4.2) thor (~> 0.14.3) GEM remote: http://rubygems.org/ specs: + configuration (1.1.0) diff-lcs (1.1.2) growl (1.0.3) guard-rspec (0.1.3) guard + launchy (0.3.7) + configuration (>= 0.0.5) + rake (>= 0.8.1) + open_gem (1.4.2) + launchy (~> 0.3.5) + rake (0.8.7) rb-fsevent (0.3.2) rspec (2.0.1) rspec-core (~> 2.0.1) @@ -29,10 +36,11 @@ PLATFORMS ruby DEPENDENCIES - bundler (~> 1.0.2) + bundler (~> 1.0.3) growl (~> 1.0.3) guard! guard-rspec (~> 0.1.3) + open_gem (~> 1.4.2) rb-fsevent (>= 0.3.2) rspec (~> 2.0.1) thor (~> 0.14.3) diff --git a/guard.gemspec b/guard.gemspec index 2f7f8be..e237e81 100644 --- a/guard.gemspec +++ b/guard.gemspec @@ -15,11 +15,12 @@ Gem::Specification.new do |s| s.required_rubygems_version = '>= 1.3.6' s.rubyforge_project = 'guard' - s.add_development_dependency 'rspec', '~> 2.0.1' - s.add_development_dependency 'guard-rspec', '~> 0.1.3' + s.add_development_dependency 'bundler', '~> 1.0.3' + s.add_development_dependency 'rspec', '~> 2.0.1' + s.add_development_dependency 'guard-rspec', '~> 0.1.3' - s.add_dependency 'bundler', '~> 1.0.2' - s.add_dependency 'thor', '~> 0.14.3' + s.add_dependency 'thor', '~> 0.14.3' + s.add_dependency 'open_gem', '~> 1.4.2' s.files = Dir.glob('{bin,images,lib}/**/*') + %w[LICENSE README.rdoc] s.executable = 'guard' diff --git a/lib/guard.rb b/lib/guard.rb index ca2de79..94b81c3 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -55,15 +55,14 @@ module Guard end def locate_guard(name) - spec = Bundler.load.specs.find{|s| s.name == "guard-#{name}" } - spec.full_gem_path + `gem open guard-#{name} --latest --command echo` rescue - UI.error "Could not find gem 'guard-#{name}' in the current Gemfile." + UI.error "Could not find 'guard-#{name}' gem path." end def run listener.stop - UI. clear if options[:clear] + UI.clear if options[:clear] yield listener.start end diff --git a/spec/guard_spec.rb b/spec/guard_spec.rb index 305365b..ab4863f 100644 --- a/spec/guard_spec.rb +++ b/spec/guard_spec.rb @@ -10,4 +10,12 @@ describe Guard do end + describe "locate_guard" do + + it "should return guard-rspec pat" do + Guard.locate_guard('rspec').should match(/^.*\/guard-rspec-.*$/) + end + + end + end