diff options
Diffstat (limited to 'lib/bundler/cli/gem.rb')
-rw-r--r-- | lib/bundler/cli/gem.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index a201c89910..f102dd50f9 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -54,6 +54,11 @@ module Bundler "bin/setup.tt" => "bin/setup" } + executables = %w[ + bin/console + bin/setup + ] + if ask_and_set(:coc, "Do you want to include a code of conduct in gems you generate?", "Codes of conduct can increase contributions to your project by contributors who " \ "prefer collaborative, safe spaces. You can read more about the code of conduct at " \ @@ -108,6 +113,12 @@ module Bundler thor.template("newgem/#{src}", target.join(dst), config) end + executables.each do |file| + path = target.join(file) + executable = (path.stat.mode | 0111) + path.chmod(executable) + end + Bundler.ui.info "Initializing git repo in #{target}" Dir.chdir(target) { `git init`; `git add .` } |