forked from External/greenlight
adhere to rubocop guidelines
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'boot'
|
||||
|
||||
require 'rails/all'
|
||||
@ -13,12 +15,16 @@ module Greenlight
|
||||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
||||
# Use custom error routes.
|
||||
config.exceptions_app = self.routes
|
||||
config.exceptions_app = routes
|
||||
|
||||
config.loadbalanced_configuration = (ENV["USE_LOADBALANCED_CONFIGURATION"] == "true")
|
||||
|
||||
# Setup BigBlueButton configuration.
|
||||
unless config.loadbalanced_configuration
|
||||
if config.loadbalanced_configuration
|
||||
# Fetch credentials from a loadbalancer based on provider.
|
||||
config.loadbalancer_endpoint = ENV["LOADBALANCER_ENDPOINT"]
|
||||
config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"]
|
||||
else
|
||||
# Default credentials (test-install.blindsidenetworks.com/bigbluebutton).
|
||||
config.bigbluebutton_endpoint_default = "http://test-install.blindsidenetworks.com/bigbluebutton/api/"
|
||||
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
|
||||
@ -35,10 +41,6 @@ module Greenlight
|
||||
|
||||
# Fix endpoint format if required.
|
||||
config.bigbluebutton_endpoint += "api/" unless config.bigbluebutton_endpoint.ends_with?('api/')
|
||||
else
|
||||
# Fetch credentials from a loadbalancer based on provider.
|
||||
config.loadbalancer_endpoint = ENV["LOADBALANCER_ENDPOINT"]
|
||||
config.loadbalancer_secret = ENV["LOADBALANCER_SECRET"]
|
||||
end
|
||||
|
||||
# Determine if GreenLight should allow non-omniauth signup/login.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||
|
||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Load the Rails application.
|
||||
require_relative 'application'
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
@ -18,7 +20,7 @@ Rails.application.configure do
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => 'public, max-age=172800'
|
||||
'Cache-Control' => 'public, max-age=172800',
|
||||
}
|
||||
else
|
||||
config.action_controller.perform_caching = false
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
@ -47,7 +49,7 @@ Rails.application.configure do
|
||||
config.log_level = :debug
|
||||
|
||||
# Prepend all log lines with the following tags.
|
||||
config.log_tags = [ :request_id ]
|
||||
config.log_tags = [:request_id]
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
@ -85,9 +87,6 @@ Rails.application.configure do
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
# Set the relative url root for deployment to a subdirectory.
|
||||
if ENV['RELATIVE_URL_ROOT'].present?
|
||||
config.relative_url_root = ENV['RELATIVE_URL_ROOT']
|
||||
else
|
||||
config.relative_url_root = "/"
|
||||
end
|
||||
config.relative_url_root = "/"
|
||||
config.relative_url_root = ENV['RELATIVE_URL_ROOT'] if ENV['RELATIVE_URL_ROOT'].present?
|
||||
end
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
||||
@ -15,7 +17,7 @@ Rails.application.configure do
|
||||
# Configure public file server for tests with Cache-Control for performance.
|
||||
config.public_file_server.enabled = true
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => 'public, max-age=3600'
|
||||
'Cache-Control' => 'public, max-age=3600',
|
||||
}
|
||||
|
||||
# Show full error reports and disable caching.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# ActiveSupport::Reloader.to_prepare do
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Version of your assets, change this if you want to expire all your assets.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Specify a serializer for the signed and encrypted cookie jars.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Send a request to check if the HTML5 client is enabled on the BigBlueButton server.
|
||||
uri = URI.parse(Rails.configuration.bigbluebutton_endpoint.gsub('bigbluebutton/api', 'html5client/check'))
|
||||
res = Net::HTTP.get_response(uri)
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format. Inflections
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
#
|
||||
# This file contains migration options to ease your Rails 5.0 upgrade.
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# List of supported Omniauth providers.
|
||||
Rails.application.config.providers = [:google, :twitter]
|
||||
|
||||
@ -10,8 +12,8 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
||||
provider :twitter, ENV['TWITTER_ID'], ENV['TWITTER_SECRET']
|
||||
|
||||
provider :google_oauth2, ENV['GOOGLE_OAUTH2_ID'], ENV['GOOGLE_OAUTH2_SECRET'],
|
||||
scope: ['profile', 'email'],
|
||||
scope: %w(profile email),
|
||||
access_type: 'online',
|
||||
name: 'google',
|
||||
hd: ENV['GOOGLE_OAUTH2_HD'].blank? ? nil : ENV['GOOGLE_OAUTH2_HD']
|
||||
end
|
||||
end
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
Rails.application.config.session_store :cookie_store, key: '_greenlight-2_0_session'
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Load terms and conditions.
|
||||
|
||||
terms = "#{Rails.root}/config/terms.txt"
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# This file contains settings for ActionController::ParamsWrapper which
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Puma can serve each request in a thread from an internal thread pool.
|
||||
# The `threads` method setting takes two numbers a minimum and maximum.
|
||||
# Any libraries that use thread pools should be configured to match
|
||||
|
@ -1,5 +1,6 @@
|
||||
Rails.application.routes.draw do
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.routes.draw do
|
||||
# Error routes.
|
||||
match '/404', to: 'errors#not_found', via: :all
|
||||
match '/422', to: 'errors#unprocessable', via: :all
|
||||
@ -15,7 +16,7 @@ Rails.application.routes.draw do
|
||||
|
||||
# Handles login of greenlight provider accounts.
|
||||
post '/login', to: 'sessions#create', as: :create_session
|
||||
|
||||
|
||||
# Log the user out of the session.
|
||||
get '/logout', to: 'sessions#destroy'
|
||||
|
||||
@ -39,7 +40,7 @@ Rails.application.routes.draw do
|
||||
post '/start', to: 'rooms#start', as: :start_room
|
||||
get '/logout', to: 'rooms#logout', as: :logout_room
|
||||
post '/home', to: 'rooms#home', as: :make_home
|
||||
|
||||
|
||||
# Mange recordings.
|
||||
scope '/:record_id' do
|
||||
post '/', to: 'rooms#update_recording', as: :update_recording
|
||||
|
@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
%w(
|
||||
.ruby-version
|
||||
.rbenv-vars
|
||||
|
Reference in New Issue
Block a user