Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ group :test do
end

gem "activerecord-import"

38 changes: 18 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ GEM
xpath (~> 3.2)
concurrent-ruby (1.3.7)
connection_pool (3.0.2)
crass (1.0.6)
crass (1.0.7)
cucumber (10.2.0)
base64 (~> 0.2)
builder (~> 3.2)
Expand Down Expand Up @@ -237,19 +237,19 @@ GEM
net-protocol
net-ssh (7.3.2)
nio4r (2.7.5)
nokogiri (1.19.3-aarch64-linux-gnu)
nokogiri (1.19.4-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-aarch64-linux-musl)
nokogiri (1.19.4-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.19.3-arm-linux-gnu)
nokogiri (1.19.4-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-arm-linux-musl)
nokogiri (1.19.4-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.19.3-arm64-darwin)
nokogiri (1.19.4-arm64-darwin)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-linux-gnu)
nokogiri (1.19.4-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-linux-musl)
nokogiri (1.19.4-x86_64-linux-musl)
racc (~> 1.4)
ostruct (0.6.3)
parallel (2.1.0)
Expand Down Expand Up @@ -437,7 +437,7 @@ GEM
bindex (>= 0.4.0)
railties (>= 8.0.0)
websocket (1.2.11)
websocket-driver (0.8.1)
websocket-driver (0.8.2)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down Expand Up @@ -518,7 +518,7 @@ CHECKSUMS
capybara (3.40.0) sha256=42dba720578ea1ca65fd7a41d163dd368502c191804558f6e0f71b391054aeef
concurrent-ruby (1.3.7) sha256=4412caec3a5ea2e5fdc52076724c071a81f2c0593d83b2ac8cbb8ca63b3151b0
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d
crass (1.0.7) sha256=94868719948664c89ddcaf0a37c65048413dfcb1c869470a5f7a7ceb5390b295
cucumber (10.2.0) sha256=fdedbd31ecf40858b60f04853f2aa15c44f5c30bbac29c6a227fa1e7005a8158
cucumber-ci-environment (11.0.0) sha256=0df79a9e1d0b015b3d9def680f989200d96fef206f4d19ccf86a338c4f71d1e2
cucumber-core (16.2.0) sha256=592b58a95cf42feef8e5a349f68e363784ba3b6568ffbcf6776e38e136cf970b
Expand Down Expand Up @@ -580,13 +580,13 @@ CHECKSUMS
net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
net-ssh (7.3.2) sha256=65029e213c380e20e5fd92ece663934ab0a0fe888e0cd7cc6a5b664074362dd4
nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
nokogiri (1.19.3-aarch64-linux-gnu) sha256=46b89e5d7b9e844c2ee360794240c6ea2a4e6fa0c5892a4ed487db621224b639
nokogiri (1.19.3-aarch64-linux-musl) sha256=8392dfdcd21be7a94dbbe9ccc138dea01b97b24cb2dc02a114ca98bfb1d9a0b7
nokogiri (1.19.3-arm-linux-gnu) sha256=3919d5ffc334ad778a4a9eb88fda7dcb8b1fb58c8a52ac640c6dcd2f038e774f
nokogiri (1.19.3-arm-linux-musl) sha256=9ce1cb6346bb9c67b1550eb537aa183ead91e4b6eadb2f36ade02d8dd2a79fb6
nokogiri (1.19.3-arm64-darwin) sha256=71b9bd424b1b7abc18b05052a1a3cfd3627abdca62be280854cc411791357e42
nokogiri (1.19.3-x86_64-linux-gnu) sha256=2f5078620fe12e83669b5b17311b32532a8153d02eee7ad06948b926d6080976
nokogiri (1.19.3-x86_64-linux-musl) sha256=248c906d2166eca5efb56d52fdee5f9a1f51d69a72e2b64fdac647b4ce39ea3f
nokogiri (1.19.4-aarch64-linux-gnu) sha256=1269fb644a6de405057a53dd5c762b1209b43ca7424f839454d3dbc677c31a8f
nokogiri (1.19.4-aarch64-linux-musl) sha256=35c65b9ce72b3bb03207bdbe7067915019dc18c1b9b59139684bd6690fdd01af
nokogiri (1.19.4-arm-linux-gnu) sha256=a301313e38bb065d68239e79734bcd6f56fb6efaacebde29e9abf2a4735340ca
nokogiri (1.19.4-arm-linux-musl) sha256=588923c101bcfa78869734d247d25b598674323e7f22474fc468f6e5647311eb
nokogiri (1.19.4-arm64-darwin) sha256=a46db9853286e6597b36ebc6953817d15acf3a299583eb3f89fdc6f91dd63527
nokogiri (1.19.4-x86_64-linux-gnu) sha256=379fae440b28915e3f19d752ce2dcf8465ed2b2fbefd2a7ca0dd497bc981a06a
nokogiri (1.19.4-x86_64-linux-musl) sha256=17dfb7c1fa194ae02fbf7c51a7afc8d278045ab3fdacfd86f91d02d7b274470b
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
Expand Down Expand Up @@ -627,10 +627,8 @@ CHECKSUMS
ruby-vips (2.3.0) sha256=e685ec02c13969912debbd98019e50492e12989282da5f37d05f5471442f5374
rubyzip (3.4.0) sha256=6de39bc9eba302b635a476d16c9e16b0872ad24517c2f98f2b3a7ea23caff57b
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1

selenium-webdriver (4.45.0) sha256=ecac65a4df86ac6f7d707e6dcbacaa9c08b6cf2b966babecfb9653c5aa13e2d1
shoulda-matchers (5.3.0) sha256=f6ba863b8752bb5956aaa73b046d5df5ecfbe9a7acb61f31bf853613e0932f86

solid_cable (4.0.0) sha256=8379680ef6bf36e195eb876a6306ea290f87d5fa10bc4a757bc2a918f83229b5
solid_cache (1.0.10) sha256=bc05a2fb3ac78a6f43cbb5946679cf9db67dd30d22939ededc385cb93e120d41
solid_queue (1.4.0) sha256=e6a18d196f0b27cb6e3c77c5b31258b05fb634f8ed64fb1866ed164047216c2a
Expand Down Expand Up @@ -660,7 +658,7 @@ CHECKSUMS
useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844
web-console (4.3.0) sha256=e13b71301cdfc2093f155b5aa3a622db80b4672d1f2f713119cc7ec7ac6a6da4
websocket (1.2.11) sha256=b7e7a74e2410b5e85c25858b26b3322f29161e300935f70a0e0d3c35e0462737
websocket-driver (0.8.1) sha256=5ab238238ce230e5d4b262d2be39624c867914eab99171dc4952b58b577c2d96
websocket-driver (0.8.2) sha256=97c556b019bf3410b4961002ac501621e9322d3f8a7bc02161a09301cc4c4146
websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241
xpath (3.2.0) sha256=6dfda79d91bb3b949b947ecc5919f042ef2f399b904013eb3ef6d20dd3a4082e
zeitwerk (2.8.2) sha256=7212a61311083c604184b1ea2574b9aa05cd14f855a0841c06985cabe9181d12
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/dashboards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def admin_gerenciamento

# importação do json
def importar_json
# codigo de auxilio
# codigo de auxilio
if params["json"].blank?
puts "ERRO: O parâmetro 'json' veio vazio!"
flash[:error] = "Por favor, selecione um arquivo JSON."
Expand Down Expand Up @@ -47,7 +47,7 @@ def importar_json
redirect_to admin_gerenciamento_dashboard_path
end





Expand Down
5 changes: 2 additions & 3 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
class UserMailer < ApplicationMailer

def primeiro_acesso(usuario)
@usuario = usuario

@url_definir_senha = definir_senha_url(email: @usuario.email)

mail(
to: @usuario.email,
subject: 'Bem-vindo ao CAMAAR! Defina sua senha de acesso'
subject: "Bem-vindo ao CAMAAR! Defina sua senha de acesso"
)
end
end
1 change: 0 additions & 1 deletion app/models/turma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ class Turma < ApplicationRecord
validates :codigo, presence: true
validates :nome, presence: true
end

7 changes: 3 additions & 4 deletions app/services/importer/academic_data_importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def self.import!(upload_file)
raw_docentes << d_user.merge("turma_id" => turma_id)
end
end


unique_discentes = raw_discentes.uniq { |d| d["matricula"] }
unique_docentes = raw_docentes.uniq { |d| d["email"] }
Expand Down Expand Up @@ -69,7 +69,6 @@ def self.import!(upload_file)
password_confirmation: "123456",
primeiro_acesso: false
)

end
User.import users_discente_objects, on_duplicate_key_ignore: true, validate: false

Expand Down Expand Up @@ -104,7 +103,7 @@ def self.import!(upload_file)
primeiro_acesso: false
)
end

User.import users_docente_objects, on_duplicate_key_ignore: true, validate: false
end
# registro de erros
Expand All @@ -118,4 +117,4 @@ def self.import!(upload_file)
true
end
end
end
end
2 changes: 1 addition & 1 deletion app/views/dashboards/admin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Seus testes de criação de downloads entrarão aqui
<ul>
<li>Início</li>
<li><%= link_to "Gerenciamento", templates_path %></li>
<li><%= link_to "Gerenciamento", admin_gerenciamento_dashboard_path %></li>
<li><%= link_to "Turmas", turmas_path %></li>
</ul>
</section>
Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
config.action_mailer.perform_caching = false
# adicionada
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { address: 'localhost', port: 1025 }
config.action_mailer.smtp_settings = { address: "localhost", port: 1025 }
config.action_mailer.raise_delivery_errors = false


Expand Down
2 changes: 1 addition & 1 deletion config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
Rails.application.config.assets.version = "1.0"

# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Rails.application.config.assets.paths << Emoji.images_path
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

get "/admin", to: "dashboards#admin", as: :admin_dashboard
get "/discente", to: "dashboards#discente", as: :discente_dashboard
resources :turmas, only: [:index, :show]
resources :turmas, only: [ :index, :show ]

get "/avaliacao", to: "dashboards#admin_avaliacao", as: :admin_avaliacao_dashboard
get "/gerenciamento", to: "dashboards#admin_gerenciamento", as: :admin_gerenciamento_dashboard
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20260611000003_create_turmas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def change
t.references :departamento, null: false, foreign_key: true
t.string :codigo, null: false
t.string :nome, null: false

t.string :turma
t.string :semestre

Expand Down
67 changes: 27 additions & 40 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading