Skip to content

Commit 620a055

Browse files
committed
Revert "Layout/IndentHeredoc"
This reverts commit 72f50f3.
1 parent 7f9569e commit 620a055

File tree

4 files changed

+29
-23
lines changed

4 files changed

+29
-23
lines changed

.rubocop.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ Layout/CaseIndentation:
1515
Layout/IndentHash:
1616
EnforcedStyle: consistent
1717

18-
Layout/IndentHeredoc:
19-
EnforcedStyle: powerpack
20-
2118
Lint/EndAlignment:
2219
EnforcedStyleAlignWith: variable
2320

.rubocop_todo.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9+
# Offense count: 3
10+
# Cop supports --auto-correct.
11+
# Configuration parameters: EnforcedStyle, SupportedStyles.
12+
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
13+
Layout/IndentHeredoc:
14+
Exclude:
15+
- 'support/ruby_enc_to_mysql.rb'
16+
- 'tasks/compile.rake'
17+
918
# Offense count: 2
1019
Metrics/AbcSize:
1120
Max: 90

support/ruby_enc_to_mysql.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
"eucjpms" => "eucJP-ms",
4141
}
4242

43-
puts <<-HEADER.strip_indent
44-
%readonly-tables
45-
%enum
46-
%define lookup-function-name mysql2_mysql_enc_name_to_rb
47-
%define hash-function-name mysql2_mysql_enc_name_to_rb_hash
48-
%struct-type
49-
struct mysql2_mysql_enc_name_to_rb_map { const char *name; const char *rb_name; }
50-
%%
43+
puts <<-HEADER
44+
%readonly-tables
45+
%enum
46+
%define lookup-function-name mysql2_mysql_enc_name_to_rb
47+
%define hash-function-name mysql2_mysql_enc_name_to_rb_hash
48+
%struct-type
49+
struct mysql2_mysql_enc_name_to_rb_map { const char *name; const char *rb_name; }
50+
%%
5151
HEADER
5252

5353
mysql_to_rb.each do |mysql, ruby|

tasks/compile.rake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ Rake::ExtensionTask.new("mysql2", Mysql2::GEMSPEC) do |ext|
3333
spec.files << 'lib/mysql2/mysql2.rb'
3434
spec.files << 'vendor/libmysql.dll'
3535
spec.files << 'vendor/README'
36-
spec.post_install_message = <<-POST_INSTALL_MESSAGE.strip_indent
36+
spec.post_install_message = <<-POST_INSTALL_MESSAGE
3737
38-
======================================================================================================
38+
======================================================================================================
3939
40-
You've installed the binary version of #{spec.name}.
41-
It was built using MySQL Connector/C version #{CONNECTOR_VERSION}.
42-
It's recommended to use the exact same version to avoid potential issues.
40+
You've installed the binary version of #{spec.name}.
41+
It was built using MySQL Connector/C version #{CONNECTOR_VERSION}.
42+
It's recommended to use the exact same version to avoid potential issues.
4343
44-
At the time of building this gem, the necessary DLL files were retrieved from:
45-
#{vendor_mysql_url(spec.platform)}
44+
At the time of building this gem, the necessary DLL files were retrieved from:
45+
#{vendor_mysql_url(spec.platform)}
4646
47-
This gem *includes* vendor/libmysql.dll with redistribution notice in vendor/README.
47+
This gem *includes* vendor/libmysql.dll with redistribution notice in vendor/README.
4848
49-
======================================================================================================
49+
======================================================================================================
5050
5151
POST_INSTALL_MESSAGE
5252
end
@@ -64,9 +64,9 @@ end
6464
file 'lib/mysql2/mysql2.rb' do |t|
6565
name = Mysql2::GEMSPEC.name
6666
File.open(t.name, 'wb') do |f|
67-
f.write <<-END_OF_RUBY.strip_indent
68-
RUBY_VERSION =~ /(\\d+.\\d+)/
69-
require "#{name}/\#{$1}/#{name}"
67+
f.write <<-END_OF_RUBY
68+
RUBY_VERSION =~ /(\\d+.\\d+)/
69+
require "#{name}/\#{$1}/#{name}"
7070
END_OF_RUBY
7171
end
7272
end

0 commit comments

Comments
 (0)