Skip to content
This repository

Merging other fixes #89

Closed
wants to merge 77 commits into from

6 participants

David Miani Lars Gierth Scott Taylor Thiago Marano Aravind SV Eero Saynatkari
David Miani

I've merged 6 of the 7 outstanding pull requests for this repository. I also added my code, described in issue #80. It does the following:

  • Dir ["/{etc,bin}"] now correctly returns ["/etc", "/bin"]
  • Fixing lots of stuff
    • Dir.glob can find dot dirs, with the correct flags.
    • FakeDir glob does not match dot dirs by default, now.
    • Fixed issue where Dir.mkdir would fail if path starts with dot.
    • Dir glob will accept multiple arguments.
  • Adding fakefs support for require, autoload, load (see https://github.com/lgierth/fakefs-require )
  • Removes Gemfile.lock (this is recommended practice for libraries)
  • File.open fails given nonexistent path or path to a dir. Closes #82.
  • Now operates under $SAFE=3
  • Added new testing method, where one piece of code is run under both the real and fake filesystems, and the results compared automatically (an integration style test, detects a lot of bugs), see fakefs_testhelper.rb and passing_fs_test.rb

I've tested the code under ruby 1.8.7 and ruby 1.9.2 under Mac OSX Snow Leopard and Ubuntu 10.04 LTS: all tests pass under all 4 variations.

The only pull request I didn't merge was the "Fix infinite loop" request from lgierth. I think the bug from this was accidently fixed in my work to get fakefs working under $SAFE=3.

and others added some commits
David Miani added inspect_tree method to FakeDir f8b8311
David Miani added auto_tests file, which runs tests by comparing the output of th…
…e fakefs vs the real filesystem. Somewhat tested
ccfd1a8
David Miani got auto_tests mostly working 77abe07
David Miani cleaned up some unnecessary prints bb8e2ad
David Miani simplified auto-tests, everything working except checking mtime and l…
…inks of files, and symlinks
7249a28
David Miani Fixed == in FakeFile to return false when compared with different cla…
…sses
64e9960
David Miani got options working, added safe option as global variable, added new …
…class to put module methods in
fd90c61
David Miani Split autotest file into 3 files - a testhelper, passing tests and fa…
…iling tests
e9bac59
David Miani Added tests for expand_path cff81c4
David Miani Made current_dir method no longer call normalize_path d8fde13
David Miani made current_dir method no longer call find 5d2a4f9
David Miani Added dir.pwd test to test_chdir_changes_directories_like_a_boss 05a9ccf
David Miani Added test for current dir being / after clear 78c67ed
David Miani Replaced dir_levels with a single attribute. Not working yet ebbb4f8
David Miani All tests passing again, but File.expand_path is using old method. Fi…
…xed bugs in a few tests
6066c2a
David Miani All tests now passing with new expand_path function 43b812f
David Miani Fixed bug where current dir wasn't being set during filesystem clone b5d9bf1
David Miani improved FakeFsTestHelper to have methods for converting relative pat…
…hs to a path in the temp directory being monitered
bdd31f8
David Miani Improved Dir.glob to work with both relative and absolute paths. Adde…
…d test in passing_fs_tests.rb
4704938
David Miani Fixed bugs in FileUtils.cp, added related test 33c4094
David Miani Fixed typo in method name fe00367
David Miani Improved Fake::File inspect method to output more like a real File. A…
…dded File.open test
931f89a
David Miani Fixed bug where failing test could cause other tests to fail 63205ff
David Miani Added File.foreach method and associated test c6168d4
Thiago Marano Gemspec files. 4b371c7
Thiago Marano Fixed issue where Dir glob would not work properly when doing /**/*. 76b6bb1
Thiago Marano Dir glob will accept multiple arguments. f2d541c
Thiago Marano Fixed issue where Dir.mkdir would fail if path starts with dot. bc9a3f7
Aravind SV FakeDir glob does not match dot dirs by default, now. a5b81ff
Aravind SV Dir.glob can find dot dirs, with the correct flags. c1e76da
Fix for finding files by patterns that include {..,..} fec94b0
Fix for {} patterns that have last element empty db75992
Thiago Marano Removed gemspec. d9d3783
Thiago Marano Merged with official repo. 5866578
David Miani Got mosts tests working - commented out two broken ones 3c5a60f
David Miani Merged up to v0.3.1 8091a62
David Miani renamed passing_fs_tests.rb so that it is tested on rake test 8132c8b
David Miani merged with v0.3.2. One failing test, haven't yet updated dependencie…
…s with bundler
8fd58c3
David Miani placed failing test_dir_search method into failing_fs_test.rb. Undid …
…changes to safe_test.rb. All tests passing
ae40432
David Miani Re-enabled and fixed broken tests in fakefs_test.rb. All tests passing c9bf0d5
David Miani cleaned up fakefs_testhelper.rb, fixed out of date comments bbdbc29
David Miani renamed failing_fs_tests.rb to fs_tests_failing.rb cb63ff2
Eero Saynatkari File.open fails given nonexistent path or path to a dir. Closes #82.
* Removed unnecessary paths from existing tests (they don't
  need to exercise paths).
* Added tests for nonexistent, existing and trying to open
  a directory.
02524b0
Eero Saynatkari Added some tests for relative nonexistent dirs to open. b54873d
Lars Gierth Put fakefs-require into vendor/ b545c7c
Lars Gierth Prepare integration 4fbb26f
Lars Gierth Integrate it 557d442
Lars Gierth Remove vendor/ 85919eb
Lars Gierth Fix pending tests 186fc54
Lars Gierth Remove Gemfile.lock 7e84c1a
Lars Gierth Fix test verifier 125e3b4
Lars Gierth Add Gemfile.lock to .gitignore 2ea5d62
Lars Gierth Rewrite tests, pt. 1 1b7fc1a
Lars Gierth Show that the behaviour of $LOADED_FEATURES is not in-line with origi…
…nal #require
a4608da
Lars Gierth Rewrite tests, pt. 2 00a24e1
Lars Gierth Rewrite tests, pt. 3 eba56f4
Lars Gierth Rewrite tests, pt. 4 35d0fa1
Lars Gierth Rewrite tests, pt. 5 (with missing or failing tests skipped) bd3edd4
Lars Gierth Fix $LOADED_FEATURES behaviour db6d6aa
Lars Gierth Don't let Kernel#load append .rb to the filename 7b7094c
Lars Gierth Mention FakeFS in LoadErrors (this might stop some pain) a629f8b
Lars Gierth Use absolute path for caller (no test yet) e2028c7
Lars Gierth Add tests for failing #load and for absolute path in $LOADED_FEATURES 8c81f4f
Lars Gierth Fix $LOAD_PATH preferences and add tests for them b82c693
Lars Gierth Add tests for #require and #load with an absolute path 3eded2d
Lars Gierth Add tests for backtrace/caller behavior 9a9654d
Lars Gierth Fix ::deactivate! test 3d4cd91
Lars Gierth Rewrite private API (tests green) 22538b5
David Miani added test-unit gem to Gemfile. Removed duplicate tests 648b4b9
David Miani Merge branch 'master' of https://github.com/sinsiliux/fakefs into mer…
…ging_other_fixes
19c00ac
David Miani Merge branch 'master' of https://github.com/marano/fakefs into mergin…
…g_other_fixes

Conflicts:
	lib/fakefs/file_system.rb
	test/fakefs_test.rb
007b3be
David Miani Merge branch 'integrate_fakefs_require' of https://github.com/lgierth…
…/fakefs into merging_other_fixes
9386681
David Miani Fixed broken tests 622fddc
David Miani Merge branch 'master' of https://github.com/rue/fakefs into merging_o…
…ther_fixes
a21d4a2
David Miani Fixed broken tests 2f11e37
David Miani Merge branch 'remove_lockfile' of https://github.com/lgierth/fakefs i…
…nto merging_other_fixes

Conflicts:
	.gitignore
	Gemfile.lock
7914dd6
David Miani Merge branch 'fix_test_verifier' of https://github.com/lgierth/fakefs
…into merging_other_fixes
7662c1d
Lars Gierth

The infinite loop will only occur on Rubinius :)

Scott Taylor smtlaissezfaire closed this
Scott Taylor
Collaborator

Hmm...This is way too many patches for me to merge in without a lot of work - and I know I've already merged in a few of the diffs that are included in this branch.

Would it be possible to clean up these patches and split them up so that each patch fixes one feature (or bug)?

I'm going to close this, but I appreciate the effort and look forward to the individual patches!

Thanks!

David Miani

This patch just had the open pull requests for this repo, and my changes. All but my changes have been merged - I'll open another pull request for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 77 unique commits by 6 authors.

Dec 12, 2009
David Miani added inspect_tree method to FakeDir f8b8311
David Miani added auto_tests file, which runs tests by comparing the output of th…
…e fakefs vs the real filesystem. Somewhat tested
ccfd1a8
David Miani got auto_tests mostly working 77abe07
David Miani cleaned up some unnecessary prints bb8e2ad
David Miani simplified auto-tests, everything working except checking mtime and l…
…inks of files, and symlinks
7249a28
David Miani Fixed == in FakeFile to return false when compared with different cla…
…sses
64e9960
David Miani got options working, added safe option as global variable, added new …
…class to put module methods in
fd90c61
David Miani Split autotest file into 3 files - a testhelper, passing tests and fa…
…iling tests
e9bac59
David Miani Added tests for expand_path cff81c4
David Miani Made current_dir method no longer call normalize_path d8fde13
David Miani made current_dir method no longer call find 5d2a4f9
David Miani Added dir.pwd test to test_chdir_changes_directories_like_a_boss 05a9ccf
David Miani Added test for current dir being / after clear 78c67ed
David Miani Replaced dir_levels with a single attribute. Not working yet ebbb4f8
David Miani All tests passing again, but File.expand_path is using old method. Fi…
…xed bugs in a few tests
6066c2a
David Miani All tests now passing with new expand_path function 43b812f
David Miani Fixed bug where current dir wasn't being set during filesystem clone b5d9bf1
David Miani improved FakeFsTestHelper to have methods for converting relative pat…
…hs to a path in the temp directory being monitered
bdd31f8
David Miani Improved Dir.glob to work with both relative and absolute paths. Adde…
…d test in passing_fs_tests.rb
4704938
David Miani Fixed bugs in FileUtils.cp, added related test 33c4094
Dec 13, 2009
David Miani Fixed typo in method name fe00367
David Miani Improved Fake::File inspect method to output more like a real File. A…
…dded File.open test
931f89a
David Miani Fixed bug where failing test could cause other tests to fail 63205ff
David Miani Added File.foreach method and associated test c6168d4
Oct 22, 2010
Thiago Marano Gemspec files. 4b371c7
Nov 03, 2010
Thiago Marano Fixed issue where Dir glob would not work properly when doing /**/*. 76b6bb1
Nov 19, 2010
Thiago Marano Dir glob will accept multiple arguments. f2d541c
Nov 26, 2010
Thiago Marano Fixed issue where Dir.mkdir would fail if path starts with dot. bc9a3f7
Nov 29, 2010
Aravind SV FakeDir glob does not match dot dirs by default, now. a5b81ff
Aravind SV Dir.glob can find dot dirs, with the correct flags. c1e76da
Feb 19, 2011
Fix for finding files by patterns that include {..,..} fec94b0
Mar 14, 2011
Fix for {} patterns that have last element empty db75992
Mar 28, 2011
Thiago Marano Removed gemspec. d9d3783
Thiago Marano Merged with official repo. 5866578
May 06, 2011
David Miani Got mosts tests working - commented out two broken ones 3c5a60f
David Miani Merged up to v0.3.1 8091a62
David Miani renamed passing_fs_tests.rb so that it is tested on rake test 8132c8b
David Miani merged with v0.3.2. One failing test, haven't yet updated dependencie…
…s with bundler
8fd58c3
David Miani placed failing test_dir_search method into failing_fs_test.rb. Undid …
…changes to safe_test.rb. All tests passing
ae40432
David Miani Re-enabled and fixed broken tests in fakefs_test.rb. All tests passing c9bf0d5
David Miani cleaned up fakefs_testhelper.rb, fixed out of date comments bbdbc29
David Miani renamed failing_fs_tests.rb to fs_tests_failing.rb cb63ff2
May 08, 2011
Eero Saynatkari File.open fails given nonexistent path or path to a dir. Closes #82.
* Removed unnecessary paths from existing tests (they don't
  need to exercise paths).
* Added tests for nonexistent, existing and trying to open
  a directory.
02524b0
Eero Saynatkari Added some tests for relative nonexistent dirs to open. b54873d
May 17, 2011
Lars Gierth Put fakefs-require into vendor/ b545c7c
Lars Gierth Prepare integration 4fbb26f
Lars Gierth Integrate it 557d442
May 18, 2011
Lars Gierth Remove vendor/ 85919eb
Lars Gierth Fix pending tests 186fc54
Jun 25, 2011
Lars Gierth Remove Gemfile.lock 7e84c1a
Lars Gierth Fix test verifier 125e3b4
Lars Gierth Add Gemfile.lock to .gitignore 2ea5d62
Lars Gierth Rewrite tests, pt. 1 1b7fc1a
Lars Gierth Show that the behaviour of $LOADED_FEATURES is not in-line with origi…
…nal #require
a4608da
Jun 26, 2011
Lars Gierth Rewrite tests, pt. 2 00a24e1
Lars Gierth Rewrite tests, pt. 3 eba56f4
Lars Gierth Rewrite tests, pt. 4 35d0fa1
Jun 27, 2011
Lars Gierth Rewrite tests, pt. 5 (with missing or failing tests skipped) bd3edd4
Lars Gierth Fix $LOADED_FEATURES behaviour db6d6aa
Lars Gierth Don't let Kernel#load append .rb to the filename 7b7094c
Lars Gierth Mention FakeFS in LoadErrors (this might stop some pain) a629f8b
Lars Gierth Use absolute path for caller (no test yet) e2028c7
Lars Gierth Add tests for failing #load and for absolute path in $LOADED_FEATURES 8c81f4f
Lars Gierth Fix $LOAD_PATH preferences and add tests for them b82c693
Jun 28, 2011
Lars Gierth Add tests for #require and #load with an absolute path 3eded2d
Lars Gierth Add tests for backtrace/caller behavior 9a9654d
Lars Gierth Fix ::deactivate! test 3d4cd91
Jun 29, 2011
Lars Gierth Rewrite private API (tests green) 22538b5
Jul 21, 2011
David Miani added test-unit gem to Gemfile. Removed duplicate tests 648b4b9
David Miani Merge branch 'master' of https://github.com/sinsiliux/fakefs into mer…
…ging_other_fixes
19c00ac
David Miani Merge branch 'master' of https://github.com/marano/fakefs into mergin…
…g_other_fixes

Conflicts:
	lib/fakefs/file_system.rb
	test/fakefs_test.rb
007b3be
David Miani Merge branch 'integrate_fakefs_require' of https://github.com/lgierth…
…/fakefs into merging_other_fixes
9386681
David Miani Fixed broken tests 622fddc
David Miani Merge branch 'master' of https://github.com/rue/fakefs into merging_o…
…ther_fixes
a21d4a2
David Miani Fixed broken tests 2f11e37
David Miani Merge branch 'remove_lockfile' of https://github.com/lgierth/fakefs i…
…nto merging_other_fixes

Conflicts:
	.gitignore
	Gemfile.lock
7914dd6
David Miani Merge branch 'fix_test_verifier' of https://github.com/lgierth/fakefs
…into merging_other_fixes
7662c1d
Something went wrong with that request. Please try again.