Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
286cf639
Unverified
Commit
286cf639
authored
Nov 2, 2022
by
Ahmad Farhat
Committed by
GitHub
Nov 2, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Add /api if missing from endpoint (#4062)
* Add /api if missing from endpoint * rubo * rspec fix * ruba again
parent
f79c975b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/services/big_blue_button_api.rb
+1
-11
1 addition, 11 deletions
app/services/big_blue_button_api.rb
config/application.rb
+5
-0
5 additions, 0 deletions
config/application.rb
spec/services/big_blue_button_api_spec.rb
+7
-4
7 additions, 4 deletions
spec/services/big_blue_button_api_spec.rb
with
13 additions
and
15 deletions
app/services/big_blue_button_api.rb
+
1
−
11
View file @
286cf639
...
...
@@ -9,7 +9,7 @@ class BigBlueButtonApi
def
bbb_server
# TODO: Amir - Protect the BBB secret.
# TODO: Hadi - Add additional logic here...
@bbb_server
||=
BigBlueButton
::
BigBlueButtonApi
.
new
(
bbb_endpoint
,
bbb
_secret
,
'1.8'
)
@bbb_server
||=
BigBlueButton
::
BigBlueButtonApi
.
new
(
Rails
.
configuration
.
bigbluebutton_endpoint
,
Rails
.
configuration
.
bigbluebutton
_secret
,
'1.8'
)
end
# Start a meeting for a specific room and returns the join URL.
...
...
@@ -76,14 +76,4 @@ class BigBlueButtonApi
def
decode_jwt
(
token
)
JWT
.
decode
token
,
bbb_secret
,
true
,
{
algorithm:
'HS256'
}
end
private
def
bbb_endpoint
ENV
.
fetch
'BIGBLUEBUTTON_ENDPOINT'
,
'https://test-install.blindsidenetworks.com/bigbluebutton/api'
end
def
bbb_secret
ENV
.
fetch
'BIGBLUEBUTTON_SECRET'
,
'8cd8ef52e8e101574e400365b55e11a6'
end
end
This diff is collapsed.
Click to expand it.
config/application.rb
+
5
−
0
View file @
286cf639
...
...
@@ -32,5 +32,10 @@ module Greenlight
ActiveModelSerializers
.
config
.
adapter
=
:json
config
.
active_storage
.
variant_processor
=
:mini_magick
config
.
bigbluebutton_endpoint
=
ENV
.
fetch
(
'BIGBLUEBUTTON_ENDPOINT'
,
'https://test-install.blindsidenetworks.com/bigbluebutton/api'
)
config
.
bigbluebutton_endpoint
=
File
.
join
(
config
.
bigbluebutton_endpoint
,
'/api'
)
unless
config
.
bigbluebutton_endpoint
.
end_with?
(
'api'
,
'api/'
)
config
.
bigbluebutton_secret
=
ENV
.
fetch
(
'BIGBLUEBUTTON_SECRET'
,
'8cd8ef52e8e101574e400365b55e11a6'
)
end
end
This diff is collapsed.
Click to expand it.
spec/services/big_blue_button_api_spec.rb
+
7
−
4
View file @
286cf639
...
...
@@ -7,14 +7,17 @@ describe BigBlueButtonApi, type: :service do
let
(
:bbb_service
)
{
described_class
.
new
}
before
do
ENV
[
'BIGBLUEBUTTON_ENDPOINT'
]
=
'http://test.com/bigbluebutton/api'
ENV
[
'BIGBLUEBUTTON_SECRET'
]
=
'test'
Rails
.
configuration
.
bigbluebutton_endpoint
=
'http://test.com/bigbluebutton/api'
Rails
.
configuration
.
bigbluebutton_secret
=
'test'
end
describe
'Instance of BigBlueButtonApi being created'
do
it
'Created an instance of BigBlueButtonApi'
do
expect
(
BigBlueButton
::
BigBlueButtonApi
).
to
receive
(
:new
).
with
(
ENV
.
fetch
(
'BIGBLUEBUTTON_ENDPOINT'
,
nil
),
ENV
.
fetch
(
'BIGBLUEBUTTON_SECRET'
,
nil
),
'1.8'
)
expect
(
BigBlueButton
::
BigBlueButtonApi
).
to
receive
(
:new
).
with
(
Rails
.
configuration
.
bigbluebutton_endpoint
,
Rails
.
configuration
.
bigbluebutton_secret
,
'1.8'
)
bbb_service
.
bbb_server
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