Merge pull request #92 from tpope/hidden_home_config_file

Make home Guardfile hidden
This commit is contained in:
Thibaud Guillaume-Gentil 2011-06-22 12:22:18 -07:00
commit 8c5be4536b
4 changed files with 7 additions and 5 deletions

View File

@ -13,6 +13,7 @@
- Pull request [#84](https://github.com/guard/guard/pull/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][]) - Pull request [#84](https://github.com/guard/guard/pull/84): Use RbConfig instead of obsolete and deprecated Config. ([@etehtsea][])
- Pull request [#80](https://github.com/guard/guard/pull/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][]) - Pull request [#80](https://github.com/guard/guard/pull/80): Watching dotfile (hidden files under unix). (reported by [@chrisberkhout][], fixed by [@yannlugrin][])
- Clear the terminal on start when the `:clear` option is given. ([@rymai][]) - Clear the terminal on start when the `:clear` option is given. ([@rymai][])
- Rename home directory Guardfile to `.Guardfile`. ([@tpope][])
## 0.4.2 - June 7, 2011 ## 0.4.2 - June 7, 2011
@ -183,6 +184,7 @@
[@thibaudgg]: https://github.com/thibaudgg [@thibaudgg]: https://github.com/thibaudgg
[@thierryhenrio]: https://github.com/thierryhenrio [@thierryhenrio]: https://github.com/thierryhenrio
[@tinogomes]: https://github.com/tinogomes [@tinogomes]: https://github.com/tinogomes
[@tpope]: https://github.com/tpope
[@veged]: https://github.com/veged [@veged]: https://github.com/veged
[@wereHamster]: https://github.com/wereHamster [@wereHamster]: https://github.com/wereHamster
[@yannlugrin]: https://github.com/yannlugrin [@yannlugrin]: https://github.com/yannlugrin

View File

@ -38,7 +38,7 @@ Generate an empty Guardfile with:
$ guard init $ guard init
``` ```
You may optionally place this Guardfile in your home directory to use it across multiple projects. You may optionally place a .Guardfile in your home directory to use it across multiple projects.
Add the guards you need to your Guardfile (see the existing guards below). Add the guards you need to your Guardfile (see the existing guards below).
@ -120,7 +120,7 @@ or if you use Bundler, to run the Guard executable specific to your bundle:
$ bundle exec guard [start] $ bundle exec guard [start]
``` ```
Guard will look for a Guardfile in your current directory. If it does not find one, it will look in your `$HOME` directory for one. Guard will look for a Guardfile in your current directory. If it does not find one, it will look in your `$HOME` directory for a .Guardfile.
Command line options Command line options
-------------------- --------------------

View File

@ -84,7 +84,7 @@ module Guard
end end
def home_guardfile_path def home_guardfile_path
File.expand_path(File.join("~", "Guardfile")) File.expand_path(File.join("~", ".Guardfile"))
end end
end end

View File

@ -4,7 +4,7 @@ describe Guard::Dsl do
subject { described_class } subject { described_class }
before(:each) do before(:each) do
@local_guardfile_path = File.join(Dir.pwd, 'Guardfile') @local_guardfile_path = File.join(Dir.pwd, 'Guardfile')
@home_guardfile_path = File.expand_path(File.join("~", "Guardfile")) @home_guardfile_path = File.expand_path(File.join("~", ".Guardfile"))
::Guard.stub!(:options).and_return(:debug => true) ::Guard.stub!(:options).and_return(:debug => true)
end end
@ -129,7 +129,7 @@ describe Guard::Dsl do
describe ".guardfile_default_path" do describe ".guardfile_default_path" do
let(:local_path) { File.join(Dir.pwd, 'Guardfile') } let(:local_path) { File.join(Dir.pwd, 'Guardfile') }
let(:user_path) { File.expand_path(File.join("~", 'Guardfile')) } let(:user_path) { File.expand_path(File.join("~", '.Guardfile')) }
before do before do
File.stub(:exist? => false) File.stub(:exist? => false)