Skip to content

Commit ffa5f3a

Browse files
Rubucop update
1 parent 6fd4be2 commit ffa5f3a

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

lib/puppet/provider/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def self.mysql_caller(text_of_sql, type)
141141
mysql_raw([defaults_file, '-NBe', text_of_sql].flatten.compact).scrub
142142
end
143143
else
144-
raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: type })
144+
raise Puppet::Error, _("#mysql_caller: Unrecognised type '%{type}'" % { type: })
145145
end
146146
end
147147

lib/puppet/provider/mysql_database/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def self.instances
1313
k, v = line.split(%r{\s})
1414
attributes[k] = v
1515
end
16-
new(name: name,
16+
new(name:,
1717
ensure: :present,
1818
charset: attributes['character_set_database'],
1919
collate: attributes['collation_database'])

lib/puppet/provider/mysql_grant/mysql.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def self.instances
9999

100100
instance_configs[name] = {
101101
privileges: sorted_privileges,
102-
table: table,
102+
table:,
103103
user: "#{user}@#{host}",
104104
options: options.uniq
105105
}
@@ -108,7 +108,7 @@ def self.instances
108108
instances = []
109109
instance_configs.map do |name, config|
110110
instances << new(
111-
name: name,
111+
name:,
112112
ensure: :present,
113113
privileges: config[:privileges],
114114
table: config[:table],

lib/puppet/provider/mysql_login_path/inifile.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Error < StandardError; end
3030
def self.load(filename, opts = {})
3131
return unless File.file? filename
3232

33-
new(opts.merge(filename: filename))
33+
new(opts.merge(filename:))
3434
end
3535

3636
# Get and set the filename

lib/puppet/provider/mysql_login_path/mysql_login_path.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def mysql_config_editor_cmd(context, uid, *args)
5959
Puppet::Util::Execution.execute(
6060
args,
6161
failonfail: true,
62-
uid: uid,
62+
uid:,
6363
custom_environment: { 'HOME' => homedir },
6464
)
6565
end
@@ -70,7 +70,7 @@ def my_print_defaults_cmd(context, uid, *args)
7070
Puppet::Util::Execution.execute(
7171
args,
7272
failonfail: true,
73-
uid: uid,
73+
uid:,
7474
custom_environment: { 'HOME' => homedir },
7575
)
7676
end

lib/puppet/provider/mysql_plugin/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def self.instances
1010
mysql_caller('show plugins', 'regular').split("\n").map do |line|
1111
name, _status, _type, library, _license = line.split(%r{\t})
12-
new(name: name,
12+
new(name:,
1313
ensure: :present,
1414
soname: library)
1515
end

lib/puppet/provider/mysql_user/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def self.instances
3434
# https://jira.mariadb.org/browse/MDEV-16238 https://jira.mariadb.org/browse/MDEV-16774
3535
@password = @authentication_string
3636
end
37-
new(name: name,
37+
new(name:,
3838
ensure: :present,
3939
password_hash: @password,
4040
plugin: @plugin,

tasks/export.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get(file, database, user, password)
1212
cmd_string << " --password=#{password}" unless password.nil?
1313
cmd_string << " > #{file}" unless file.nil?
1414
stdout, stderr, status = Open3.capture3(cmd_string)
15-
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0
15+
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: }) if status != 0
1616

1717
{ status: stdout.strip }
1818
end

tasks/sql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def get(sql, database, user, password)
1111
cmd << "--user=#{user}" unless user.nil?
1212
cmd << "--password=#{password}" unless password.nil?
1313
stdout, stderr, status = Open3.capture3(*cmd)
14-
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0
14+
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: }) if status != 0
1515

1616
{ status: stdout.strip }
1717
end

0 commit comments

Comments
 (0)