X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=tools%2Ftools.rb;h=3fa7497259d491e023a7a533354c4e123d72ae76;hp=5472a3c209d94f2065efa478e24f641ff644a643;hb=dd3320de291341d6d86f79421b85d12c4764b057;hpb=6ff8e72d002f5ccf2045cbccef2fdc4f92cff938
diff --git a/tools/tools.rb b/tools/tools.rb
index 5472a3c..3fa7497 100644
--- a/tools/tools.rb
+++ b/tools/tools.rb
@@ -14,7 +14,7 @@ Euphorik is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
++
You should have received a copy of the GNU General Public License
along with Euphorik. If not, see .
=end
@@ -33,7 +33,7 @@ along with Euphorik. If not, see .
# ./tools.rb --dopreprod gburri@euphorik.ch:/var/www/euphorik_preprod --prod gburri@euphorik.ch:/var/www/euphorik
# voir : http://net-ssh.rubyforge.org/ssh/v2/api/index.html
-require 'net/ssh'
+# require 'net/ssh'
# Classe permettant la vérification du code JS pas jslint.
# Passe en revu chaque fichier js de manière récursive à partir d'un dossier de départ.s
@@ -44,19 +44,19 @@ class VerifJS
end
def verifier
- verifierRecu(@dossier)
+ verifierRecur(@dossier)
end
- def verifierRecu(dossier)
+ def verifierRecur(dossier)
Dir.foreach(dossier){|fichier|
if fichier != '.' and fichier != '..' and File.directory?(fichier) and fichier != 'dirs'
- if not verifierRecu(dossier + '/' + fichier)
+ if not verifierRecur(dossier + '/' + fichier)
return false
end
elsif fichier[-3, 3] == '.js'
puts "== Vérification de #{dossier}/#{fichier} =="
system("java org.mozilla.javascript.tools.shell.Main jslint.js #{dossier}/#{fichier}")
- puts $?.exitstatus
+ # puts $?.exitstatus
if $?.exitstatus > 0
return false
end
@@ -183,7 +183,7 @@ end
class Commande
def traiter
#ARGV
-
+=begin
Net::SSH.start('euphorik.ch', 'gburri') {|ssh|
output = ssh.exec!("hostname")
stdout = ""
@@ -191,14 +191,15 @@ class Commande
stdout << data if stream == :stdout
}
puts stdout
- }
+ }
+=end
#miseEnProd = MiseEnProd.new("gburri@euphorik.ch:/var/www/euphorik", "gburri@euphorik.ch:/var/www/euphorik_preprod")
#miseEnProd.miseEnPreProd()
- #verifJS = VerifJS.new("../js")
- #verifJS.verifier()
+ verifJS = VerifJS.new("../js")
+ verifJS.verifier()
#version = Version.new("..")
#version.maj()