plugin.rb 812 B

1234567891011121314151617181920212223242526272829303132333435
  1. # frozen_string_literal: true
  2. # name: discourse-bbb
  3. # about: Integrate BigBlueButton in Discourse.
  4. # version: 1.0.0
  5. # authors: Penar Musaraj
  6. # url: https://github.com/pmusaraj/discourse-bbb
  7. enabled_site_setting :bbb_enabled
  8. register_svg_icon "fab-bootstrap"
  9. register_svg_icon "video"
  10. after_initialize do
  11. [
  12. "../app/controllers/bbb_client_controller",
  13. ].each { |path| require File.expand_path(path, __FILE__) }
  14. module ::BigBlue
  15. PLUGIN_NAME ||= "discourse-bbb".freeze
  16. class Engine < ::Rails::Engine
  17. engine_name BigBlue::PLUGIN_NAME
  18. isolate_namespace BigBlue
  19. end
  20. end
  21. BigBlue::Engine.routes.draw do
  22. post '/create' => 'bbb_client#create', constraints: { format: :json }
  23. end
  24. Discourse::Application.routes.append do
  25. mount ::BigBlue::Engine, at: "/bbb"
  26. end
  27. end