Skip to content

Commit

Permalink
Merge branch 'bugfixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoFelipe committed Aug 15, 2024
2 parents 52cd26d + 9401c89 commit 3b120db
Show file tree
Hide file tree
Showing 16 changed files with 301 additions and 188 deletions.
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ gem "sprockets-rails"
gem "puma", ">= 6.4.2"

# HTML and XML parser
gem "nokogiri", ">= 1.16.2"
gem "nokogiri", ">= 1.16.5"

#Wrapp HTTP requests and responses
# Wrapp HTTP requests and responses
gem "rack", "~> 2.2.8.1"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
Expand Down Expand Up @@ -94,7 +94,7 @@ gem "matrix", "~> 0.4.2"
gem "redcarpet"

# Active scaffold support for newer Rails
gem "active_scaffold", git: "https://github.com/activescaffold/active_scaffold.git"
gem "active_scaffold", git: "https://github.com/activescaffold/active_scaffold.git", ref: "7a61ff721e4ee68ac9dc5ce65128f63b067a4d7d"
gem "active_scaffold_duplicate", ">= 1.1.0"
gem "recordselect"

Expand All @@ -115,14 +115,14 @@ gem "carrierwave-activerecord", git: "https://github.com/gems-uff/carrierwave-ac
gem "cocoon"

# ReCaptcha Helpers
gem "dotenv-rails", require: "dotenv/rails-now"
gem "dotenv-rails", require: "dotenv/load"
gem "recaptcha", require: "recaptcha/rails"

# xlsx Spreadsheets
gem "rubyzip"
gem "caxlsx"
gem "caxlsx_rails"
#gem "acts_as_xlsx"
# gem "acts_as_xlsx"

# Temporary fix of warnings
# In the beggining of rails command executions, it shows some warnings related to these gems
Expand Down Expand Up @@ -150,7 +150,7 @@ end

group :development, :test do
# Use SQLite database for development
gem "sqlite3"
gem "sqlite3", "~> 1.6.8"

# Prints Ruby object in full color
gem "awesome_print"
Expand Down
137 changes: 70 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GIT
remote: https://github.com/activescaffold/active_scaffold.git
revision: 7a61ff721e4ee68ac9dc5ce65128f63b067a4d7d
ref: 7a61ff721e4ee68ac9dc5ce65128f63b067a4d7d
specs:
active_scaffold (3.6.99)
cow_proxy (~> 0.3)
Expand Down Expand Up @@ -28,76 +29,76 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
actioncable (7.0.8.4)
actionpack (= 7.0.8.4)
activesupport (= 7.0.8.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
actionmailbox (7.0.8.4)
actionpack (= 7.0.8.4)
activejob (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.1)
actionpack (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activesupport (= 7.0.8.1)
actionmailer (7.0.8.4)
actionpack (= 7.0.8.4)
actionview (= 7.0.8.4)
activejob (= 7.0.8.4)
activesupport (= 7.0.8.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.1)
actionview (= 7.0.8.1)
activesupport (= 7.0.8.1)
actionpack (7.0.8.4)
actionview (= 7.0.8.4)
activesupport (= 7.0.8.4)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.1)
actionpack (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
actiontext (7.0.8.4)
actionpack (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.1)
activesupport (= 7.0.8.1)
actionview (7.0.8.4)
activesupport (= 7.0.8.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_scaffold_duplicate (1.1.4)
active_scaffold (>= 3.6.0.pre)
activejob (7.0.8.1)
activesupport (= 7.0.8.1)
activejob (7.0.8.4)
activesupport (= 7.0.8.4)
globalid (>= 0.3.6)
activemodel (7.0.8.1)
activesupport (= 7.0.8.1)
activerecord (7.0.8.1)
activemodel (= 7.0.8.1)
activesupport (= 7.0.8.1)
activemodel (7.0.8.4)
activesupport (= 7.0.8.4)
activerecord (7.0.8.4)
activemodel (= 7.0.8.4)
activesupport (= 7.0.8.4)
activerecord-session_store (2.1.0)
actionpack (>= 6.1)
activerecord (>= 6.1)
cgi (>= 0.3.6)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.0.8.1)
actionpack (= 7.0.8.1)
activejob (= 7.0.8.1)
activerecord (= 7.0.8.1)
activesupport (= 7.0.8.1)
activestorage (7.0.8.4)
actionpack (= 7.0.8.4)
activejob (= 7.0.8.4)
activerecord (= 7.0.8.4)
activesupport (= 7.0.8.4)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.1)
activesupport (7.0.8.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -116,7 +117,7 @@ GEM
debug_inspector (>= 0.0.1)
bootsnap (1.17.0)
msgpack (~> 1.2)
builder (3.2.4)
builder (3.3.0)
cancancan (3.5.0)
capybara (3.39.2)
addressable
Expand Down Expand Up @@ -153,7 +154,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.3.3)
cow_proxy (0.3.3)
crass (1.0.6)
database_cleaner-active_record (2.1.0)
Expand All @@ -180,7 +181,7 @@ GEM
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
railties (>= 3.2)
erubi (1.12.0)
erubi (1.13.0)
et-orbi (1.2.7)
tzinfo
exception_notification (4.5.0)
Expand All @@ -202,7 +203,7 @@ GEM
globalid (1.2.1)
activesupport (>= 6.1)
htmlentities (4.3.4)
i18n (1.14.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
image_processing (1.12.2)
Expand Down Expand Up @@ -242,21 +243,21 @@ GEM
letter_opener (~> 1.7)
railties (>= 5.2)
rexml
loofah (2.21.4)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.2)
marcel (1.0.4)
matrix (0.4.2)
method_source (1.0.0)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
mini_portile2 (2.8.7)
minitest (5.24.1)
msgpack (1.7.2)
multi_json (1.15.0)
mysql2 (0.5.5)
Expand All @@ -272,10 +273,10 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.16.2)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.2-x86-mingw32)
nokogiri (1.16.6-x86-mingw32)
racc (~> 1.4)
orm_adapter (0.5.0)
paper_trail (15.1.0)
Expand Down Expand Up @@ -304,24 +305,24 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.7.3)
racc (1.8.0)
rack (2.2.8.1)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8.1)
actioncable (= 7.0.8.1)
actionmailbox (= 7.0.8.1)
actionmailer (= 7.0.8.1)
actionpack (= 7.0.8.1)
actiontext (= 7.0.8.1)
actionview (= 7.0.8.1)
activejob (= 7.0.8.1)
activemodel (= 7.0.8.1)
activerecord (= 7.0.8.1)
activestorage (= 7.0.8.1)
activesupport (= 7.0.8.1)
rails (7.0.8.4)
actioncable (= 7.0.8.4)
actionmailbox (= 7.0.8.4)
actionmailer (= 7.0.8.4)
actionpack (= 7.0.8.4)
actiontext (= 7.0.8.4)
actionview (= 7.0.8.4)
activejob (= 7.0.8.4)
activemodel (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
bundler (>= 1.15.0)
railties (= 7.0.8.1)
railties (= 7.0.8.4)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -334,9 +335,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8.1)
actionpack (= 7.0.8.1)
activesupport (= 7.0.8.1)
railties (7.0.8.4)
actionpack (= 7.0.8.4)
activesupport (= 7.0.8.4)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -357,7 +358,8 @@ GEM
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
rexml (3.3.2)
strscan
rouge (4.2.0)
rspec-collection_matchers (1.2.1)
rspec-expectations (>= 2.99.0.beta1)
Expand Down Expand Up @@ -455,6 +457,7 @@ GEM
mini_portile2 (~> 2.8.0)
ssrf_filter (1.1.2)
stringio (3.0.8)
strscan (3.1.0)
thor (1.3.0)
tilt (2.3.0)
timeliness (0.4.5)
Expand Down Expand Up @@ -522,7 +525,7 @@ DEPENDENCIES
net-http
net-imap
net-smtp
nokogiri (>= 1.16.2)
nokogiri (>= 1.16.5)
paper_trail
prawn
prawn-rails
Expand All @@ -549,7 +552,7 @@ DEPENDENCIES
simple-navigation
simplecov
sprockets-rails
sqlite3
sqlite3 (~> 1.6.8)
stringio
tzinfo-data
validates_timeliness (~> 7.0.0.beta1)
Expand Down
1 change: 0 additions & 1 deletion app/controllers/professors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class ProfessorsController < ApplicationController
config.columns[:professor_research_areas].includes = {
research_areas: :professor_research_areas
}
config.columns[:identity_issuing_place].form_ui = ""
config.columns[:identity_expedition_date].form_ui = :date_picker
config.columns[:identity_expedition_date].options = {
data: CustomVariable.past_calendar_range
Expand Down
1 change: 0 additions & 1 deletion app/controllers/students_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class StudentsController < ApplicationController
config.columns[:birth_state].form_ui = :hidden
config.columns[:birth_country].form_ui = :hidden
config.columns[:city].form_ui = :select
config.columns[:identity_issuing_place].form_ui = ""

config.columns[:sex].form_ui = :select
config.columns[:sex].options = {
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/admissions/admission_applications_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def mapping_search_column(record, options)
end

def options_for_association_conditions(association, record)
result = enrollment_options_for_association_conditions(association, record)
result = custom_enrollment_options_for_association_conditions(association, record)
return result if result != "<not found>"
super
end
Expand Down
17 changes: 4 additions & 13 deletions app/helpers/class_schedules_pdf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,13 @@ def class_schedule_table(pdf, options = {})
end
table_width << (520 - day_width * count)

count = 0
rows_per_page = 15
num_pages = (table[:data].size.to_f / rows_per_page).ceil

table[:data].each_slice(rows_per_page) do |data_slice|
count += 1
last_page = (num_pages == count)
class_schedule_print_table(
pdf, table_width, table[:header], data_slice, table[:star], last_page
)
pdf.start_new_page unless last_page
end
class_schedule_print_table(
pdf, table_width, table[:header], table[:data], table[:star], true
)
end

def class_schedule_print_table(pdf, table_width, header, data, star, footer)
simple_pdf_table(pdf, table_width, header, data) do |table|
simple_pdf_table(pdf, table_width, header, data, {}, true) do |table|
table.column(0).align = :left
table.column(0).valign = :center
table.column(0).padding = [-2, 4, 2, 4]
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/concerns/enrollment_helper_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def custom_level_form_column(record, options)
end

# TODO: remove current accomplishments and current deferral_type if level was changed
def enrollment_options_for_association_conditions(association, record)
def custom_enrollment_options_for_association_conditions(association, record)
if association.name == :phase
Phase.find_all_for_enrollment(record.enrollment)
elsif association.name == :deferral_type
Expand Down
Loading

0 comments on commit 3b120db

Please sign in to comment.