Drush for Developers - Second Edition
eBook - ePub

Drush for Developers - Second Edition

Juampy Novillo Requena

Buch teilen
  1. 180 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Drush for Developers - Second Edition

Juampy Novillo Requena

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Drush for Developers - Second Edition als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Drush for Developers - Second Edition von Juampy Novillo Requena im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Web Development. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2015
ISBN
9781784393786

Drush for Developers Second Edition


Table of Contents

Drush for Developers Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introduction, Installation, and Basic Usage
Installation requirements
Operating system
PHP
Installing Composer
Drush installation on Linux and OSX
Manual installation
The Drush command structure
Executing a command
Providing arguments to a command
Altering a command's behavior through options
Structuring command invocations
Command aliases
Understanding Drush's context system
Setting the context manually
Summary
2. Keeping Database Configuration and Code Together
Meeting the update path
Rebuilding the registry
Preparing the trap
Breaking the registry
Rebuilding Drupal's registry
Running database updates
Managing features
Exporting configuration into code
Running the update path on a different environment
Analyzing results
Reverting the feature components programmatically
Summary
3. Running and Monitoring Tasks in Drupal Projects
Running periodic tasks with cron
Disabling Drupal's cron
Verifying the current cron frequency
Overriding cron frequency and exporting it to code
Running cron with Drush
Scheduling cron runs with Jenkins
Installing Jenkins
Creating a job through the web interface
Monitoring cron runs
Running a task outside cron
Example – moving a Feeds importer from Drupal's cron to Drush
Exporting the Feeds importer into code
Writing a Drush command to trigger the Feeds importer
Running long tasks in batches
A sample Drush command using the Batch API
Batch API operations
Running the command and verifying the output
Evaluating code on the fly and running scripts
The php-eval command
The php-script command
A script to create nodes and revisions
Logging messages in Drush
The verbose and quiet modes
Redirecting Drush output into a file
Implementing your own logging mechanism
Running a command in the background
Summary
4. Error Handling and Debugging
Validating input
Validating an argument
Validating options
Ignoring options after the command name
Allowing additional options
Adding custom validation to a command
Rolling back when an error happens
Turning the update path into a single command
Browsing hook implementations
Inspecting the bootstrapping process
Inspecting hook and function implementations
Browsing and navigating hook implementations
Viewing source code of a function or method
Summary
5. Managing Local and Remote Environments
Managing local environments
Managing remote environments
Verifying requirements
Accessing a remote server through a public key
Defining a group of remote site aliases for our project
Using site aliases in commands
Special site aliases
Running a command on all site aliases of a group
Avoiding a Drupal bootstrap with @none
Referencing the current project with @self
Adding site alias support to the update path
Inspecting the command implementation and hooks
Running the update path with a site alias
Copying database and files between environments
Defining Drush shell aliases for a team
Blocking the execution of certain commands
Ignoring tables on sql-sync
Summary
6. Setting Up a Development Workflow
Moving configuration, commands, and site aliases out of Drupal
Installing Drupal Boilerplate
Relocating Drush files
Testing the new setup
Configuring the development database for the team
Configuring Jenkins to sync production to development
Fine-tuning the development database
Recreating the database on sql-sync
Excluding table data from production
Ignoring tables from production
Sanitizing data
Preventing e-mails from being sent
Running post sql-sync tasks in local environments
Summary
Index

Drush for Developers Second Edition

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2012
Second edition: January 2015
Production reference: 1240115
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-378-6
www.packtpub.com

Credits

Author
Juampy Novillo Requena
Reviewers
Greg Anderson
Chris Burgess
Jonathan Araña Cruz
Jeremy French
Todd Zebert
Commissioning Editor
Dipika Gaonkar
Acquisition Editor
Meeta Rajani
Content Development Editor
Anila Vincent
Technical Editor
Arvind Koul
Copy Editor
Relin Hedly
Project Coordinator
Neha Bhatnagar
Proofreaders
Bridget Braund
Ameesha Green
Indexer
Tejal Soni
Production Coordinator
Alwin Roy
Cover Work
Alwin Roy

About the Author

Juampy Novillo Requena started working as a web developer in London. After spending a few years developing with plain PHP, Symfony, and Ruby on Rails, he discovered Drupal. Drawn by the Drupal community and the mind-blowing effect of getting a project done 10 times faster than before, Juampy has never looked back.
Since then, he's become more and more involved in the issue queues, which in turn led him to become a maintainer of core and contributed modules. He organizes events, gives sessions at national and international conferences, and has written the book Drush User's Guide, Packt Publishing. He feels privileged to experiment, have fun, and be challenged every day. He is known as juampy on Drupal.org and IRC. His Twitter account is @juampy72.

Inhaltsverzeichnis