Skip to content

Commit

Permalink
Merge pull request #3927 from speckins/patch-1
Browse files Browse the repository at this point in the history
Move shebang to the top of `bin/console` template
  • Loading branch information
hsbt committed Sep 4, 2020
2 parents 0ab446f + 962e669 commit aecc90b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bundler/lib/bundler/templates/newgem/bin/console.tt
@@ -1,6 +1,5 @@
# frozen_string_literal: true

#!/usr/bin/env ruby
# frozen_string_literal: true

require "bundler/setup"
require "<%= config[:namespaced_path] %>"
Expand Down
2 changes: 2 additions & 0 deletions bundler/spec/commands/newgem_spec.rb
Expand Up @@ -376,6 +376,8 @@ def create_temporary_dir(dir)
expect(bundled_app("#{gem_name}/bin/console")).to exist
expect(bundled_app("#{gem_name}/bin/setup")).to be_executable
expect(bundled_app("#{gem_name}/bin/console")).to be_executable
expect(bundled_app("#{gem_name}/bin/setup").read).to start_with("#!")
expect(bundled_app("#{gem_name}/bin/console").read).to start_with("#!")
end

it "starts with version 0.1.0" do
Expand Down

0 comments on commit aecc90b

Please sign in to comment.