From 3bb0c26f33a527043514a74ee6919f815ed94474 Mon Sep 17 00:00:00 2001 From: bruckwubete Date: Wed, 4 Jul 2018 15:20:21 -0400 Subject: [PATCH] clean up for PR --- Dockerfile | 3 ++- Gemfile | 2 +- Gemfile.lock | 3 +-- app/controllers/application_controller.rb | 1 - app/controllers/main_controller.rb | 7 +------ 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d3cc9dc..65f890de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs # Set an environment variable for the install location. ENV RAILS_ROOT /usr/src/app -RUN bundle config github.com 0e54e86c4228294d867a0831bff53f95a31d4af2:x-oauth-basic +#Add token for private gems +RUN bundle config github.com ENV['GITHUB_TOKEN'] # Make the directory and set as working. RUN mkdir -p $RAILS_ROOT diff --git a/Gemfile b/Gemfile index 41da0368..b70263a9 100644 --- a/Gemfile +++ b/Gemfile @@ -64,7 +64,7 @@ gem 'rubocop', require: false group :production do # Use a postgres database in production. gem 'pg', '~> 0.18' - gem "omniauth-bn-launcher", git: "https://github.com/blindsidenetworks/omniauth-bn-launcher.git", branch: "oauth2" + gem "omniauth-bn-launcher", git: "https://github.com/blindsidenetworks/omniauth-bn-launcher.git" end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 3646df04..70b54cc4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,6 @@ GIT remote: https://github.com/blindsidenetworks/omniauth-bn-launcher.git - revision: d93b9fa51f920c733618ec4040c93458ff19951f - branch: oauth2 + revision: c272a928c41966ec3f43d841e372838be0465a8d specs: omniauth-bn-launcher (0.1.0) omniauth (~> 1.3, >= 1.3.2) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1b90905b..0f07f83b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -6,7 +6,6 @@ class ApplicationController < ActionController::Base include SessionsHelper protect_from_forgery with: :exception - skip_before_filter :verify_authenticity_token MEETING_NAME_LIMIT = 90 USER_NAME_LIMIT = 30 diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index b34b6f70..2fd4ff33 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -5,12 +5,7 @@ class MainController < ApplicationController # GET / def index - if current_user - # Redirect authenticated users to their room. - redirect_to room_path(current_user.main_room) - else - # Redirect unauthenticated users to root. - #TODO use env? for launcher login endpoint + if Rails.env.production? && !current_user redirect_to "#{Rails.configuration.relative_url_root}/auth/bn_launcher" end end