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
namespace :notify do | |
namespace :update do | |
task :start do | |
_send_message("[\`#{fetch(:application)}\`] Deployment has started.") | |
end | |
task :finish do | |
_send_message("[\`#{fetch(:application)}\`] Deployment has finished. :ok_woman:\n> #{fetch(:commit_message)}") | |
end | |
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
#!/usr/bin/env perl | |
package MyApp::Notifier::Base; | |
use warnings; | |
use LWP::UserAgent; | |
sub new { | |
my $class = shift; | |
my $self = { @_ }; |
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 bash | |
set -eu | |
RUBY_VERSION="2.1.2" | |
if ! which -s brew; then | |
echo "[ERROR] Homebrew is required." | |
exit 1 | |
fi |
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/bash | |
set -eu | |
API_TOKEN="<CHANGE_THIS>" | |
ROOM_ID="<CHANGE_THIS>" | |
REPOS=$(basename $(pwd)) | |
REPOS=${REPOS%.*} |
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 utf8; | |
use Encode; | |
use Encode::Guess qw/shift-jis euc-jp 7bit-jis/; | |
use Perl6::Slurp; | |
use Path::Class; |
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 Path::Class; | |
use FindBin; | |
my $output_dir = dir($FindBin::Bin,"data"); | |
$output_dir->is_dir or die "[ERROR] $output_dir is not a directory."; |
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 Plack::Builder; | |
use Plack::App::File; | |
use My::WebApp; | |
my $app1 = Plack::App::File->new(root => "vendor/root")->to_app; | |
my $app2 = My::WebApp->psgi_app; | |
builder { |
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/bash | |
set -e | |
[ -n $LOG_LEVEL ] || declare -i LOG_LEVEL=3 | |
[ -n $DATE_FORMAT ] || DATE_FORMAT="%x %T" | |
[ -n $BUILD_DIR ] || BUILD_DIR="/var/tmp/build" | |
[ -n $PERL_VERSION ] || PERL_VERSION="5.16.3" | |
function logger_fatal() { | |
[ $LOG_LEVEL -ge 0 ] || return 1 |
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 | |
package MooSample; | |
use Moo; | |
use MooX::Types::MooseLike::Base qw(:all); | |
has 'val_int' => ( | |
is => 'ro', | |
isa => Int, |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 4.0.0.beta', github: 'rails/rails' | |
gem 'sqlite3' | |
# Gems used only for assets and not required | |
# in production environments by default. | |
group :assets do |