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 <http://www.gnu.org/licenses/>.
=end
# ./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
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
class Commande
def traiter
#ARGV
-
+=begin
Net::SSH.start('euphorik.ch', 'gburri') {|ssh|
output = ssh.exec!("hostname")
stdout = ""
stdout << data if stream == :stdout
}
puts stdout
- }
+ }\r
+=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()