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
9c2ac44d
Verified
Commit
9c2ac44d
authored
2 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Fixup CI actions and examples
parent
4ac20623
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.github/workflows/ruby.yml
+1
-1
1 addition, 1 deletion
.github/workflows/ruby.yml
examples/simple_bot.rb
+1
-0
1 addition, 0 deletions
examples/simple_bot.rb
examples/simple_client.rb
+3
-4
3 additions, 4 deletions
examples/simple_client.rb
with
5 additions
and
5 deletions
.github/workflows/ruby.yml
+
1
−
1
View file @
9c2ac44d
...
@@ -28,6 +28,6 @@ jobs:
...
@@ -28,6 +28,6 @@ jobs:
-
name
:
Install rubocop
-
name
:
Install rubocop
run
:
gem install -N rubocop
run
:
gem install -N rubocop
-
name
:
Rubocop
-
name
:
Rubocop
run
:
rubocop
bin
/ lib/
run
:
rubocop
examples
/ lib/
-
name
:
Run tests
-
name
:
Run tests
run
:
bundle exec rake
run
:
bundle exec rake
This diff is collapsed.
Click to expand it.
examples/simple_bot.rb
+
1
−
0
View file @
9c2ac44d
#!/usr/bin/env ruby
#!/usr/bin/env ruby
# frozen_string_literal: true
require
'matrix_sdk'
require
'matrix_sdk'
...
...
This diff is collapsed.
Click to expand it.
examples/simple_client.rb
+
3
−
4
View file @
9c2ac44d
...
@@ -42,7 +42,6 @@ ROOM_STATE_FILTER = {
...
@@ -42,7 +42,6 @@ ROOM_STATE_FILTER = {
}
}
}.
freeze
}.
freeze
class
SimpleClient
<
MatrixSdk
::
Client
class
SimpleClient
<
MatrixSdk
::
Client
def
initialize
(
hs_url
)
def
initialize
(
hs_url
)
super
hs_url
,
sync_filter_limit:
10
super
hs_url
,
sync_filter_limit:
10
...
@@ -106,9 +105,9 @@ if $PROGRAM_NAME == __FILE__
...
@@ -106,9 +105,9 @@ if $PROGRAM_NAME == __FILE__
ARGV
.
shift
ARGV
.
shift
print
'Username: '
print
'Username: '
user
=
STDIN
.
gets
.
strip
user
=
$stdin
.
gets
.
strip
puts
'Password: '
puts
'Password: '
password
=
STDIN
.
noecho
(
&
:gets
).
strip
password
=
$stdin
.
noecho
(
&
:gets
).
strip
puts
'Logging in...'
puts
'Logging in...'
client
.
login
(
user
,
password
,
no_sync:
true
)
client
.
login
(
user
,
password
,
no_sync:
true
)
...
@@ -133,7 +132,7 @@ if $PROGRAM_NAME == __FILE__
...
@@ -133,7 +132,7 @@ if $PROGRAM_NAME == __FILE__
puts
'Entering main loop'
puts
'Entering main loop'
loop
do
loop
do
print
'> '
print
'> '
msg
=
STDIN
.
gets
.
strip
msg
=
$stdin
.
gets
.
strip
break
if
msg
.
start_with?
'/quit'
break
if
msg
.
start_with?
'/quit'
if
msg
.
start_with?
'/me'
if
msg
.
start_with?
'/me'
...
...
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