aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates
diff options
context:
space:
mode:
authorRoque Pinel <repinel@gmail.com>2015-06-03 22:02:25 -0500
committerRoque Pinel <repinel@gmail.com>2015-06-03 22:02:25 -0500
commitebd806cf4bcfabae7cabfa23bb64916e607dd41c (patch)
tree56d5af5a460581c8e3e447c90e1d52742a28b55d /guides/bug_report_templates
parentae5f2b4e79f3e41aad8280109d8bfc788a1a2733 (diff)
downloadrails-ebd806cf4bcfabae7cabfa23bb64916e607dd41c.tar.gz
rails-ebd806cf4bcfabae7cabfa23bb64916e607dd41c.tar.bz2
rails-ebd806cf4bcfabae7cabfa23bb64916e607dd41c.zip
Use inline Gemfile dependency when reporting bugs
With Bundler `1.10.3`, it is possible to list the gems inline without the need to create a `Gemfile` if none is found in the current directory.
Diffstat (limited to 'guides/bug_report_templates')
-rw-r--r--guides/bug_report_templates/action_controller_master.rb17
-rw-r--r--guides/bug_report_templates/active_record_master.rb19
-rw-r--r--guides/bug_report_templates/generic_master.rb15
3 files changed, 18 insertions, 33 deletions
diff --git a/guides/bug_report_templates/action_controller_master.rb b/guides/bug_report_templates/action_controller_master.rb
index 9be8130884..1a5cb4dd4e 100644
--- a/guides/bug_report_templates/action_controller_master.rb
+++ b/guides/bug_report_templates/action_controller_master.rb
@@ -1,15 +1,10 @@
-unless File.exist?('Gemfile')
- File.write('Gemfile', <<-GEMFILE)
- source 'https://rubygems.org'
- gem 'rails', github: 'rails/rails'
- gem 'arel', github: 'rails/arel'
- GEMFILE
-
- system 'bundle'
-end
+require 'bundler/inline'
-require 'bundler'
-Bundler.setup(:default)
+gemfile(true) do
+ source 'https://rubygems.org'
+ gem 'rails', github: 'rails/rails'
+ gem 'arel', github: 'rails/arel'
+end
require 'rails'
require 'action_controller/railtie'
diff --git a/guides/bug_report_templates/active_record_master.rb b/guides/bug_report_templates/active_record_master.rb
index 9557f0b7c5..c69b041ba8 100644
--- a/guides/bug_report_templates/active_record_master.rb
+++ b/guides/bug_report_templates/active_record_master.rb
@@ -1,16 +1,11 @@
-unless File.exist?('Gemfile')
- File.write('Gemfile', <<-GEMFILE)
- source 'https://rubygems.org'
- gem 'rails', github: 'rails/rails'
- gem 'arel', github: 'rails/arel'
- gem 'sqlite3'
- GEMFILE
-
- system 'bundle'
-end
+require 'bundler/inline'
-require 'bundler'
-Bundler.setup(:default)
+gemfile(true) do
+ source 'https://rubygems.org'
+ gem 'rails', github: 'rails/rails'
+ gem 'arel', github: 'rails/arel'
+ gem 'sqlite3'
+end
require 'active_record'
require 'minitest/autorun'
diff --git a/guides/bug_report_templates/generic_master.rb b/guides/bug_report_templates/generic_master.rb
index d930482d4e..4ed34e15a2 100644
--- a/guides/bug_report_templates/generic_master.rb
+++ b/guides/bug_report_templates/generic_master.rb
@@ -1,16 +1,11 @@
-unless File.exist?('Gemfile')
- File.write('Gemfile', <<-GEMFILE)
- source 'https://rubygems.org'
- gem 'rails', github: 'rails/rails'
- gem 'arel', github: 'rails/arel'
- GEMFILE
+require 'bundler/inline'
- system 'bundle'
+gemfile(true) do
+ source 'https://rubygems.org'
+ gem 'rails', github: 'rails/rails'
+ gem 'arel', github: 'rails/arel'
end
-require 'bundler'
-Bundler.setup(:default)
-
require 'active_support'
require 'active_support/core_ext/object/blank'
require 'minitest/autorun'