Skip to content

Do not start server on bin/setup #407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions ruby_on_rails/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@
RUBY
end

# remove the block unless ARGV.include?("--skip-server"). We don't want to start the server directly during setup.
gsub_file "bin/setup", /\n{0,2}[ \t]*unless ARGV.include\?\("--skip-server"\).*?end/m, ""

# add the renuo-cli gem to the Gemfile
insert_into_file "Gemfile", after: /^gem \"rails\"\n/ do
<<~RUBY
gem "renuo-cli", require: false
RUBY
end

# add the renuo-cli gem to the Gemfile under the line starting with "gem \"rails\""
insert_into_file "Gemfile", after: /^gem \"rails\"\n/ do
<<~RUBY
gem "renuo-cli", require: false
RUBY
end

Comment on lines +26 to +38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate?

# add "ruby file: ".ruby-version" to the Gemfile under the line starting with "source"
insert_into_file "Gemfile", after: /^source.*\n/ do
<<~RUBY
Expand Down
Loading