aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2018-10-28 18:12:48 +0100
committerRobin Dupret <robin.dupret@gmail.com>2018-10-28 18:12:48 +0100
commitf1e4d3d8dd59c70cdf9af4f6e0a7a317fb93ef3c (patch)
tree4b278d1caa091044da24f2699abc51a91cdc3546 /guides/bug_report_templates
parentb4186a6fedf2836a500470826b09895070606bb7 (diff)
downloadrails-f1e4d3d8dd59c70cdf9af4f6e0a7a317fb93ef3c.tar.gz
rails-f1e4d3d8dd59c70cdf9af4f6e0a7a317fb93ef3c.tar.bz2
rails-f1e4d3d8dd59c70cdf9af4f6e0a7a317fb93ef3c.zip
Update bug report templates
Given that Bundler 1.10 was released back in 2015, we can assume that people are at least on this version or a higher one so there is no need to ask people to upgrade. Also, given that Rails 5.0 supports Ruby 2.2+ and given that this version come with Minitest 5.4.3 bundled, we don't need to ensure backward compatibility with Minitest 4.
Diffstat (limited to 'guides/bug_report_templates')
-rw-r--r--guides/bug_report_templates/action_controller_gem.rb10
-rw-r--r--guides/bug_report_templates/action_controller_master.rb7
-rw-r--r--guides/bug_report_templates/active_job_gem.rb10
-rw-r--r--guides/bug_report_templates/active_job_master.rb10
-rw-r--r--guides/bug_report_templates/active_record_gem.rb10
-rw-r--r--guides/bug_report_templates/active_record_master.rb7
-rw-r--r--guides/bug_report_templates/active_record_migrations_gem.rb10
-rw-r--r--guides/bug_report_templates/active_record_migrations_master.rb10
-rw-r--r--guides/bug_report_templates/benchmark.rb7
-rw-r--r--guides/bug_report_templates/generic_gem.rb10
-rw-r--r--guides/bug_report_templates/generic_master.rb7
11 files changed, 11 insertions, 87 deletions
diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb
index f339635fb7..6c74200761 100644
--- a/guides/bug_report_templates/action_controller_gem.rb
+++ b/guides/bug_report_templates/action_controller_gem.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -42,9 +37,6 @@ end
require "minitest/autorun"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
class BugTest < Minitest::Test
include Rack::Test::Methods
diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb
index ffd81c0079..6d53e957d9 100644
--- a/guides/bug_report_templates/action_controller_master.rb
+++ b/guides/bug_report_templates/action_controller_master.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
diff --git a/guides/bug_report_templates/active_job_gem.rb b/guides/bug_report_templates/active_job_gem.rb
index b260f0835b..eb9d1316e9 100644
--- a/guides/bug_report_templates/active_job_gem.rb
+++ b/guides/bug_report_templates/active_job_gem.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -19,9 +14,6 @@ end
require "minitest/autorun"
require "active_job"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
class BuggyJob < ActiveJob::Base
def perform
puts "performed"
diff --git a/guides/bug_report_templates/active_job_master.rb b/guides/bug_report_templates/active_job_master.rb
index 894581da96..ae3ef7752f 100644
--- a/guides/bug_report_templates/active_job_master.rb
+++ b/guides/bug_report_templates/active_job_master.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -18,9 +13,6 @@ end
require "active_job"
require "minitest/autorun"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
class BuggyJob < ActiveJob::Base
def perform
puts "performed"
diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb
index 5f70dbbe69..d88304a219 100644
--- a/guides/bug_report_templates/active_record_gem.rb
+++ b/guides/bug_report_templates/active_record_gem.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -21,9 +16,6 @@ require "active_record"
require "minitest/autorun"
require "logger"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Base.logger = Logger.new(STDOUT)
diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb
index 914f04f51a..780456b7b6 100644
--- a/guides/bug_report_templates/active_record_master.rb
+++ b/guides/bug_report_templates/active_record_master.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
diff --git a/guides/bug_report_templates/active_record_migrations_gem.rb b/guides/bug_report_templates/active_record_migrations_gem.rb
index 7f7359fa78..5dfd49fb38 100644
--- a/guides/bug_report_templates/active_record_migrations_gem.rb
+++ b/guides/bug_report_templates/active_record_migrations_gem.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -21,9 +16,6 @@ require "active_record"
require "minitest/autorun"
require "logger"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Base.logger = Logger.new(STDOUT)
diff --git a/guides/bug_report_templates/active_record_migrations_master.rb b/guides/bug_report_templates/active_record_migrations_master.rb
index 106d94491c..b0fe3bc660 100644
--- a/guides/bug_report_templates/active_record_migrations_master.rb
+++ b/guides/bug_report_templates/active_record_migrations_master.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -20,9 +15,6 @@ require "active_record"
require "minitest/autorun"
require "logger"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Base.logger = Logger.new(STDOUT)
diff --git a/guides/bug_report_templates/benchmark.rb b/guides/bug_report_templates/benchmark.rb
index 046572148b..4a8ce787c7 100644
--- a/guides/bug_report_templates/benchmark.rb
+++ b/guides/bug_report_templates/benchmark.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
diff --git a/guides/bug_report_templates/generic_gem.rb b/guides/bug_report_templates/generic_gem.rb
index aec5bf0577..3fd54437f7 100644
--- a/guides/bug_report_templates/generic_gem.rb
+++ b/guides/bug_report_templates/generic_gem.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
@@ -20,9 +15,6 @@ require "active_support"
require "active_support/core_ext/object/blank"
require "minitest/autorun"
-# Ensure backward compatibility with minitest 4.
-Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
-
class BugTest < Minitest::Test
def test_stuff
assert "zomg".present?
diff --git a/guides/bug_report_templates/generic_master.rb b/guides/bug_report_templates/generic_master.rb
index 727f428960..ec65fee292 100644
--- a/guides/bug_report_templates/generic_master.rb
+++ b/guides/bug_report_templates/generic_master.rb
@@ -1,11 +1,6 @@
# frozen_string_literal: true
-begin
- require "bundler/inline"
-rescue LoadError => e
- $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
- raise e
-end
+require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"