Merging other fixes #89

Closed
wants to merge 77 commits into
from

Projects

None yet

6 participants

@davidmiani

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.

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

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

The infinite loop will only occur on Rubinius :)

@smtlaissezfaire

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!

@davidmiani

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