Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix Ruby SDK
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Olofsson
Matrix Ruby SDK
Commits
a7cced2f
Verified
Commit
a7cced2f
authored
6 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Fix Rubocop issues
parent
e3aab27e
No related branches found
No related tags found
No related merge requests found
Pipeline
#2601
passed
6 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.rubocop.yml
+7
-0
7 additions, 0 deletions
.rubocop.yml
lib/matrix_sdk/api.rb
+1
-1
1 addition, 1 deletion
lib/matrix_sdk/api.rb
lib/matrix_sdk/application_service.rb
+2
-0
2 additions, 0 deletions
lib/matrix_sdk/application_service.rb
with
10 additions
and
1 deletion
.rubocop.yml
+
7
−
0
View file @
a7cced2f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/matrix_sdk/api.rb
+
1
−
1
View file @
a7cced2f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/matrix_sdk/application_service.rb
+
2
−
0
View file @
a7cced2f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment