- (/) suite hooks
- before(:suite)
- after(:suite)
- (/) skip some conditions
- xit
- it 'SPECIFICATION ONLY'
- tagged example
- it 'SPEC' => { ENV_FOO => 1 } => sub { ... };
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find local/lib/perl5 -name "README.pod" | |
local/lib/perl5/App/README.pod | |
local/lib/perl5/LWP/UserAgent/DNS/README.pod | |
local/lib/perl5/Test/Deep/README.pod | |
local/lib/perl5/Test/Fake/README.pod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def table_at(selector) | |
Nokogiri::HTML(page.body).css(selector).map do |table| | |
table.css('tr').map do |tr| | |
tr.css('td').map { |td| td.text.strip } | |
end | |
end[0].reject(&:empty?) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cpanm Net::SSLeay IO::Socket::SSL Test::SharedFork Test::TCP | |
Net::SSLeay is up to date. (1.48) | |
IO::Socket::SSL is up to date. (1.76) | |
Test::SharedFork is up to date. (0.20) | |
Test::TCP is up to date. (1.16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p demoCA/newcerts | |
touch demoCA/index.txt | |
echo "01" >> demoCA/serial | |
openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 36000 | |
openssl rsa -in cakey.pem -out cakey.pem | |
openssl req -new -keyout server-key.pem -out server-req.pem -days 36000 | |
openssl rsa -in server-key.pem -out server-key.pem | |
openssl ca -policy policy_anything -in server-req.pem -cert cacert.pem -keyfile cakey.pem -out server-cert.pem -days 36000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RC_FILE=$HOME/.bashrc | |
echo "insecure" >> $HOME/.curlrc | |
ruby -e "$(curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
curl -fksSL install.perlbrew.pl | bash | |
curl -fksSL get.rvm.io | bash -s stable | |
echo "source $HOME/perl5/perlbrew/etc/bashrc" >> $RC_FILE | |
echo "source $HOME/.rvm/scripts/rvm" >> $RC_FILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'capybara' | |
require 'capybara/dsl' | |
Capybara.run_server = false | |
Capybara.default_driver = :selenium | |
include Capybara::DSL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use String::CamelCase qw(decamelize); | |
use Getopt::Long; | |
use List::MoreUtils qw(uniq); | |
GetOptions('a|app=s', \my $app); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Plack::Request; | |
use HTTP::Status qw(:constants status_message); | |
use JSON qw(from_json); | |
use LWP::UserAgent; | |
sub to_psgi_res { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -f perlbrew/perl ]; then | |
perlbrew use `cat perlbrew/perl` | |
fi | |
if [ -f carton.lock ]; then | |
if [ -d local/cache ]; then | |
carton install --cached --deployment | |
else |