projecthydra-labs/engine_factory — pull request #25 by jeremyf (2014-05-06 00:56:53+00:00)
Title: Replacing gemspec bin inclusion for rails plugins

If you include `bin/rails` in your list of bin files all bets are off
regarding which `rails` command will be executed on the command line.

See for related problem cbeer/engine_cart#9

Gemspec created via rails plugin new
```ruby
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
```

Relevant gemspec files created via bundle gem new

```ruby
spec.files = `git ls-files -z`.split("\x0")
spec.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
spec.test_files = s.files.grep(/^(test|spec|features)\//)
spec.require_paths = ['lib']
```