diff --git a/Gemfile b/Gemfile index 4aa8f6b2..00c79238 100644 --- a/Gemfile +++ b/Gemfile @@ -46,3 +46,6 @@ end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +gem 'bigbluebutton-api-ruby' + diff --git a/Gemfile.lock b/Gemfile.lock index 8015104a..3aa0a317 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,6 +39,8 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) arel (7.1.4) + bigbluebutton-api-ruby (1.6.0) + xml-simple (~> 1.1) builder (3.2.2) byebug (9.0.6) coffee-rails (4.2.1) @@ -149,11 +151,13 @@ GEM websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) + xml-simple (1.1.5) PLATFORMS ruby DEPENDENCIES + bigbluebutton-api-ruby byebug coffee-rails (~> 4.2) jbuilder (~> 2.5) diff --git a/app/assets/javascripts/landing.coffee b/app/assets/javascripts/landing.coffee new file mode 100644 index 00000000..24f83d18 --- /dev/null +++ b/app/assets/javascripts/landing.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/landing.scss new file mode 100644 index 00000000..f33d6f8d --- /dev/null +++ b/app/assets/stylesheets/landing.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the landing controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/landing_controller.rb b/app/controllers/landing_controller.rb new file mode 100644 index 00000000..135fd099 --- /dev/null +++ b/app/controllers/landing_controller.rb @@ -0,0 +1,15 @@ +class LandingController < ApplicationController + def index + @meeting_token = params[:id] || @meeting_token = rand.to_s[2..10] + @meeting_url = meeting_url(@meeting_token) + end + + private + def meeting_url(meeting_token) + _meeting_url = "#{request.original_url}" + _meeting_url += "meeting" if ( request.original_url == "#{request.base_url}/" ) + _meeting_url += "/" unless _meeting_url.end_with?('/') + _meeting_url += "#{meeting_token}" if !params.has_key?(:id) + _meeting_url + end +end diff --git a/app/helpers/landing_helper.rb b/app/helpers/landing_helper.rb new file mode 100644 index 00000000..6aa3ee92 --- /dev/null +++ b/app/helpers/landing_helper.rb @@ -0,0 +1,2 @@ +module LandingHelper +end diff --git a/app/views/landing/index.html.erb b/app/views/landing/index.html.erb new file mode 100644 index 00000000..fed5c740 --- /dev/null +++ b/app/views/landing/index.html.erb @@ -0,0 +1,35 @@ +
<%= @meeting_url %>
+|
+ Hi Everyone ++ The meeting will be at this URL ++ + + Please join! + |
+