summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-21 18:57:58 +0900
committergit <svn-admin@ruby-lang.org>2023-03-22 21:21:08 +0000
commit348412c7fa0230925c3b1ffc94e64367273da42d (patch)
tree82a48f3ca9f986ddc33c76137810e561a8378e50 /spec/bundler
parent7c307e0379e3c6c07d821b863fefbdfdfc84c4f1 (diff)
[rubygems/rubygems] Use indented heredoc
https://github.com/rubygems/rubygems/commit/085d2776d8
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/bundler/bundler_spec.rb2
-rw-r--r--spec/bundler/commands/exec_spec.rb2
-rw-r--r--spec/bundler/install/bundler_spec.rb10
-rw-r--r--spec/bundler/install/gems/flex_spec.rb4
-rw-r--r--spec/bundler/support/builders.rb4
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/bundler/bundler/bundler_spec.rb b/spec/bundler/bundler/bundler_spec.rb
index 862a2c3e07..cf60971240 100644
--- a/spec/bundler/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler/bundler_spec.rb
@@ -71,7 +71,7 @@ RSpec.describe Bundler do
$VERBOSE = verbose
File.open(app_gemspec_path, "wb") do |file|
- file.puts <<-GEMSPEC.gsub(/^\s+/, "")
+ file.puts <<~GEMSPEC
# -*- encoding: utf-8 -*-
Gem::Specification.new do |gem|
gem.author = "André the Giant"
diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb
index 099cdb39fa..95db25b358 100644
--- a/spec/bundler/commands/exec_spec.rb
+++ b/spec/bundler/commands/exec_spec.rb
@@ -697,7 +697,7 @@ RSpec.describe "bundle exec" do
context "`load`ing a ruby file instead of `exec`ing" do
let(:path) { bundled_app("ruby_executable") }
let(:shebang) { "#!/usr/bin/env ruby" }
- let(:executable) { <<-RUBY.gsub(/^ */, "").strip }
+ let(:executable) { <<~RUBY.strip }
#{shebang}
require "rack"
diff --git a/spec/bundler/install/bundler_spec.rb b/spec/bundler/install/bundler_spec.rb
index e7ec3bc7e7..a0d5332e96 100644
--- a/spec/bundler/install/bundler_spec.rb
+++ b/spec/bundler/install/bundler_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe "bundle install" do
gem "bundler", "0.9.1"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because the current Bundler version (#{Bundler::VERSION}) does not satisfy bundler = 0.9.1
@@ -56,7 +56,7 @@ RSpec.describe "bundle install" do
gem "bundler", "~> 0.8"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because rails >= 3.0 depends on bundler >= 0.9.0.pre
@@ -79,7 +79,7 @@ RSpec.describe "bundle install" do
gem "bundler", "0.9.2"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because the current Bundler version (#{Bundler::VERSION}) does not satisfy bundler = 0.9.2
@@ -149,7 +149,7 @@ RSpec.describe "bundle install" do
gem "rails_pinned_to_old_activesupport"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because every version of rails_pinned_to_old_activesupport depends on activesupport = 1.2.3
@@ -177,7 +177,7 @@ RSpec.describe "bundle install" do
gem "activesupport", "2.3.5"
G
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because every version of rails_pinned_to_old_activesupport depends on activesupport = 1.2.3
diff --git a/spec/bundler/install/gems/flex_spec.rb b/spec/bundler/install/gems/flex_spec.rb
index d5fa55be48..ddb9480343 100644
--- a/spec/bundler/install/gems/flex_spec.rb
+++ b/spec/bundler/install/gems/flex_spec.rb
@@ -193,7 +193,7 @@ RSpec.describe "bundle flex_install" do
it "discards the locked gems when the Gemfile requires different versions than the lock" do
bundle "config set force_ruby_platform true"
- nice_error = <<-E.strip.gsub(/^ {8}/, "")
+ nice_error = <<~E.strip
Could not find compatible versions
Because rack-obama >= 2.0 depends on rack = 1.2
@@ -210,7 +210,7 @@ RSpec.describe "bundle flex_install" do
it "does not include conflicts with a single requirement tree, because that can't possibly be a conflict" do
bundle "config set force_ruby_platform true"
- bad_error = <<-E.strip.gsub(/^ {8}/, "")
+ bad_error = <<~E.strip
Bundler could not find compatible versions for gem "rack-obama":
In Gemfile:
rack-obama (= 2.0)
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index 3aa5454b6a..b546ac7305 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -635,7 +635,7 @@ module Spec
end
end
- TEST_CERT = <<-CERT.gsub(/^\s*/, "")
+ TEST_CERT = <<~CERT
-----BEGIN CERTIFICATE-----
MIIDMjCCAhqgAwIBAgIBATANBgkqhkiG9w0BAQUFADAnMQwwCgYDVQQDDAN5b3Ux
FzAVBgoJkiaJk/IsZAEZFgdleGFtcGxlMB4XDTE1MDIwODAwMTIyM1oXDTQyMDYy
@@ -658,7 +658,7 @@ module Spec
-----END CERTIFICATE-----
CERT
- TEST_PKEY = <<-PKEY.gsub(/^\s*/, "")
+ TEST_PKEY = <<~PKEY
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA2W8V2k3jdzgMxL0mjTqbRruTdtDcdZDXKtiFkyLvsXUXvc2k
GSdgcjMOS1CkafqGz/hAUlPibjM0QEXjtQuMdTmdMrmuORLeeIZhSO+HdkTNV6j3