lib/rails/generators/rails/plugin/templates/Gemfile.tt in railties-7.0.0.rc3 vs lib/rails/generators/rails/plugin/templates/Gemfile.tt in railties-7.0.0
- old
+ new
@@ -1,10 +1,10 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
<% if options[:skip_gemspec] -%>
-<%= "# " if options.dev? || options.edge? || options.main? -%>gem "rails", "<%= Array(rails_version_specifier).join("', '") %>"
+<%= "# " if rails_prerelease? -%>gem "rails", "<%= Array(rails_version_specifier).join("', '") %>"
<% else -%>
# Specify your gem's dependencies in <%= name %>.gemspec.
gemspec
<% end -%>
<% unless options[:skip_active_record] -%>
@@ -12,23 +12,14 @@
group :development do
gem "<%= gem_for_database[0] %>"
end
<% end -%>
-<% if options.dev? || options.edge? -%>
-# Your gem is dependent on dev or edge Rails. Once you can lock this
+<% if rails_prerelease? -%>
+# Your gem is dependent on a prerelease version of Rails. Once you can lock this
# dependency down to a specific version, move it to your gemspec.
-<% max_width = gemfile_entries.map { |g| g.name.length }.max -%>
-<% gemfile_entries.each do |gem| -%>
-<% if gem.comment -%>
-
-# <%= gem.comment %>
-<% end -%>
-<%= gem.commented_out ? "# " : "" %>gem "<%= gem.name %>"<%= %(, "#{gem.version}") if gem.version -%>
-<% if gem.options.any? -%>
-, <%= gem.options.map { |k,v|
- "#{k}: #{v.inspect}" }.join(", ") %>
-<% end -%>
+<% gemfile_entries.each do |gemfile_entry| -%>
+<%= gemfile_entry %>
<% end -%>
<% end -%>
<% if RUBY_ENGINE == "ruby" -%>
# Start debugger with binding.b -- Read more: https://github.com/ruby/debug