diff --git a/Gemfile b/Gemfile index bbf2035ff953b446ccff698e48d40a65c2ad3352..b60365f7d8520effe74d2f1f2ffa1f0f15a7de52 100644 --- a/Gemfile +++ b/Gemfile @@ -11,6 +11,7 @@ gem 'sdoc', '>= 0.4.0', group: :doc # Use ActiveModel has_secure_password gem 'bcrypt', '>= 3.1.7' + # memcached gem 'dalli' @@ -181,4 +182,7 @@ gem 'faraday-net_http_persistent', '~> 2.0' gem 'elasticsearch', '~> 8.6' +gem 'multipart-post', '~> 2.0' + +gem 'faraday-multipart', '~> 1.0', '>= 1.0.4' diff --git a/app/controllers/v1/user_progresses_controller.rb b/app/controllers/v1/user_progresses_controller.rb index 74d28ace71ee04df2d0d69bbf783f2b3b3d49ffc..76076cd2a6f23d11fdd6bb0ee25953c72f63db18 100644 --- a/app/controllers/v1/user_progresses_controller.rb +++ b/app/controllers/v1/user_progresses_controller.rb @@ -30,4 +30,6 @@ class V1::UserProgressesController < ApplicationController render json: all_progresses_paginate end + + end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 07c42396673334385588942ece2395163c1a6696..6748a5d79aca5f348c9683cc88d998ce89942492 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,7 +1,7 @@ class UserMailer < ActionMailer::Base #set the default email sender - default from: 'portalmec_tec@inf.ufpr.br' + default from: 'integrada.contato@mec.gov.br' #function to send email to user when he/she is created through the admin panel def welcome_email (user) @@ -17,7 +17,7 @@ class UserMailer < ActionMailer::Base def users_email_sender (email, subject, body) @body = body - mail(to: email, subject: subject) + mail(from: "integrada.contato@mec.gov.br", to: email, subject: subject) end end diff --git a/app/models/view.rb b/app/models/view.rb index 3aedbb486e8e3f88415367e561475deee1d4b155..f6f56d0519bbf885193d755ec01aa9357adcf151 100644 --- a/app/models/view.rb +++ b/app/models/view.rb @@ -70,4 +70,4 @@ class View < ApplicationRecord user.complete_action(Action.find_by_name("Visualizar uma Coleção")) if viewable_type == "Collection" end end -end +end \ No newline at end of file diff --git a/config/application.rb b/config/application.rb index a045b9cacfc052cd12987fb40426fa71096c4a80..552d3f5ce92635b6964b3a4a67b6b29456d2e7b4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -91,6 +91,7 @@ module Portalmec # api mode config.api_only = true + #TODO fix ugly code when omniauth is fixed # Only loads a smaller set of middleware suitable for API only apps. diff --git a/config/database.yml b/config/database.yml index 4a6887cbb51d15367592a8dcd33505eb999d333e..20ae345b07dcaf8cdb281acd0c434e0c99bb7777 100644 --- a/config/database.yml +++ b/config/database.yml @@ -7,7 +7,7 @@ development: encoding: unicode database: portalmecapi username: postgres - password: luanmatheus + password: 123mudar host: localhost test: @@ -15,7 +15,7 @@ test: encoding: unicode database: portalmecapi username: postgres - password: luanmatheus + password: 123mudar host: localhost production: diff --git a/config/env_vars.sh b/config/env_vars.sh index b140ed10134d1a73ad7217994eafe92c4a5ff7d9..fdef16e8021bf27a1c7d37c08a81bb855b62c31d 100644 --- a/config/env_vars.sh +++ b/config/env_vars.sh @@ -38,7 +38,8 @@ export PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br export PORTALMEC_ELASTICSEARCH_LOGIN=elastic export PORTALMEC_ELASTICSEARCH_PASSWORD=123mudar export PORTALMEC_ELASTICSEARCH_PORT=9200 -export PORTALMEC_ELASTICSEARCH_HOST=localhost +#export PORTALMEC_ELASTICSEARCH_HOST=localhost +export PORTALMEC_ELASTICSEARCH_HOST=elasticsearchupgrade #export PORTALMEC_ELASTICSEARCH_HOST=elasticsearchprod ### Cache diff --git a/config/routes.rb b/config/routes.rb index 5238f976dde673e8cf11aadf773c0abb8f703bd1..39b68f8a56759f8f0b04697fc759ea2c8ecb1ada 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -19,8 +19,8 @@ Rails.application.routes.draw do - # require 'sidekiq/web' - # mount Sidekiq::Web, at: '/sidekiq' + require 'sidekiq/web' + mount Sidekiq::Web, at: '/sidekiq' concern :deletable do collection do diff --git a/config/schedule.rb b/config/schedule.rb index 3ed49087f0b78970280c6c6dbd6c9776aa81d870..5937de491899bb8ab6064e488e8534abe77353e0 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -56,3 +56,7 @@ end every 5.days do rake 'delete_production_log:delete_log' end + +every 1.days, at: '12am' do + rake 'user:restart_streaks' +end \ No newline at end of file diff --git a/env_vars.txt b/env_vars.txt index a4548a9415df69b484496db2b5af58d99f96a147..facd3d5282dea66586ae062fbb8129c7ba018dff 100644 --- a/env_vars.txt +++ b/env_vars.txt @@ -7,8 +7,10 @@ PORTALMEC_DSPACE_LOGIN=admin@mecdb3.c3sl.ufpr.br PORTALMEC_DSPACE_PASSWORD=admin PORTALMEC_DSPACE_PORT=8443 PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br +PORTALMEC_ELASTICSEARCH_LOGIN=elastic +PORTALMEC_ELASTICSEARCH_PASSWORD=123mudar PORTALMEC_ELASTICSEARCH_PORT=9200 -PORTALMEC_ELASTICSEARCH_HOST=localhost +PORTALMEC_ELASTICSEARCH_HOST=elasticsearchupgrade MEMCACHE_SERVERS=localhost ACTION_MAILER_HOST=api.portalmectest.c3sl.ufpr.br SMTP_ADDRESS=urquell.c3sl.ufpr.br diff --git a/lib/tasks/email_sender.rake b/lib/tasks/email_sender.rake index 40ad9cdab165a789226558dbaeb5928be107e5fc..4a3bec31a38602c50551bcf3109d8c729760c032 100644 --- a/lib/tasks/email_sender.rake +++ b/lib/tasks/email_sender.rake @@ -5,4 +5,4 @@ namespace :email_users do UserMailer.users_email_sender(@user).deliver_now end -end \ No newline at end of file +end