pg_rails 7.0.1 → 7.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -4
  3. data/pg_associable/app/assets/css/pg_associable.scss +99 -0
  4. data/pg_associable/app/assets/js/asociable_controller.js +59 -0
  5. data/pg_associable/app/assets/js/asociable_inline_controller.js +141 -0
  6. data/pg_associable/app/assets/js/modal_controller.js +130 -0
  7. data/pg_associable/app/helpers/pg_associable/form_builder_methods.rb +31 -0
  8. data/pg_associable/app/helpers/pg_associable/helpers.rb +19 -0
  9. data/pg_associable/app/inputs/pg_associable/pg_associable_inline_input.rb +39 -0
  10. data/pg_associable/app/inputs/pg_associable/pg_associable_input.rb +41 -0
  11. data/pg_associable/app/views/pg_associable/_resultados.html.slim +9 -0
  12. data/pg_associable/app/views/pg_associable/_resultados_inline.html.slim +12 -0
  13. data/pg_associable/app/views/pg_engine/base/_pg_associable_modal.html.slim +39 -0
  14. data/pg_associable/index.js +7 -0
  15. data/pg_associable/lib/pg_associable/engine.rb +12 -0
  16. data/pg_associable/lib/pg_associable/simple_form_initializer.rb +34 -0
  17. data/pg_associable/lib/pg_associable.rb +5 -0
  18. data/{lib/tasks/pg_rails_tasks.rake → pg_associable/lib/tasks/pg_associable_tasks.rake} +1 -2
  19. data/pg_engine/app/assets/stylesheets/pg_rails_b5.scss +74 -0
  20. data/pg_engine/app/controllers/pg_engine/base_controller.rb +365 -0
  21. data/pg_engine/app/controllers/pg_engine/devise_controller.rb +9 -0
  22. data/pg_engine/app/controllers/pg_engine/signed_in_controller.rb +7 -0
  23. data/{app/decorators/pg_rails → pg_engine/app/decorators/pg_engine}/base_decorator.rb +21 -23
  24. data/pg_engine/app/helpers/pg_engine/flash_helper.rb +26 -0
  25. data/pg_engine/app/helpers/pg_engine/form_helper.rb +33 -0
  26. data/pg_engine/app/helpers/pg_engine/index_helper.rb +42 -0
  27. data/{app/helpers/pg_rails → pg_engine/app/helpers/pg_engine}/postgres_helper.rb +1 -1
  28. data/{app/helpers/pg_rails → pg_engine/app/helpers/pg_engine}/print_helper.rb +15 -31
  29. data/pg_engine/app/helpers/pg_engine/route_helper.rb +41 -0
  30. data/pg_engine/app/inputs/pg_engine/fecha_input.rb +20 -0
  31. data/{app/lib/pg_rails → pg_engine/app/lib/pg_engine}/filtros_builder.rb +16 -17
  32. data/pg_engine/app/lib/pg_form_builder.rb +22 -0
  33. data/pg_engine/app/models/pg_engine/base_record.rb +63 -0
  34. data/{app/policies/pg_rails → pg_engine/app/policies/pg_engine}/application_policy.rb +2 -2
  35. data/pg_engine/app/views/pg_engine/base/download.xlsx.axlsx +14 -0
  36. data/pg_engine/app/views/pg_engine/base/index.html.slim +51 -0
  37. data/pg_engine/config/locales/es.yml +48 -0
  38. data/pg_engine/config/simple_form/simple_form.rb +178 -0
  39. data/pg_engine/config/simple_form/simple_form_bootstrap.rb +371 -0
  40. data/{lib/pg_rails → pg_engine/lib/pg_engine}/configuracion.rb +3 -1
  41. data/pg_engine/lib/pg_engine/engine.rb +53 -0
  42. data/{lib/pg_rails → pg_engine/lib/pg_engine}/utils/logueador.rb +8 -1
  43. data/pg_engine/lib/pg_engine.rb +35 -0
  44. data/{lib → pg_engine/lib}/tasks/auto_anotar_modelos.rake +1 -1
  45. data/pg_engine/lib/templates/activeadmin/audits.rb +53 -0
  46. data/pg_engine/lib/templates/activeadmin/users.rb +54 -0
  47. data/pg_layout/app/assets/stylesheets/sidebar.scss +106 -0
  48. data/pg_layout/app/javascript/cookies.js +23 -0
  49. data/pg_layout/app/javascript/navbar_controller.js +10 -0
  50. data/pg_layout/app/lib/navbar.rb +61 -0
  51. data/pg_layout/app/views/devise/confirmations/new.html.erb +20 -0
  52. data/pg_layout/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  53. data/pg_layout/app/views/devise/mailer/email_changed.html.erb +7 -0
  54. data/pg_layout/app/views/devise/mailer/password_change.html.erb +3 -0
  55. data/pg_layout/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  56. data/pg_layout/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  57. data/pg_layout/app/views/devise/passwords/edit.html.erb +27 -0
  58. data/pg_layout/app/views/devise/passwords/new.html.erb +18 -0
  59. data/pg_layout/app/views/devise/registrations/edit.html.erb +35 -0
  60. data/pg_layout/app/views/devise/registrations/new.html.erb +25 -0
  61. data/pg_layout/app/views/devise/sessions/new.html.erb +20 -0
  62. data/pg_layout/app/views/devise/shared/_error_messages.html.erb +15 -0
  63. data/pg_layout/app/views/devise/shared/_links.html.erb +25 -0
  64. data/pg_layout/app/views/devise/unlocks/new.html.erb +19 -0
  65. data/pg_layout/app/views/kaminari/_first_page.html.slim +3 -0
  66. data/pg_layout/app/views/kaminari/_gap.html.slim +2 -0
  67. data/pg_layout/app/views/kaminari/_last_page.html.slim +3 -0
  68. data/pg_layout/app/views/kaminari/_next_page.html.slim +3 -0
  69. data/pg_layout/app/views/kaminari/_page.html.slim +6 -0
  70. data/pg_layout/app/views/kaminari/_paginator.html.slim +12 -0
  71. data/pg_layout/app/views/kaminari/_prev_page.html.slim +3 -0
  72. data/pg_layout/app/views/layouts/pg_layout/devise.html.slim +24 -0
  73. data/pg_layout/app/views/layouts/pg_layout/layout.html.slim +30 -0
  74. data/pg_layout/app/views/pg_layout/_flash.html.slim +10 -0
  75. data/pg_layout/app/views/pg_layout/_navbar.html.erb +43 -0
  76. data/pg_layout/app/views/pg_layout/_sidebar.html.erb +42 -0
  77. data/pg_layout/index.js +35 -0
  78. data/pg_layout/lib/pg_layout/engine.rb +7 -0
  79. data/pg_layout/lib/pg_layout.rb +9 -0
  80. data/pg_rails/js/index.js +2 -0
  81. data/pg_rails/lib/pg_rails.rb +7 -0
  82. data/{lib/pg_rails → pg_rails/lib}/version.rb +1 -1
  83. data/pg_rails/scss/pg_rails.scss +3 -0
  84. data/pg_scaffold/lib/generators/pg_active_record/model/model_generator.rb +34 -0
  85. data/pg_scaffold/lib/generators/pg_active_record/model/templates/admin.rb +19 -0
  86. data/pg_scaffold/lib/generators/pg_active_record/model/templates/create_table_migration.rb.tt +46 -0
  87. data/pg_scaffold/lib/generators/pg_active_record/model/templates/migration.rb.tt +48 -0
  88. data/pg_scaffold/lib/generators/pg_active_record/model/templates/model.rb +47 -0
  89. data/pg_scaffold/lib/generators/pg_active_record/model/templates/module.rb +9 -0
  90. data/pg_scaffold/lib/generators/pg_decorator/USAGE +8 -0
  91. data/pg_scaffold/lib/generators/pg_decorator/pg_decorator_generator.rb +31 -0
  92. data/pg_scaffold/lib/generators/pg_decorator/templates/decorator.rb +22 -0
  93. data/pg_scaffold/lib/generators/pg_factory_bot/model/model_generator.rb +95 -0
  94. data/pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb +14 -0
  95. data/pg_scaffold/lib/generators/pg_pundit/USAGE +8 -0
  96. data/pg_scaffold/lib/generators/pg_pundit/pg_pundit_generator.rb +21 -0
  97. data/pg_scaffold/lib/generators/pg_pundit/templates/policy.rb +37 -0
  98. data/pg_scaffold/lib/generators/pg_rails/instalar/USAGE +8 -0
  99. data/pg_scaffold/lib/generators/pg_rails/instalar/instalar_generator.rb +17 -0
  100. data/pg_scaffold/lib/generators/pg_rails/instalar/templates/pg_rails.rb +10 -0
  101. data/pg_scaffold/lib/generators/pg_resource_route/pg_resource_route_generator.rb +27 -0
  102. data/pg_scaffold/lib/generators/pg_rspec/model/model_generator.rb +30 -0
  103. data/pg_scaffold/lib/generators/pg_rspec/model/templates/model_spec.rb +15 -0
  104. data/pg_scaffold/lib/generators/pg_rspec/scaffold/scaffold_generator.rb +43 -0
  105. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/api_controller_spec.rb +167 -0
  106. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/controller_spec.rb +269 -0
  107. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/edit_spec.rb +34 -0
  108. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/index_spec.rb +28 -0
  109. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/new_spec.rb +34 -0
  110. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/routing_spec.rb +50 -0
  111. data/pg_scaffold/lib/generators/pg_rspec/scaffold/templates/show_spec.rb +26 -0
  112. data/pg_scaffold/lib/generators/pg_scaffold/USAGE +8 -0
  113. data/pg_scaffold/lib/generators/pg_scaffold/pg_scaffold_generator.rb +87 -0
  114. data/pg_scaffold/lib/generators/pg_scaffold/templates/controller.rb +37 -0
  115. data/pg_scaffold/lib/generators/pg_slim/USAGE +8 -0
  116. data/pg_scaffold/lib/generators/pg_slim/pg_slim_generator.rb +31 -0
  117. data/pg_scaffold/lib/generators/pg_slim/templates/_form.html.slim +12 -0
  118. data/pg_scaffold/lib/generators/pg_slim/templates/download.xlsx.axlsx +14 -0
  119. data/pg_scaffold/lib/generators/pg_slim/templates/edit.html.slim +5 -0
  120. data/pg_scaffold/lib/generators/pg_slim/templates/index.html.slim +51 -0
  121. data/pg_scaffold/lib/generators/pg_slim/templates/new.html.slim +5 -0
  122. data/pg_scaffold/lib/generators/pg_slim/templates/partial.html.slim +1 -0
  123. data/pg_scaffold/lib/generators/pg_slim/templates/show.html.slim +38 -0
  124. data/pg_scaffold/lib/pg_scaffold/monkey_patches/mejoras_a_named_base.rb +37 -0
  125. data/pg_scaffold/lib/pg_scaffold/monkey_patches/mejoras_de_atributos.rb +116 -0
  126. data/pg_scaffold/lib/pg_scaffold/railtie.rb +16 -0
  127. data/pg_scaffold/lib/pg_scaffold.rb +4 -0
  128. metadata +134 -48
  129. data/Rakefile +0 -36
  130. data/app/assets/javascripts/pg_rails/asociacion_creable.js +0 -85
  131. data/app/assets/javascripts/pg_rails/best_in_place_datepicker.js +0 -58
  132. data/app/assets/javascripts/pg_rails/librerias.js +0 -13
  133. data/app/assets/javascripts/pg_rails/librerias_b3.js +0 -14
  134. data/app/assets/javascripts/pg_rails/validaciones.js +0 -44
  135. data/app/assets/javascripts/pg_rails.js +0 -318
  136. data/app/assets/stylesheets/pg_rails/librerias.scss +0 -5
  137. data/app/assets/stylesheets/pg_rails/pg_chosen.scss +0 -29
  138. data/app/assets/stylesheets/pg_rails/pg_rails.scss +0 -199
  139. data/app/assets/stylesheets/pg_rails_b3.scss +0 -10
  140. data/app/assets/stylesheets/pg_rails_b4.scss +0 -12
  141. data/app/assets/stylesheets/pg_rails_b5.scss +0 -1
  142. data/app/controllers/pg_rails/application_controller.rb +0 -316
  143. data/app/controllers/pg_rails/editar_en_lugar_controller.rb +0 -24
  144. data/app/helpers/pg_rails/editar_en_lugar_helper.rb +0 -106
  145. data/app/helpers/pg_rails/form_helper.rb +0 -25
  146. data/app/inputs/pg_rails/asociacion_creable_input.rb +0 -72
  147. data/app/inputs/pg_rails/fecha_input.rb +0 -20
  148. data/app/inputs/pg_rails/selects_dependientes_input.rb +0 -9
  149. data/app/lib/pg_form_builder.rb +0 -31
  150. data/app/models/pg_rails/application_record.rb +0 -51
  151. data/app/views/application/_abrir_modal.js.erb +0 -14
  152. data/app/views/application/_actualizar_smart_listing.html.slim +0 -3
  153. data/app/views/application/_cerrar_modal.js.erb +0 -8
  154. data/app/views/application/_modal_ajax_form.js.erb +0 -7
  155. data/config/brakeman.ignore +0 -42
  156. data/config/locales/es.yml +0 -17
  157. data/config/routes.rb +0 -3
  158. data/config/spring.rb +0 -1
  159. data/lib/pg_rails/engine.rb +0 -42
  160. data/lib/pg_rails/simple_form/initializer.rb +0 -583
  161. data/lib/pg_rails.rb +0 -23
  162. /data/{lib/pg_rails → pg_engine/lib/pg_engine}/core_ext.rb +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1
4
+ version: 7.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-28 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Rails goodies.
14
14
  email:
@@ -19,50 +19,132 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - MIT-LICENSE
21
21
  - README.md
22
- - Rakefile
23
- - app/assets/javascripts/pg_rails.js
24
- - app/assets/javascripts/pg_rails/asociacion_creable.js
25
- - app/assets/javascripts/pg_rails/best_in_place_datepicker.js
26
- - app/assets/javascripts/pg_rails/librerias.js
27
- - app/assets/javascripts/pg_rails/librerias_b3.js
28
- - app/assets/javascripts/pg_rails/validaciones.js
29
- - app/assets/stylesheets/pg_rails/librerias.scss
30
- - app/assets/stylesheets/pg_rails/pg_chosen.scss
31
- - app/assets/stylesheets/pg_rails/pg_rails.scss
32
- - app/assets/stylesheets/pg_rails_b3.scss
33
- - app/assets/stylesheets/pg_rails_b4.scss
34
- - app/assets/stylesheets/pg_rails_b5.scss
35
- - app/controllers/pg_rails/application_controller.rb
36
- - app/controllers/pg_rails/editar_en_lugar_controller.rb
37
- - app/decorators/pg_rails/base_decorator.rb
38
- - app/helpers/pg_rails/editar_en_lugar_helper.rb
39
- - app/helpers/pg_rails/form_helper.rb
40
- - app/helpers/pg_rails/postgres_helper.rb
41
- - app/helpers/pg_rails/print_helper.rb
42
- - app/inputs/pg_rails/asociacion_creable_input.rb
43
- - app/inputs/pg_rails/fecha_input.rb
44
- - app/inputs/pg_rails/selects_dependientes_input.rb
45
- - app/lib/pg_form_builder.rb
46
- - app/lib/pg_rails/filtros_builder.rb
47
- - app/models/pg_rails/application_record.rb
48
- - app/policies/pg_rails/application_policy.rb
49
- - app/views/application/_abrir_modal.js.erb
50
- - app/views/application/_actualizar_smart_listing.html.slim
51
- - app/views/application/_cerrar_modal.js.erb
52
- - app/views/application/_modal_ajax_form.js.erb
53
- - config/brakeman.ignore
54
- - config/locales/es.yml
55
- - config/routes.rb
56
- - config/spring.rb
57
- - lib/pg_rails.rb
58
- - lib/pg_rails/configuracion.rb
59
- - lib/pg_rails/core_ext.rb
60
- - lib/pg_rails/engine.rb
61
- - lib/pg_rails/simple_form/initializer.rb
62
- - lib/pg_rails/utils/logueador.rb
63
- - lib/pg_rails/version.rb
64
- - lib/tasks/auto_anotar_modelos.rake
65
- - lib/tasks/pg_rails_tasks.rake
22
+ - pg_associable/app/assets/css/pg_associable.scss
23
+ - pg_associable/app/assets/js/asociable_controller.js
24
+ - pg_associable/app/assets/js/asociable_inline_controller.js
25
+ - pg_associable/app/assets/js/modal_controller.js
26
+ - pg_associable/app/helpers/pg_associable/form_builder_methods.rb
27
+ - pg_associable/app/helpers/pg_associable/helpers.rb
28
+ - pg_associable/app/inputs/pg_associable/pg_associable_inline_input.rb
29
+ - pg_associable/app/inputs/pg_associable/pg_associable_input.rb
30
+ - pg_associable/app/views/pg_associable/_resultados.html.slim
31
+ - pg_associable/app/views/pg_associable/_resultados_inline.html.slim
32
+ - pg_associable/app/views/pg_engine/base/_pg_associable_modal.html.slim
33
+ - pg_associable/index.js
34
+ - pg_associable/lib/pg_associable.rb
35
+ - pg_associable/lib/pg_associable/engine.rb
36
+ - pg_associable/lib/pg_associable/simple_form_initializer.rb
37
+ - pg_associable/lib/tasks/pg_associable_tasks.rake
38
+ - pg_engine/app/assets/stylesheets/pg_rails_b5.scss
39
+ - pg_engine/app/controllers/pg_engine/base_controller.rb
40
+ - pg_engine/app/controllers/pg_engine/devise_controller.rb
41
+ - pg_engine/app/controllers/pg_engine/signed_in_controller.rb
42
+ - pg_engine/app/decorators/pg_engine/base_decorator.rb
43
+ - pg_engine/app/helpers/pg_engine/flash_helper.rb
44
+ - pg_engine/app/helpers/pg_engine/form_helper.rb
45
+ - pg_engine/app/helpers/pg_engine/index_helper.rb
46
+ - pg_engine/app/helpers/pg_engine/postgres_helper.rb
47
+ - pg_engine/app/helpers/pg_engine/print_helper.rb
48
+ - pg_engine/app/helpers/pg_engine/route_helper.rb
49
+ - pg_engine/app/inputs/pg_engine/fecha_input.rb
50
+ - pg_engine/app/lib/pg_engine/filtros_builder.rb
51
+ - pg_engine/app/lib/pg_form_builder.rb
52
+ - pg_engine/app/models/pg_engine/base_record.rb
53
+ - pg_engine/app/policies/pg_engine/application_policy.rb
54
+ - pg_engine/app/views/pg_engine/base/download.xlsx.axlsx
55
+ - pg_engine/app/views/pg_engine/base/index.html.slim
56
+ - pg_engine/config/locales/es.yml
57
+ - pg_engine/config/simple_form/simple_form.rb
58
+ - pg_engine/config/simple_form/simple_form_bootstrap.rb
59
+ - pg_engine/lib/pg_engine.rb
60
+ - pg_engine/lib/pg_engine/configuracion.rb
61
+ - pg_engine/lib/pg_engine/core_ext.rb
62
+ - pg_engine/lib/pg_engine/engine.rb
63
+ - pg_engine/lib/pg_engine/utils/logueador.rb
64
+ - pg_engine/lib/tasks/auto_anotar_modelos.rake
65
+ - pg_engine/lib/templates/activeadmin/audits.rb
66
+ - pg_engine/lib/templates/activeadmin/users.rb
67
+ - pg_layout/app/assets/stylesheets/sidebar.scss
68
+ - pg_layout/app/javascript/cookies.js
69
+ - pg_layout/app/javascript/navbar_controller.js
70
+ - pg_layout/app/lib/navbar.rb
71
+ - pg_layout/app/views/devise/confirmations/new.html.erb
72
+ - pg_layout/app/views/devise/mailer/confirmation_instructions.html.erb
73
+ - pg_layout/app/views/devise/mailer/email_changed.html.erb
74
+ - pg_layout/app/views/devise/mailer/password_change.html.erb
75
+ - pg_layout/app/views/devise/mailer/reset_password_instructions.html.erb
76
+ - pg_layout/app/views/devise/mailer/unlock_instructions.html.erb
77
+ - pg_layout/app/views/devise/passwords/edit.html.erb
78
+ - pg_layout/app/views/devise/passwords/new.html.erb
79
+ - pg_layout/app/views/devise/registrations/edit.html.erb
80
+ - pg_layout/app/views/devise/registrations/new.html.erb
81
+ - pg_layout/app/views/devise/sessions/new.html.erb
82
+ - pg_layout/app/views/devise/shared/_error_messages.html.erb
83
+ - pg_layout/app/views/devise/shared/_links.html.erb
84
+ - pg_layout/app/views/devise/unlocks/new.html.erb
85
+ - pg_layout/app/views/kaminari/_first_page.html.slim
86
+ - pg_layout/app/views/kaminari/_gap.html.slim
87
+ - pg_layout/app/views/kaminari/_last_page.html.slim
88
+ - pg_layout/app/views/kaminari/_next_page.html.slim
89
+ - pg_layout/app/views/kaminari/_page.html.slim
90
+ - pg_layout/app/views/kaminari/_paginator.html.slim
91
+ - pg_layout/app/views/kaminari/_prev_page.html.slim
92
+ - pg_layout/app/views/layouts/pg_layout/devise.html.slim
93
+ - pg_layout/app/views/layouts/pg_layout/layout.html.slim
94
+ - pg_layout/app/views/pg_layout/_flash.html.slim
95
+ - pg_layout/app/views/pg_layout/_navbar.html.erb
96
+ - pg_layout/app/views/pg_layout/_sidebar.html.erb
97
+ - pg_layout/index.js
98
+ - pg_layout/lib/pg_layout.rb
99
+ - pg_layout/lib/pg_layout/engine.rb
100
+ - pg_rails/js/index.js
101
+ - pg_rails/lib/pg_rails.rb
102
+ - pg_rails/lib/version.rb
103
+ - pg_rails/scss/pg_rails.scss
104
+ - pg_scaffold/lib/generators/pg_active_record/model/model_generator.rb
105
+ - pg_scaffold/lib/generators/pg_active_record/model/templates/admin.rb
106
+ - pg_scaffold/lib/generators/pg_active_record/model/templates/create_table_migration.rb.tt
107
+ - pg_scaffold/lib/generators/pg_active_record/model/templates/migration.rb.tt
108
+ - pg_scaffold/lib/generators/pg_active_record/model/templates/model.rb
109
+ - pg_scaffold/lib/generators/pg_active_record/model/templates/module.rb
110
+ - pg_scaffold/lib/generators/pg_decorator/USAGE
111
+ - pg_scaffold/lib/generators/pg_decorator/pg_decorator_generator.rb
112
+ - pg_scaffold/lib/generators/pg_decorator/templates/decorator.rb
113
+ - pg_scaffold/lib/generators/pg_factory_bot/model/model_generator.rb
114
+ - pg_scaffold/lib/generators/pg_factory_bot/model/templates/factories.erb
115
+ - pg_scaffold/lib/generators/pg_pundit/USAGE
116
+ - pg_scaffold/lib/generators/pg_pundit/pg_pundit_generator.rb
117
+ - pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
118
+ - pg_scaffold/lib/generators/pg_rails/instalar/USAGE
119
+ - pg_scaffold/lib/generators/pg_rails/instalar/instalar_generator.rb
120
+ - pg_scaffold/lib/generators/pg_rails/instalar/templates/pg_rails.rb
121
+ - pg_scaffold/lib/generators/pg_resource_route/pg_resource_route_generator.rb
122
+ - pg_scaffold/lib/generators/pg_rspec/model/model_generator.rb
123
+ - pg_scaffold/lib/generators/pg_rspec/model/templates/model_spec.rb
124
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/scaffold_generator.rb
125
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/api_controller_spec.rb
126
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/controller_spec.rb
127
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/edit_spec.rb
128
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/index_spec.rb
129
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/new_spec.rb
130
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/routing_spec.rb
131
+ - pg_scaffold/lib/generators/pg_rspec/scaffold/templates/show_spec.rb
132
+ - pg_scaffold/lib/generators/pg_scaffold/USAGE
133
+ - pg_scaffold/lib/generators/pg_scaffold/pg_scaffold_generator.rb
134
+ - pg_scaffold/lib/generators/pg_scaffold/templates/controller.rb
135
+ - pg_scaffold/lib/generators/pg_slim/USAGE
136
+ - pg_scaffold/lib/generators/pg_slim/pg_slim_generator.rb
137
+ - pg_scaffold/lib/generators/pg_slim/templates/_form.html.slim
138
+ - pg_scaffold/lib/generators/pg_slim/templates/download.xlsx.axlsx
139
+ - pg_scaffold/lib/generators/pg_slim/templates/edit.html.slim
140
+ - pg_scaffold/lib/generators/pg_slim/templates/index.html.slim
141
+ - pg_scaffold/lib/generators/pg_slim/templates/new.html.slim
142
+ - pg_scaffold/lib/generators/pg_slim/templates/partial.html.slim
143
+ - pg_scaffold/lib/generators/pg_slim/templates/show.html.slim
144
+ - pg_scaffold/lib/pg_scaffold.rb
145
+ - pg_scaffold/lib/pg_scaffold/monkey_patches/mejoras_a_named_base.rb
146
+ - pg_scaffold/lib/pg_scaffold/monkey_patches/mejoras_de_atributos.rb
147
+ - pg_scaffold/lib/pg_scaffold/railtie.rb
66
148
  homepage: https://github.com/programandoarg/pg_rails
67
149
  licenses:
68
150
  - MIT
@@ -70,7 +152,11 @@ metadata: {}
70
152
  post_install_message:
71
153
  rdoc_options: []
72
154
  require_paths:
73
- - lib
155
+ - pg_rails/lib
156
+ - pg_associable/lib
157
+ - pg_engine/lib
158
+ - pg_layout/lib
159
+ - pg_scaffold/lib
74
160
  required_ruby_version: !ruby/object:Gem::Requirement
75
161
  requirements:
76
162
  - - "~>"
@@ -82,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
168
  - !ruby/object:Gem::Version
83
169
  version: '0'
84
170
  requirements: []
85
- rubygems_version: 3.1.4
171
+ rubygems_version: 3.3.22
86
172
  signing_key:
87
173
  specification_version: 4
88
174
  summary: Rails goodies
data/Rakefile DELETED
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- begin
4
- require 'bundler/setup'
5
- rescue LoadError
6
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
- end
8
-
9
- require 'rdoc/task'
10
-
11
- RDoc::Task.new(:rdoc) do |rdoc|
12
- rdoc.rdoc_dir = 'rdoc'
13
- rdoc.title = 'PgRails'
14
- rdoc.options << '--line-numbers'
15
- rdoc.rdoc_files.include('README.md')
16
- rdoc.rdoc_files.include('lib/**/*.rb')
17
- end
18
-
19
- APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__)
20
- load 'rails/tasks/engine.rake'
21
-
22
- load 'rails/tasks/statistics.rake'
23
-
24
- require 'bundler/gem_tasks'
25
-
26
- require 'rake/testtask'
27
-
28
- load 'lib/tasks/auto_anotar_modelos.rake'
29
-
30
- # Rake::TestTask.new(:test) do |t|
31
- # t.libs << 'test'
32
- # t.pattern = 'test/**/*_test.rb'
33
- # t.verbose = false
34
- # end
35
-
36
- task default: :test
@@ -1,85 +0,0 @@
1
- window.AsociacionCreable = new function() {
2
- asociacion_creable = this;
3
- asociacion_creable.bindear = function(contexto) {
4
- $(contexto).find('.crear_asociado').click(function() {
5
- var boton_crear = this;
6
- $.get($(this).data('url') + "?sin_layout=true").done(function(response) {
7
- var modal = pg_rails.abrir_modal(response);
8
- PgRails.bindear(modal);
9
- modal.find('form').ajaxForm({
10
- dataType: 'json',
11
- success: function(responseJSON, statusText, xhr) {
12
- var input_oculto = $(boton_crear).closest('.form-group').find('input.oculto');
13
- var input_visible = $(boton_crear).closest('.form-group').find('input:not(.oculto)');
14
- input_oculto.val(responseJSON['id']);
15
- input_visible.val(responseJSON['to_s']);
16
- $(modal).modal('hide');
17
- // $(modal).modal('dispose');
18
- $(modal).remove();
19
- $(boton_crear).closest('.asociacion_creable').trigger('change', responseJSON);
20
- PgRails.showToast('Elemento creado.')
21
- },
22
- error: function(response, status, statusText) {
23
- for( var i in response.responseJSON) {
24
- pg_rails.showToast(response.responseJSON[i]);
25
- }
26
- modal.find('form input[type=submit]').attr('disabled', null)
27
- }
28
- });
29
- })
30
- });
31
-
32
- $(contexto).find('.borrar_seleccion').click(function() {
33
- var input_oculto = $(this).closest('.form-group').find('input.oculto');
34
- var input_visible = $(this).closest('.form-group').find('input:not(.oculto)');
35
- $(this).closest('.form-group').removeClass('completado');
36
- input_oculto.val(null);
37
- input_visible.val(null);
38
- $(this).closest('.asociacion_creable').trigger('change', null);
39
- });
40
- $(contexto).find('.seleccionar_asociado').click(function() {
41
- var boton_seleccionar = this;
42
- var url = new URL($(this).data('url'));
43
- url.searchParams.set("sin_layout", "true");
44
- $.get(url, null, null, 'html').done(function(response) {
45
- var modal = pg_rails.abrir_modal(response, "Seleccionar", { dialog_class: 'modal-xl modal-lg modal-seleccionar-asociado' });
46
- PgRails.bindear(modal);
47
- var elemento_seleccionado = function() {
48
- var id = $(this).closest('tr').data('id');
49
- if(!id) {
50
- console.error("La fila no tiene ID")
51
- return
52
- }
53
- var url = new URL($(boton_seleccionar).data('url'));
54
- url.pathname += "/" + id + '.json';
55
- $.get(url).done(function(response) {
56
- var input_oculto = $(boton_seleccionar).closest('.form-group').find('input.oculto');
57
- var input_visible = $(boton_seleccionar).closest('.form-group').find('input:not(.oculto)');
58
- input_oculto.val(id);
59
- if( response.to_s ) {
60
- input_visible.val(response.to_s);
61
- } else {
62
- console.error('El JSON no tiene to_s')
63
- input_visible.val("#" + response.id);
64
- }
65
- $(boton_seleccionar).closest('.form-group').addClass('completado');
66
- // select.html('<option value="'+id+'">'+response.to_s+'</option>');
67
- $(modal).modal('hide');
68
- // $(modal).modal('dispose');
69
- $(modal).remove();
70
- $(boton_seleccionar).closest('.asociacion_creable').trigger('change', response);
71
- }).fail(function() {
72
- pg_rails.error_toast("Hubo un error");
73
- });
74
- }
75
-
76
- modal.find(SmartListing.config.class_name("main")).smart_listing()
77
- modal.find(SmartListing.config.class_name("controls")).smart_listing_controls()
78
- modal.find(SmartListing.config.class_name("main")).on('ajax:success smart_listing:update_list', function() {
79
- $(this).find('td').click(elemento_seleccionado);
80
- })
81
- modal.find('td').click(elemento_seleccionado);
82
- })
83
- });
84
- }
85
- }
@@ -1,58 +0,0 @@
1
- // Datepicker para los editores de fecha de best_in_place
2
- // Es una copia modificada de best_in_place.jquery-ui
3
-
4
- BestInPlaceEditor.forms.date = {
5
- activateForm: function () {
6
- 'use strict';
7
- var that = this,
8
- output = jQuery(document.createElement('form'))
9
- .addClass('form_in_place')
10
- .attr('action', 'javascript:void(0);')
11
- .attr('style', 'display:inline'),
12
- input_elt = jQuery(document.createElement('input'))
13
- .attr('type', 'text')
14
- .attr('name', this.attributeName)
15
- .attr('value', this.sanitizeValue(this.display_value));
16
- // .attr('value', this.sanitizeValue(moment(this.display_value).format('DD/MM/YYYY')));
17
- if (this.inner_class !== null) {
18
- input_elt.addClass(this.inner_class);
19
- }
20
- output.append(input_elt);
21
-
22
- this.element.html(output);
23
- this.setHtmlAttributes();
24
- this.element.find('input')[0].select();
25
- this.element.find("form").bind('submit', {editor: this}, BestInPlaceEditor.forms.input.submitHandler);
26
- this.element.find("input").bind('keyup', {editor: this}, BestInPlaceEditor.forms.input.keyupHandler);
27
-
28
- this.element.find('input')
29
- .datepicker({
30
- 'format': 'dd/mm/yyyy',
31
- 'todayBtn': 'linked',
32
- 'autoclose': 'true',
33
- 'language': 'es',
34
- }).on('changeDate', function () {
35
- $(this).datepicker('destroy');
36
- that.update();
37
- }).datepicker('show');
38
- },
39
-
40
- getValue: function () {
41
- 'use strict';
42
- return this.sanitizeValue(this.element.find("input").val());
43
- },
44
-
45
- submitHandler: function (event) {
46
- 'use strict';
47
- event.data.editor.update();
48
- },
49
-
50
- keyupHandler: function (event) {
51
- 'use strict';
52
- if (event.keyCode === 27) {
53
- event.data.editor.abort();
54
- }
55
- }
56
- }
57
-
58
-
@@ -1,13 +0,0 @@
1
- //= require jquery3
2
- //= require jquery_ujs
3
- //= require bootstrap.bundle-4.4.1.min
4
- //= require smart_listing
5
- //= require best_in_place
6
- //= require bootstrap-datepicker/core
7
- //= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js
8
- //= require selectize
9
- //= require jquery_nested_form
10
- //= require jquery.form.min.js
11
- //= require handlebars-4.7.6.min
12
- //= require chosen
13
- //= require pg_rails/best_in_place_datepicker
@@ -1,14 +0,0 @@
1
- // Librerias javascript para proyectos con Bootstrap 3
2
-
3
- //= require jquery3
4
- //= require jquery_ujs
5
- //= require smart_listing
6
- //= require best_in_place
7
- //= require bootstrap-datepicker/core
8
- //= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js
9
- //= require selectize
10
- //= require jquery_nested_form
11
- //= require jquery.form.min.js
12
- //= require handlebars-4.7.6.min
13
- //= require chosen
14
- //= require best_in_place_datepicker
@@ -1,44 +0,0 @@
1
- //= require jquery-validation
2
-
3
- $.extend( $.validator.messages, {
4
- required: "Este campo es obligatorio.",
5
- remote: "Por favor, completá este campo.",
6
- email: "Por favor, escribí una dirección de correo válida.",
7
- url: "Por favor, escribí una URL válida.",
8
- date: "Por favor, escribí una fecha válida.",
9
- dateISO: "Por favor, escribí una fecha (ISO) válida.",
10
- number: "Por favor, escribí un número entero válido.",
11
- digits: "Por favor, escribí sólo dígitos.",
12
- creditcard: "Por favor, escribí un número de tarjeta válido.",
13
- equalTo: "Por favor, escribí el mismo valor de nuevo.",
14
- extension: "Por favor, escribí un valor con una extensión aceptada.",
15
- maxlength: $.validator.format( "Por favor, no escribas más de {0} caracteres." ),
16
- minlength: $.validator.format( "Por favor, no escribas menos de {0} caracteres." ),
17
- rangelength: $.validator.format( "Por favor, escribí un valor entre {0} y {1} caracteres." ),
18
- range: $.validator.format( "Por favor, escribí un valor entre {0} y {1}." ),
19
- max: $.validator.format( "Por favor, escribí un valor menor o igual a {0}." ),
20
- min: $.validator.format( "Por favor, escribí un valor mayor o igual a {0}." ),
21
- nifES: "Por favor, escribí un NIF válido.",
22
- nieES: "Por favor, escribí un NIE válido.",
23
- cifES: "Por favor, escribí un CIF válido."
24
- } );
25
-
26
- $.validator.setDefaults({
27
- ignore: ":hidden:not(select.chosen-select):not(.hidden-validation-field),.ignore-validation",
28
- errorPlacement: function(error, element) {
29
- var group = element.closest('.form-group');
30
- if( group ) {
31
- if( group.hasClass('row') ) {
32
- error.appendTo( element.parent() );
33
- } else {
34
- error.appendTo( element.closest('.form-group') );
35
- }
36
- } else {
37
- error.appendTo( element.parent() );
38
- }
39
- }
40
- })
41
- $.validator.addMethod("nestedPresence", function(value, element) {
42
- return $(element).closest('.nested-container').find('.fields:not(.removed)').length > 0
43
- }, "Este campo es obligatorio.");
44
- $.validator.addClassRules("nested_presence", { nestedPresence: true });