When running drush make with libraries set as the following, the file is named wrongly.

libraries[autopager][download][type] = "get"
libraries[autopager][download][url] = "http://lagoscript.org/files/jquery/autopager/jquery.autopager-1.0.0.js"
libraries[autopager][directory_name] = "autopager"

The file is put in the correct folder but with name as http---lagoscript.org-files-jquery-autopager-jquery.autopager-1.0.0.js which causes the library to don't load correctly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

I think you need to specify the 'filename' attribute:

libraries[jquery.cycle][download][filename] = "jquery.cycle.js"

jhedstrom’s picture

Status: Active » Postponed (maintainer needs more info)
recidive’s picture

Status: Postponed (maintainer needs more info) » Active

@jhedstrom: ok, but drush make 4.x was assigning the original library file name, not a "sanitized" version of the URL. I thought this was a regression that could be fixed easily.

jhedstrom’s picture

@recidive, you're right--in this case it should default to the name 'jquery.autopager-1.0.0.js' without having to specify that. I misunderstood the initial issue. Looking into this now.

jhedstrom’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
1.86 KB

This fixes the issue for me. Posting for review, but will commit soon. Also added a test so this doesn't break again (it was the subtree patch that caused this issue).

jhedstrom’s picture

Status: Needs review » Fixed

Decided to just commit since all tests are still passing. Fixed in 87d2dad.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.