Commit f92ad9bb8fec1d7cfcaf5e71692b3b7db7787e47
1 parent
27e639fc
Exists in
script_to_update
Finally fixing the last problems of the script
Showing
2 changed files
with
31 additions
and
21 deletions
Show diff stats
date-communities.txt
... | ... | @@ -20,15 +20,15 @@ |
20 | 20 | 31042 | 2007-03-12 09:47:54.97039-03 | e-Proinfo |
21 | 21 | 23731755 | 2010-08-24 12:17:02.069138-03 | ERP5 BR |
22 | 22 | 126403824 | 2014-12-08 10:28:11.812721-02 | e-Sic Livre |
23 | - 11809545 | 2009-06-17 09:19:30.697619-03 | Fila - Sistema de Atendimento | |
23 | + 11809545 | 2009-06-17 09:19:30.697619-03 | Fila | |
24 | 24 | 44509627 | 2011-11-30 16:11:20.487561-02 | FormDin |
25 | 25 | 30726269 | 2011-03-25 18:15:38.333798-03 | Geosan |
26 | 26 | 20483099 | 2010-04-16 14:53:04.201919-03 | Geplanes |
27 | 27 | 33752093 | 2011-05-25 13:08:28.449124-03 | GGAS |
28 | 28 | 1101545 | 2007-06-18 15:31:22.060335-03 | Ginga |
29 | - 30724784 | 2011-03-25 17:44:11.373481-03 | Gnuteca - Gestão de Bibliotecas | |
29 | + 30724784 | 2011-03-25 17:44:11.373481-03 | Gnuteca | |
30 | 30 | 31574974 | 2011-04-15 15:57:57.260004-03 | gpweb |
31 | - 1593449 | 2007-08-30 16:51:38.073906-03 | GSAN | |
31 | + 1593449 | 2007-08-30 16:51:38.073906-03 | Gsan - Sistema Integrado de Gestão de Serviços de Saneamento | |
32 | 32 | 66594611 | 2013-04-23 15:06:59.865025-03 | Guarux |
33 | 33 | 1444332 | 2007-08-07 08:15:42.941934-03 | i3GEO |
34 | 34 | 6552490 | 2008-09-29 13:26:07.553951-03 | i-Educar |
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | 25913900 | 2010-11-09 15:33:43.132943-02 | Jaguar |
37 | 37 | 18068594 | 2010-01-06 16:28:29.99099-02 | Koruja |
38 | 38 | 601158 | 2007-05-03 14:49:32.350206-03 | KyaPanel |
39 | - 3673574 | 2008-04-09 15:18:24.118203-03 | LightBase - Banco de Dados Textual Multimídia e Soluções de GED. | |
39 | + 3673574 | 2008-04-09 15:18:24.118203-03 | LightBase | |
40 | 40 | 11809207 | 2009-06-17 09:18:46.708981-03 | Linux Educacional |
41 | 41 | 9022831 | 2009-02-04 15:21:13.18503-02 | MDArte |
42 | 42 | 11808514 | 2009-06-17 09:10:36.619105-03 | Minuano |
... | ... | @@ -52,14 +52,14 @@ |
52 | 52 | 3695494 | 2008-04-11 10:38:11.361528-03 | Sagui |
53 | 53 | 15719494 | 2009-10-20 10:38:37.237684-02 | SGA LIVRE - Sistema de Gerenciamento do Atendimento |
54 | 54 | 63022108 | 2013-01-30 11:22:50.327218-02 | SGDoc |
55 | - 51261 | 2007-03-23 15:10:36.399602-03 | SGD - Sistema de Gestão de Demandas | |
55 | + 51261 | 2007-03-23 15:10:36.399602-03 | SGD – Sistema de Gestão de Demandas | |
56 | 56 | 23369799 | 2010-08-13 14:04:43.562233-03 | SGF - Sistema de Gestão de Frotas |
57 | 57 | 93658 | 2007-03-29 08:41:09.667033-03 | Sigati |
58 | - 3485513 | 2008-03-26 16:45:51.301379-03 | SIMEC - Sistema Integrado de Planejamento Orçamento e Finanças | |
58 | + 3485513 | 2008-03-26 16:45:51.301379-03 | SIMEC - Sistema Integrado de Planejamento Orçamento e Finanças | |
59 | 59 | 5482 | 2007-02-09 10:05:23.803077-02 | Sisau-Saci-Contra |
60 | - 42365353 | 2011-10-19 16:17:57.49005-02 | Sistema Aberto de Eleições Eletrônicas | |
60 | + 42365353 | 2011-10-19 16:17:57.49005-02 | SAELE | |
61 | 61 | 44620010 | 2011-12-05 18:03:30.046532-02 | Sistema de Ouvidoria |
62 | - 54650395 | 2012-06-29 15:24:43.920424-03 | SIVAC - Sistema on-line de Vacinação | |
62 | + 54650395 | 2012-06-29 15:24:43.920424-03 | SIVAC - Sistema on-line de Vacinação | |
63 | 63 | 26934301 | 2010-12-02 17:40:23.960186-02 | SNEP PBX IP |
64 | 64 | 7283318 | 2008-11-11 14:31:33.260701-02 | SPED - Sistema de protocolo eletrônico |
65 | 65 | 51053337 | 2012-04-27 13:49:25.11419-03 | Tucunaré | ... | ... |
update.rb
1 | 1 | # Update software dates |
2 | +softwares = SoftwareInfo.all | |
3 | +puts "Removing trailling spaces of softwares name and updating the box layout" | |
4 | +softwares.each do |soft| | |
5 | + if soft.community | |
6 | + name = soft.community.name.strip | |
7 | + soft.community.name = name | |
8 | + soft.community.save | |
9 | + | |
10 | + soft.community.layout_template = "lefttopright" | |
11 | + print "." if soft.community.save | |
12 | + boxToMove = soft.community.boxes.where(:position => 1).first | |
13 | + blockToMove = boxToMove.blocks.where(:type => "SoftwareInformationBlock").first | |
14 | + newBox = soft.community.boxes.where(:position => 4).first | |
15 | + blockToMove.box = newBox | |
16 | + print "." if blockToMove.save | |
17 | + else | |
18 | + soft.destroy | |
19 | + end | |
20 | +end | |
21 | + | |
22 | +puts "" | |
2 | 23 | puts "Updating dates for software" |
3 | 24 | file = File.new("date-communities.txt", "r") |
4 | 25 | while (line = file.gets) |
... | ... | @@ -10,6 +31,7 @@ while (line = file.gets) |
10 | 31 | print "." |
11 | 32 | else |
12 | 33 | print "F" |
34 | + puts software_name | |
13 | 35 | end |
14 | 36 | end |
15 | 37 | file.close |
... | ... | @@ -35,23 +57,11 @@ boxTemplateSoftware.blocks.each do |block| |
35 | 57 | print "." if block.save |
36 | 58 | end |
37 | 59 | |
38 | -softwares = SoftwareInfo.all | |
39 | - | |
40 | -softwares.each do |soft| | |
41 | - soft.community.layout_template = "lefttopright" | |
42 | - print "." if soft.community.save | |
43 | - boxToMove = soft.community.boxes.where(:position => 1).first | |
44 | - blockToMove = boxToMove.blocks.where(:type => "SoftwareInformationBlock").first | |
45 | - newBox = soft.community.boxes.where(:position => 4).first | |
46 | - blockToMove.box = newBox | |
47 | - print "." if blockToMove.save | |
48 | -end | |
49 | - | |
50 | 60 | blocks.each do |block| |
51 | 61 | if block.settings[:fixed] == true |
52 | 62 | block.move_modes = 'none' |
53 | 63 | block.edit_modes = 'none' |
54 | - end | |
64 | + end | |
55 | 65 | if !(block.owner.class == Environment) && block.owner.organization? && !block.owner.enterprise? |
56 | 66 | if block.owner.software? |
57 | 67 | software_block = boxTemplateSoftware.blocks.where(:title => block.title).first | ... | ... |