Skip to content
Snippets Groups Projects
Verified Commit a7cced2f authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Fix Rubocop issues

parent e3aab27e
No related branches found
No related tags found
No related merge requests found
Pipeline #2601 passed
......@@ -8,6 +8,9 @@ AllCops:
Lint/Void:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
# Don't enforce documentation
Style/Documentation:
Enabled: false
......@@ -18,6 +21,10 @@ Metrics/ClassLength:
Metrics/MethodLength:
Max: 50
# Matrix has a lot of methods in the CS API
Metrics/ModuleLength:
Max: 500
Metrics/LineLength:
Max: 190
......
......@@ -42,7 +42,7 @@ module MatrixSdk
@protocols = params.fetch(:protocols, %i[CS])
@protocols = [@protocols] unless @protocols.is_a? Array
@protocols << :CS if @protocols.include?(:AS) && !@protocols.include?(:CS)
@protocols.sort.reverse.each do |prot|
@protocols.sort.reverse_each do |prot|
extend MatrixSdk::Protocols.const_get(prot)
end
......
......@@ -58,6 +58,7 @@ module MatrixSdk
def port=(port)
raise ArgumentError, 'Port must be a number' unless port.is_a? Numeric
@port = port
end
......@@ -66,6 +67,7 @@ module MatrixSdk
def add_method(method, regex, proc = nil, &block)
proc ||= block
raise ArgumentError, 'No method specified' if proc.nil?
(@method_map[method] ||= {})[regex] = proc
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment