SamSaffron/memory_profiler — pull request #7 by schneems (2014-10-03 04:28:22+00:00)
Title: Allow ability to ignore file patterns

Can now pass in a regular expression to ignore file patterns:

```
MemoryProfiler::Reporter.report(:ignore_files => /test_reporter\.rb/) {}
```

To do this we check each file path of each object against the given regex in the loop. We skip those that match.

To do this I changed a bit of the object configuration. I moved the options hash to `#initialize` so we don't have to constantly pass around objects. The `report` class method remains unchanged.

I moved the `allocation_generation` check to the first loop so we're doing a little less work. This is a bit heavy handed for this change. If you're not onboard with all theses changes at once or don't like the style, let me know.

I also added some lines to get the tests to run and set "test" as the default task.

There is one test that is failing on master that also fails on this branch.

Reference: https://github.com/SamSaffron/memory_profiler/pull/6#issuecomment-57723904