Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| require "money" | |
| class Decorator < BasicObject | |
| undef_method :== | |
| def initialize(component) | |
| @component = component | |
| end | |
| def method_missing(name, *args, &block) |
| #!/bin/sh | |
| # Run tools on files in the index | |
| git diff --cached --name-status \ | |
| | awk '$1 != "D" && $1 != "R" { $1 = ""; print }' \ | |
| | git checkout-index --stdin --temp \ | |
| | while read tmp orig | |
| do | |
| case $orig in | |
| *.php) |
| <?php | |
| /* | |
| * This file is part of the Symfony package. | |
| * | |
| * (c) Fabien Potencier <fabien@symfony.com> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. | |
| */ |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |