guard init <guard-name> command no more need Gemfile presence but open_gem is required now
Closes #3.
This commit is contained in:
parent
e5f4f2aa8d
commit
ec87585472
@ -3,6 +3,7 @@
|
|||||||
Bugs fixes:
|
Bugs fixes:
|
||||||
|
|
||||||
- Fixes for 1.8.6 compatibility (issue #2)
|
- Fixes for 1.8.6 compatibility (issue #2)
|
||||||
|
- guard init <guard-name> no more need Gemfile presence but open_gem is required now (issue #3)
|
||||||
|
|
||||||
== 0.2.0.beta.1 (Oct 17, 2010)
|
== 0.2.0.beta.1 (Oct 17, 2010)
|
||||||
|
|
||||||
|
12
Gemfile.lock
12
Gemfile.lock
@ -2,16 +2,23 @@ PATH
|
|||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
guard (0.2.0.beta.1)
|
guard (0.2.0.beta.1)
|
||||||
bundler (~> 1.0.2)
|
open_gem (~> 1.4.2)
|
||||||
thor (~> 0.14.3)
|
thor (~> 0.14.3)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
configuration (1.1.0)
|
||||||
diff-lcs (1.1.2)
|
diff-lcs (1.1.2)
|
||||||
growl (1.0.3)
|
growl (1.0.3)
|
||||||
guard-rspec (0.1.3)
|
guard-rspec (0.1.3)
|
||||||
guard
|
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)
|
rb-fsevent (0.3.2)
|
||||||
rspec (2.0.1)
|
rspec (2.0.1)
|
||||||
rspec-core (~> 2.0.1)
|
rspec-core (~> 2.0.1)
|
||||||
@ -29,10 +36,11 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bundler (~> 1.0.2)
|
bundler (~> 1.0.3)
|
||||||
growl (~> 1.0.3)
|
growl (~> 1.0.3)
|
||||||
guard!
|
guard!
|
||||||
guard-rspec (~> 0.1.3)
|
guard-rspec (~> 0.1.3)
|
||||||
|
open_gem (~> 1.4.2)
|
||||||
rb-fsevent (>= 0.3.2)
|
rb-fsevent (>= 0.3.2)
|
||||||
rspec (~> 2.0.1)
|
rspec (~> 2.0.1)
|
||||||
thor (~> 0.14.3)
|
thor (~> 0.14.3)
|
||||||
|
@ -15,11 +15,12 @@ Gem::Specification.new do |s|
|
|||||||
s.required_rubygems_version = '>= 1.3.6'
|
s.required_rubygems_version = '>= 1.3.6'
|
||||||
s.rubyforge_project = 'guard'
|
s.rubyforge_project = 'guard'
|
||||||
|
|
||||||
|
s.add_development_dependency 'bundler', '~> 1.0.3'
|
||||||
s.add_development_dependency 'rspec', '~> 2.0.1'
|
s.add_development_dependency 'rspec', '~> 2.0.1'
|
||||||
s.add_development_dependency 'guard-rspec', '~> 0.1.3'
|
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.files = Dir.glob('{bin,images,lib}/**/*') + %w[LICENSE README.rdoc]
|
||||||
s.executable = 'guard'
|
s.executable = 'guard'
|
||||||
|
@ -55,15 +55,14 @@ module Guard
|
|||||||
end
|
end
|
||||||
|
|
||||||
def locate_guard(name)
|
def locate_guard(name)
|
||||||
spec = Bundler.load.specs.find{|s| s.name == "guard-#{name}" }
|
`gem open guard-#{name} --latest --command echo`
|
||||||
spec.full_gem_path
|
|
||||||
rescue
|
rescue
|
||||||
UI.error "Could not find gem 'guard-#{name}' in the current Gemfile."
|
UI.error "Could not find 'guard-#{name}' gem path."
|
||||||
end
|
end
|
||||||
|
|
||||||
def run
|
def run
|
||||||
listener.stop
|
listener.stop
|
||||||
UI. clear if options[:clear]
|
UI.clear if options[:clear]
|
||||||
yield
|
yield
|
||||||
listener.start
|
listener.start
|
||||||
end
|
end
|
||||||
|
@ -10,4 +10,12 @@ describe Guard do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "locate_guard" do
|
||||||
|
|
||||||
|
it "should return guard-rspec pat" do
|
||||||
|
Guard.locate_guard('rspec').should match(/^.*\/guard-rspec-.*$/)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user