Skip to content

Commit b380da7

Browse files
committed
Consolidate bug_report_templates and remove the gem versions
As a contributor, changing a single line to test the desired version does not warrant a separate file for each type of report. The only argument I can see for keeping the gem versions is that users are likely reporting a bug for a specific version of Rails, typically during an upgrade. As few people are probably testing their applications against Rails main branch. Additionally, having the gem version templates means that we are testing both main and a stable release of Rails in CI, which has some benefit. By removing the edge version templates, we also lose that coverage in CI, but I think it's something we can fix in buildkite-config to replace the line in those guides before running them later. IMO, the cost of separate files and the confusion it will create if we want to add more templates outweighs the benefits mentioned here. My motivation is that I want to add more report templates, like for additional adapters, and this list will grow to be unmanageable if we keep the gem versions.
1 parent 5c4a7a7 commit b380da7

18 files changed

+37
-424
lines changed

guides/bug_report_templates/action_controller_gem.rb renamed to guides/bug_report_templates/action_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77

88
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
99

10-
# Activate the gem you are reporting the issue against.
11-
gem "rails", "~> 7.1.0"
10+
gem "rails"
11+
# If you want to test against edge Rails replace the previous line with this:
12+
# gem "rails", github: "rails/rails", branch: "main"
1213
end
1314

14-
require "rack/test"
1515
require "action_controller/railtie"
1616

1717
class TestApp < Rails::Application
1818
config.root = __dir__
1919
config.hosts << "example.org"
20-
config.session_store :cookie_store, key: "cookie_store_key"
2120
config.secret_key_base = "secret_key_base"
2221

2322
config.logger = Logger.new($stdout)
@@ -37,6 +36,7 @@ def index
3736
end
3837

3938
require "minitest/autorun"
39+
require "rack/test"
4040

4141
class BugTest < Minitest::Test
4242
include Rack::Test::Methods

guides/bug_report_templates/action_controller_main.rb

Lines changed: 0 additions & 51 deletions
This file was deleted.

guides/bug_report_templates/action_mailbox_gem.rb renamed to guides/bug_report_templates/action_mailbox.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
99

10-
# Activate the gem you are reporting the issue against.
11-
gem "rails", "~> 7.1.0"
12-
gem "sqlite3"
10+
gem "rails"
11+
# If you want to test against edge Rails replace the previous line with this:
12+
# gem "rails", github: "rails/rails", branch: "main"
1313
end
1414

1515
require "active_record/railtie"

guides/bug_report_templates/action_mailbox_main.rb

Lines changed: 0 additions & 76 deletions
This file was deleted.

guides/bug_report_templates/action_mailer_gem.rb renamed to guides/bug_report_templates/action_mailer.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
99

10-
# Activate the gem you are reporting the issue against.
11-
gem "rails", "~> 7.1.0"
10+
gem "rails"
11+
# If you want to test against edge Rails replace the previous line with this:
12+
# gem "rails", github: "rails/rails", branch: "main"
1213
end
1314

1415
require "action_mailer/railtie"

guides/bug_report_templates/action_mailer_main.rb

Lines changed: 0 additions & 39 deletions
This file was deleted.

guides/bug_report_templates/active_job_gem.rb renamed to guides/bug_report_templates/active_job.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77

88
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
99

10-
# Activate the gem you are reporting the issue against.
11-
gem "activejob", "~> 7.1.0"
10+
gem "rails"
11+
# If you want to test against edge Rails replace the previous line with this:
12+
# gem "rails", github: "rails/rails", branch: "main"
1213
end
1314

14-
require "minitest/autorun"
1515
require "active_job"
16+
require "minitest/autorun"
1617

1718
class BuggyJob < ActiveJob::Base
1819
def perform

guides/bug_report_templates/active_job_main.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

guides/bug_report_templates/active_record_gem.rb renamed to guides/bug_report_templates/active_record.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
99

10-
# Activate the gem you are reporting the issue against.
11-
gem "activerecord", "~> 7.1.0"
12-
gem "sqlite3"
10+
gem "rails"
11+
# If you want to test against edge Rails replace the previous line with this:
12+
# gem "rails", github: "rails/rails", branch: "main"
1313
end
1414

1515
require "active_record"

guides/bug_report_templates/active_record_main.rb

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)