aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-03-27 01:12:38 -0700
committerAndre Arko <andre@arko.net>2015-03-27 01:41:08 -0700
commit36314e92ac502674ed2ffc201b2343c8856fa990 (patch)
treeb6c226862a3538a4780f4a2ac7cdd7c8dcf3968b /lib
parentbfbec4ef29d323c8079cb5ec946ccd51cd5b3876 (diff)
downloadbundler-36314e92ac502674ed2ffc201b2343c8856fa990.tar.gz
make executables executable, and test them
closes #3517, #3511
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/gem.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb
index 9ce8de4a..add19ff3 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 " \
@@ -105,6 +110,10 @@ module Bundler
thor.template("newgem/#{src}", target.join(dst), config)
end
+ executables.each do |path|
+ FileUtils.chmod "+x", target.join(path).to_s
+ end
+
Bundler.ui.info "Initializing git repo in #{target}"
Dir.chdir(target) { `git init`; `git add .` }