allow for a node or url to be expired via drush.

Comments

SqyD’s picture

Assigned: Unassigned » SqyD

Taken from #1050526: Drush integration where mikeytown2 said:
Drush commands I was thinking of:
expire-url: full url
expire-path: contact-us
expire-node: NID
expire-node-type: page

Future would have expire-view and expire-panel.

SqyD’s picture

StatusFileSize
new3.1 KB

I've got a rough patch for those who can't wait to test. (which I admit I haven't done too much myself). Basics seem to work. Will improve it over the coming days.

SqyD’s picture

Status: Active » Needs work
SqyD’s picture

Status: Needs work » Needs review
StatusFileSize
new3.89 KB

Ok. I've found a few bugs since the last update:
- multiple arguments didn't get passed along. Now getting them directly from drush.
- <front>doesn't fly in cli land apparently. Using FRONT for now

Syntax is as follows:

expire-node (xn)      Expire a node by node-id.    
expire-path (xp)      Expire a drupal path.        
expire-url (xu)       Expire fully qualified URLs.

More help text available with the help command for instance:
drush help expire-path

I think this is ready to go in.

mikeytown2’s picture

Quick glance at the patch and it looks good. Commit away!

SqyD’s picture

Status: Needs review » Closed (fixed)

Ok, it's committed. I've also updated the project page and included it in the drush and rules categories.
Drush integration is a big help for testing during development.

mikeytown2’s picture

Nice! +1