diff --git a/app/assets/javascripts/site/videos.js b/app/assets/javascripts/site/videos.js index d0162ef..ab60382 100644 --- a/app/assets/javascripts/site/videos.js +++ b/app/assets/javascripts/site/videos.js @@ -8,7 +8,7 @@ function check_subtitle(file) { }; function check_video(file) { - var accepted_file_types = ["ts", "avi", "mp4", "mov", "webm", "wmv", "mkv",]; + var accepted_file_types = ["flv", "ts", "avi", "mp4", "mov", "webm", "wmv", "mkv",]; return check_type(file, accepted_file_types) }; diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index 5d4be52..18951b6 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -1,6 +1,6 @@ # Author - Igor Portela - igorportela.com | Copyright(c) 2013. All rights reserved. class StaticController < ApplicationController - #before_filter :authenticate_user! + before_filter :authenticate_user! def choice end @@ -9,7 +9,7 @@ class StaticController < ApplicationController end def upload - @presenter = Static::IndexPresenter.new if authenticate_user! + @presenter = Static::IndexPresenter.new #if authenticate_user! end @@ -25,6 +25,8 @@ class StaticController < ApplicationController @presenter = Static::IndexPresenter.new(params[:id]) if !@presenter.subtitle.window_size.present? + #raise current_user.inspect + @presenter.subtitle.update_attributes(:window_size => params[:window_size], :window_position => params[:window_position], :closed_caption => params[:closed_caption], :user_id => current_user.id) end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 3812243..cdbfa45 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -116,7 +116,7 @@ Devise.setup do |config| # ==> Configuration for :timeoutable # The time you want to timeout the user session without activity. After this # time the user will be asked for credentials again. Default is 30 minutes. - # config.timeout_in = 30.minutes + config.timeout_in = 2.weeks # ==> Configuration for :lockable # Defines which strategy will be used to lock an account. diff --git a/config/libras@150.165.204.30 b/config/libras@150.165.204.30 new file mode 100644 index 0000000..06437b6 --- /dev/null +++ b/config/libras@150.165.204.30 @@ -0,0 +1,40 @@ +# Author - Igor Portela - igorportela.com | Copyright(c) 2013. All rights reserved. +# +# Author Igor Amorim - www.igoramorim.com +# +worker_processes 2 +APP_PATH = "/home/gtaaas/gtaaas_web/" +working_directory APP_PATH + +# This loads the application in the master process before forking +# worker processes +# Read more about it here: +# http://unicorn.bogomips.org/Unicorn/Configurator.html +preload_app true + +timeout 30 + +# This is where we specify the socket. +# We will point the upstream Nginx module to this socket later on +listen "unix:#{APP_PATH}tmp/sockets/unicorn.sock", :backlog => 64 + +pid "#{APP_PATH}tmp/pids/unicorn.pid" + +# Set the path of the log files inside the log folder of the testapp +stderr_path "#{APP_PATH}log/unicorn.stderr.log" +stdout_path "#{APP_PATH}log/unicorn.stdout.log" + +before_fork do |server, worker| +# This option works in together with preload_app true setting +# What is does is prevent the master process from holding +# the database connection + defined?(ActiveRecord::Base) and + ActiveRecord::Base.connection.disconnect! +end + +after_fork do |server, worker| +# Here we are establishing the connection after forking worker +# processes + defined?(ActiveRecord::Base) and + ActiveRecord::Base.establish_connection +end -- libgit2 0.21.2