diff options
Diffstat (limited to 'guides/bug_report_templates')
-rw-r--r-- | guides/bug_report_templates/action_controller_gem.rb | 10 | ||||
-rw-r--r-- | guides/bug_report_templates/action_controller_master.rb | 8 | ||||
-rw-r--r-- | guides/bug_report_templates/active_job_gem.rb | 10 | ||||
-rw-r--r-- | guides/bug_report_templates/active_job_master.rb | 10 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_gem.rb | 12 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_master.rb | 7 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_migrations_gem.rb | 12 | ||||
-rw-r--r-- | guides/bug_report_templates/active_record_migrations_master.rb | 10 | ||||
-rw-r--r-- | guides/bug_report_templates/benchmark.rb | 7 | ||||
-rw-r--r-- | guides/bug_report_templates/generic_gem.rb | 10 | ||||
-rw-r--r-- | guides/bug_report_templates/generic_master.rb | 7 |
11 files changed, 14 insertions, 89 deletions
diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb index e8b6ad19dd..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..682269163a 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" @@ -19,6 +14,7 @@ require "action_controller/railtie" class TestApp < Rails::Application config.root = __dir__ + config.hosts << "example.org" secrets.secret_key_base = "secret_key_base" config.logger = Logger.new($stdout) diff --git a/guides/bug_report_templates/active_job_gem.rb b/guides/bug_report_templates/active_job_gem.rb index 720b7e9c51..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 4bcee07607..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 c0d705239b..74b329115d 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" @@ -14,16 +9,13 @@ gemfile(true) do # Activate the gem you are reporting the issue against. gem "activerecord", "5.2.0" - gem "sqlite3" + gem "sqlite3", "~> 1.3.6" end 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 f47cf08766..8d71863034 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" @@ -14,16 +9,13 @@ gemfile(true) do # Activate the gem you are reporting the issue against. gem "activerecord", "5.2.0" - gem "sqlite3" + gem "sqlite3", "~> 1.3.6" end 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 715dca98ba..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 0935354bf4..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" |