rails/rails — pull request #14877 by jeremyf (2014-04-26 18:08:37+00:00)
Title: Adding assertion for @original_wd in generator

Given the documentation for `$ rails new` and `$ rails plugin new`,
and how the `--template` option is used, those building templates
may rely on the `@original_wd` instance variable to determine where
the generator is creating the files.

In our case we are doing something analogous to the following:

```ruby
inside(File.join(@original_wd, name)) do
Rake::FileList.each("**/*") do |filename|
apply_boilerplate(filename)
end

run "mv path/to/specific_file path/to/new_location"
end
```

If there are better ways to do the above, its not immediately obvious.