Skip to content

Commit

Permalink
Actualiza
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Jan 5, 2025
1 parent 82d7c11 commit 154f532
Show file tree
Hide file tree
Showing 44 changed files with 200 additions and 178 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ gem "will_paginate" # Pagina listados
# lógico y no alfabetico como las gemas anteriores)

gem "msip", # Motor generico
git: 'https://gitlab.com/pasosdeJesus/msip.git', branch: 'main'
#path: "../msip"
git: "https://gitlab.com/pasosdeJesus/msip.git",
branch: "main"
# path: "../msip"

group :development do
gem "puma"
Expand Down
182 changes: 92 additions & 90 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: d2e9f711f4b4bf8b8a7f33a14d3045d8e0bd18fc
revision: 08d275ebea019da674b2b4e049bd4890784de702
branch: main
specs:
msip (2.3.0.alfa3)
Expand Down Expand Up @@ -39,29 +39,29 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actioncable (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
actioncable (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.2.2)
actionpack (= 7.2.2)
activejob (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
actionmailbox (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
actionmailer (7.2.2)
actionpack (= 7.2.2)
actionview (= 7.2.2)
activejob (= 7.2.2)
activesupport (= 7.2.2)
actionmailer (7.2.2.1)
actionpack (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activesupport (= 7.2.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.2.2)
actionview (= 7.2.2)
activesupport (= 7.2.2)
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
Expand All @@ -70,35 +70,35 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actiontext (7.2.2)
actionpack (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
actiontext (7.2.2.1)
actionpack (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.2.2)
activesupport (= 7.2.2)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.2.2)
activesupport (= 7.2.2)
activejob (7.2.2.1)
activesupport (= 7.2.2.1)
globalid (>= 0.3.6)
activemodel (7.2.2)
activesupport (= 7.2.2)
activerecord (7.2.2)
activemodel (= 7.2.2)
activesupport (= 7.2.2)
activemodel (7.2.2.1)
activesupport (= 7.2.2.1)
activerecord (7.2.2.1)
activemodel (= 7.2.2.1)
activesupport (= 7.2.2.1)
timeout (>= 0.4.0)
activestorage (7.2.2)
actionpack (= 7.2.2)
activejob (= 7.2.2)
activerecord (= 7.2.2)
activesupport (= 7.2.2)
activestorage (7.2.2.1)
actionpack (= 7.2.2.1)
activejob (= 7.2.2.1)
activerecord (= 7.2.2.1)
activesupport (= 7.2.2.1)
marcel (~> 1.0)
activesupport (7.2.2)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -114,7 +114,7 @@ GEM
base64 (0.2.0)
bcrypt (3.1.20)
benchmark (0.4.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
bindex (0.8.1)
bootsnap (1.18.4)
msgpack (~> 1.2)
Expand Down Expand Up @@ -148,37 +148,37 @@ GEM
devise-i18n (1.12.1)
devise (>= 4.9.0)
docile (1.4.1)
dotenv (3.1.4)
dotenv-rails (3.1.4)
dotenv (= 3.1.4)
dotenv (3.1.7)
dotenv-rails (3.1.7)
dotenv (= 3.1.7)
railties (>= 6.1)
drb (2.2.1)
erubi (1.13.0)
ffi (1.17.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
erubi (1.13.1)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm-linux-gnu)
ffi (1.17.1-arm-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86-linux-gnu)
ffi (1.17.1-x86-linux-musl)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
globalid (1.2.1)
activesupport (>= 6.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
irb (1.14.1)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jsbundling-rails (1.3.1)
railties (>= 6.0.0)
json (2.9.0)
json (2.9.1)
language_server-protocol (3.17.0.3)
logger (1.6.2)
loofah (2.23.1)
logger (1.6.4)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
Expand All @@ -195,7 +195,7 @@ GEM
mini_portile2 (2.8.8)
minitest (5.25.4)
msgpack (1.7.5)
net-imap (0.5.1)
net-imap (0.5.5)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -230,33 +230,34 @@ GEM
ast (~> 2.4.1)
racc
pg (1.5.9)
psych (5.2.1)
psych (5.2.2)
date
stringio
puma (6.5.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (3.1.8)
rack-session (2.0.0)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack-test (2.2.0)
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails (7.2.2)
actioncable (= 7.2.2)
actionmailbox (= 7.2.2)
actionmailer (= 7.2.2)
actionpack (= 7.2.2)
actiontext (= 7.2.2)
actionview (= 7.2.2)
activejob (= 7.2.2)
activemodel (= 7.2.2)
activerecord (= 7.2.2)
activestorage (= 7.2.2)
activesupport (= 7.2.2)
rails (7.2.2.1)
actioncable (= 7.2.2.1)
actionmailbox (= 7.2.2.1)
actionmailer (= 7.2.2.1)
actionpack (= 7.2.2.1)
actiontext (= 7.2.2.1)
actionview (= 7.2.2.1)
activejob (= 7.2.2.1)
activemodel (= 7.2.2.1)
activerecord (= 7.2.2.1)
activestorage (= 7.2.2.1)
activesupport (= 7.2.2.1)
bundler (>= 1.15.0)
railties (= 7.2.2)
railties (= 7.2.2.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -270,33 +271,33 @@ GEM
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.6.1)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
railties (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
rake (13.2.1)
rdoc (6.8.1)
rdoc (6.10.0)
psych (>= 4.0.0)
redcarpet (3.6.0)
regexp_parser (2.9.3)
reline (0.5.12)
regexp_parser (2.10.0)
reline (0.6.0)
io-console (~> 0.5)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.9)
rubocop (1.69.1)
rexml (3.4.0)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -306,7 +307,7 @@ GEM
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-minitest (0.36.0)
rubocop (>= 1.61, < 2.0)
Expand All @@ -329,7 +330,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
securerandom (0.4.0)
securerandom (0.4.1)
simple_form (5.3.1)
actionpack (>= 5.2)
activemodel (>= 5.2)
Expand All @@ -353,8 +354,8 @@ GEM
terrapin (1.0.1)
climate_control
thor (1.3.2)
tilt (2.4.0)
timeout (0.4.2)
tilt (2.5.0)
timeout (0.4.3)
turbo-rails (1.5.0)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
Expand All @@ -365,7 +366,7 @@ GEM
tzinfo
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (3.1.2)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
useragent (0.16.11)
Expand All @@ -376,7 +377,8 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
websocket-driver (0.7.6)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.1)
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
all: sintaxis-js sintaxis-ruby bundler-audit brakeman rubocop

sintaxis-js:
for i in `find app/assets/javascripts/ -name "*js" -or -name "*es6"`; do \
node -c $$i; \
done
for i in `find app/assets/javascripts/ -name "*coffee"`; do \
coffee -o /tmp/ $$i; \
done
for i in `find app/assets/javascripts/ -name "*js"`; do \
node -c $$i; \
done # Falta es6

sintaxis-ruby:
find . -name "*\.rb" -exec ruby -w -W2 -c {} ';'
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require "bundler/setup"

APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
Expand Down
13 changes: 6 additions & 7 deletions app/helpers/mr519_gen/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ def nombre_a_nombreinterno(nombre)
module_function :nombre_a_nombreinterno

# resps es una serie de registros con asociación respuestafor a
# Mr519::Respuestafor para una
# mismo formulario
# Mr519::Respuestafor para un mismo formulario
def analiza_respuestas(respuestafor_ids, titulo, consolidado, _menserr)
resps = Mr519Gen::Respuestafor.where(id: respuestafor_ids)
if resps.count == 0
menserr = "No hay encuestas respondidas"
_menserr << "No hay encuestas respondidas"
return false
end
titulo << "Resultados de encuesta: " +
Expand Down Expand Up @@ -156,11 +155,11 @@ def analiza_respuestas(respuestafor_ids, titulo, consolidado, _menserr)
# Dado un objeto que puede tener varios respuestafor y un formulario_id
# y un campo_id retorna el valor del campo en el formulario o nil
def presenta_valor(objeto, formulario_id, campo_id)
rf = objeto.respuestafor.where(formulario_id: formulario_id).take
return nil unless rf
rf = objeto.respuestafor.find_by(formulario_id: formulario_id)
return unless rf

vc = rf.valorcampo.where(campo_id: campo_id).take
return nil unless vc
vc = rf.valorcampo.find_by(campo_id: campo_id)
return unless vc

vc.presenta_valor(false)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/mr519_gen/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def initialize_mr519_gen(usuario = nil)
end
end # def initialize_jn316_gen
end # class
end # module
end # module
Loading

0 comments on commit 154f532

Please sign in to comment.