• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Ruby drupal_module_versions

Status
Not open for further replies.

dEEpEst

☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
Joined
Mar 29, 2018
Messages
13,860
Solutions
4
Reputation
27
Reaction score
45,546
Points
1,813
Credits
55,340
‎7 Years of Service‎
 
56%
[HIDE-THANKS][LANGUAGE=ruby]# ! / usr / bin / env ruby

#

# Obtiene el último número de versión de una lista de módulos de Drupal.

# Útil cuando desee averiguar si los módulos de drupal están desactualizados o no.

#

requiere ' typhoeus '

requiere ' nokogiri '

modules = Archivo . open ( ARGV .join) .read.split ( " \ n " )

module_url = '
This link is hidden for visitors. Please Log in or register now.
'

modules.each do | drupal_module |

respuesta = Typhoeus .get (module_url + drupal_module)

doc = Nokogiri :: HTML (response.body)

latest_version = doc.css ( ' .views-field-field-release-version a ' ) [ 0 ] .text

pone " # { drupal_module } # { latest_version } "

fin

[/LANGUAGE][/HIDE-THANKS]

 
Status
Not open for further replies.
Back
Top