Skip to content

Commit 972585e

Browse files
committed
Style/Encoding
1 parent 1e2b3ab commit 972585e

17 files changed

+34
-7
lines changed

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Layout/IndentHeredoc:
2121
Lint/EndAlignment:
2222
EnforcedStyleAlignWith: variable
2323

24+
Style/Encoding:
25+
AutoCorrectEncodingComment: '# encoding: UTF-8'
26+
EnforcedStyle: always
27+
2428
Style/TrailingCommaInArguments:
2529
EnforcedStyleForMultiline: consistent_comma
2630

.rubocop_todo.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ Style/Documentation:
6666
- 'lib/mysql2/result.rb'
6767
- 'lib/mysql2/statement.rb'
6868

69-
# Offense count: 21
70-
# Cop supports --auto-correct.
71-
# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
72-
# SupportedStyles: when_needed, always, never
73-
Style/Encoding:
74-
Enabled: false
75-
7669
# Offense count: 14
7770
# Configuration parameters: AllowedVariables.
7871
Style/GlobalVars:

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
source 'https://rubygems.org'
24

35
gemspec

lib/mysql2/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
module Mysql2
24
class Client
35
attr_reader :query_options, :read_timeout

lib/mysql2/console.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
# Loaded by script/console. Land helpers here.
24

35
Pry.config.prompt = lambda do |context, *|

lib/mysql2/field.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
module Mysql2
24
Field = Struct.new(:name, :type)
35
end

lib/mysql2/result.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
module Mysql2
24
class Result
35
attr_reader :server_flags

lib/mysql2/statement.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
module Mysql2
24
class Statement
35
include Enumerable

lib/mysql2/version.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
module Mysql2
24
VERSION = "0.4.10"
35
end

mysql2.gemspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# encoding: UTF-8
2+
13
require File.expand_path('../lib/mysql2/version', __FILE__)
24

35
Mysql2::GEMSPEC = Gem::Specification.new do |s|

0 commit comments

Comments
 (0)