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
fea6ec98
Verified
Commit
fea6ec98
authored
5 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Make the Api#transaction_id method public
parent
5fb8dae8
No related branches found
No related tags found
No related merge requests found
Pipeline
#12175
passed
5 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/matrix_sdk/api.rb
+9
-6
9 additions, 6 deletions
lib/matrix_sdk/api.rb
with
9 additions
and
6 deletions
lib/matrix_sdk/api.rb
+
9
−
6
View file @
fea6ec98
...
@@ -305,6 +305,15 @@ module MatrixSdk
...
@@ -305,6 +305,15 @@ module MatrixSdk
end
end
end
end
# Generate a transaction ID
#
# @return [String] An arbitrary transaction ID
def
transaction_id
ret
=
@transaction_id
||=
0
@transaction_id
=
@transaction_id
.
succ
ret
end
private
private
def
print_http
(
http
,
body:
true
,
duration:
nil
,
id:
nil
)
def
print_http
(
http
,
body:
true
,
duration:
nil
,
id:
nil
)
...
@@ -331,12 +340,6 @@ module MatrixSdk
...
@@ -331,12 +340,6 @@ module MatrixSdk
logger
.
warn
"
#{
e
.
class
}
occured while printing request debug;
#{
e
.
message
}
\n
#{
e
.
backtrace
.
join
"
\n
"
}
"
logger
.
warn
"
#{
e
.
class
}
occured while printing request debug;
#{
e
.
message
}
\n
#{
e
.
backtrace
.
join
"
\n
"
}
"
end
end
def
transaction_id
ret
=
@transaction_id
||=
0
@transaction_id
=
@transaction_id
.
succ
ret
end
def
api_to_path
(
api
)
def
api_to_path
(
api
)
# TODO: <api>_current / <api>_latest
# TODO: <api>_current / <api>_latest
"/_matrix/
#{
api
.
to_s
.
split
(
'_'
).
join
(
'/'
)
}
"
"/_matrix/
#{
api
.
to_s
.
split
(
'_'
).
join
(
'/'
)
}
"
...
...
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