Skip to content

Commit 983a703

Browse files
authored
Merge pull request #99 from ekohl/fix-rubocop
Rename Naming/PredicateName to PreficatePrefix
2 parents 91c19d8 + 6830651 commit 983a703

File tree

13 files changed

+16
-16
lines changed

13 files changed

+16
-16
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Naming/MethodName:
161161
Naming/MethodParameterName:
162162
Enabled: false
163163

164-
Naming/PredicateName:
164+
Naming/PredicatePrefix:
165165
ForbiddenPrefixes: []
166166

167167
Naming/RescuedExceptionsVariableName:

lib/puppet/feature/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module WindowsSymlink
5858
require 'ffi'
5959
extend FFI::Library
6060

61-
def self.is_implemented # rubocop:disable Naming/PredicateName
61+
def self.is_implemented # rubocop:disable Naming/PredicatePrefix
6262
ffi_lib :kernel32
6363
attach_function :CreateSymbolicLinkW, [:lpwstr, :lpwstr, :dword], :boolean
6464

lib/puppet/functions/defined.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
required_repeated_param 'Variant[String, Type[CatalogEntry], Type[Type[CatalogEntry]]]', :vals
108108
end
109109

110-
def is_defined(scope, *vals) # rubocop:disable Naming/PredicateName
110+
def is_defined(scope, *vals) # rubocop:disable Naming/PredicatePrefix
111111
vals.any? do |val|
112112
case val
113113
when String

lib/puppet/parameter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ def defaultto(value = nil, &block)
9393
end
9494
end
9595

96-
# rubocop:disable Naming/PredicateName
96+
# rubocop:disable Naming/PredicatePrefix
9797
def sensitive(value = nil, &block)
9898
if block
9999
define_method(:is_sensitive, &block)
100100
else
101101
define_method(:is_sensitive) do value end
102102
end
103103
end
104-
# rubocop:enable Naming/PredicateName
104+
# rubocop:enable Naming/PredicatePrefix
105105

106106
# Produces a documentation string.
107107
# If an enumeration of _valid values_ has been defined, it is appended to the documentation

lib/puppet/property.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def property_matches?(current, desired)
403403
# are not already in suitable form.
404404
# @param value [Object] the value to format as a string
405405
# @return [String] a pretty printing string
406-
def is_to_s(value) # rubocop:disable Naming/PredicateName
406+
def is_to_s(value) # rubocop:disable Naming/PredicatePrefix
407407
self.class.format_value_for_display(value)
408408
end
409409

lib/puppet/property/keyvalue.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def should_to_s(should_value)
3434
hash_to_key_value_s(should_value)
3535
end
3636

37-
def is_to_s(current_value) # rubocop:disable Naming/PredicateName
37+
def is_to_s(current_value) # rubocop:disable Naming/PredicatePrefix
3838
hash_to_key_value_s(current_value)
3939
end
4040

lib/puppet/property/list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Property
88
# For an ordered list see {Puppet::Property::OrderedList}.
99
#
1010
class List < Property
11-
def is_to_s(currentvalue) # rubocop:disable Naming/PredicateName
11+
def is_to_s(currentvalue) # rubocop:disable Naming/PredicatePrefix
1212
currentvalue == :absent ? super(currentvalue) : currentvalue.join(delimiter)
1313
end
1414

lib/puppet/provider.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def self.optional_commands(hash)
199199
# @note the name ´has_command´ looks odd in an API context, but makes more sense when seen in the internal
200200
# DSL context where a Provider is declaratively defined.
201201
# @api public
202-
# rubocop:disable Naming/PredicateName
202+
# rubocop:disable Naming/PredicatePrefix
203203
def self.has_command(name, path, &block)
204204
name = name.intern
205205
command = CommandDefiner.define(name, path, self, &block)
@@ -211,7 +211,7 @@ def self.has_command(name, path, &block)
211211
return command.execute(*args)
212212
end
213213
end
214-
# rubocop:enable Naming/PredicateName
214+
# rubocop:enable Naming/PredicatePrefix
215215

216216
# Internal helper class when creating commands - undocumented.
217217
# @api private
@@ -232,7 +232,7 @@ def initialize(name, path, confiner)
232232
@custom_environment = {}
233233
end
234234

235-
def is_optional # rubocop:disable Naming/PredicateName
235+
def is_optional # rubocop:disable Naming/PredicatePrefix
236236
@optional = true
237237
end
238238

lib/puppet/type/file/group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def insync?(current)
3939
end
4040

4141
# We want to print names, not numbers
42-
def is_to_s(currentvalue) # rubocop:disable Naming/PredicateName
42+
def is_to_s(currentvalue) # rubocop:disable Naming/PredicatePrefix
4343
super(provider.gid2name(currentvalue) || currentvalue)
4444
end
4545

lib/puppet/type/file/mode.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def should_to_s(should_value)
179179
"'#{should_value.rjust(4, '0')}'"
180180
end
181181

182-
def is_to_s(currentvalue) # rubocop:disable Naming/PredicateName
182+
def is_to_s(currentvalue) # rubocop:disable Naming/PredicatePrefix
183183
if currentvalue == :absent
184184
# This can occur during audits---if a file is transitioning from
185185
# present to absent the mode will have a value of `:absent`.

0 commit comments

Comments
 (0)