This file contains 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
describe('MetricDisplay', () => { | |
given('value', () => '100'); | |
beforeEach(() => { | |
render(<MetricDisplay value={given.value} />); | |
}); | |
it('renders metric value', () => { | |
expect(screen.getByText('100')).toBeVisible(); | |
}); |
This file contains 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
// An autoresize directive that works with ion-textarea in Ionic 2 | |
// Usage example: <ion-textarea autoresize [(ngModel)]="body"></ion-textarea> | |
// Based on https://www.npmjs.com/package/angular2-autosize | |
import { Directive, HostListener, ElementRef, Input } from '@angular/core'; | |
@Directive({ | |
selector: 'ion-textarea[autoresize]' | |
}) | |
export class AutoresizeDirective { |
This file contains 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
require "bundler/capistrano" | |
require "puma/capistrano" | |
server "<server_ip>", :web, :app, :db, primary: true | |
set :application, "<app_name>" | |
set :user, "deployer" | |
set :deploy_to, "/home/#{user}/apps/#{application}" | |
set :deploy_via, :remote_cache | |
set :use_sudo, false |
This file contains 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
require "bundler/capistrano" | |
server "YOUR_SERVER_IP", :web, :app, :db, primary: true | |
set :application, "<app_name>" | |
set :user, "deployer" | |
set :deploy_to, "/home/#{user}/apps/#{application}" | |
set :deploy_via, :remote_cache | |
set :use_sudo, false |
This file contains 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
upstream unicorn { | |
server unix:/tmp/unicorn.<app_name>.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default deferred; | |
# server_name example.com; | |
root /home/deployer/apps/<app_name>/current/public; | |
location ^~ /assets/ { |
This file contains 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
# >---------------------------------------------------------------------------< | |
# | |
# _____ _ _ | |
# | __ \ (_) | /\ | |
# | |__) |__ _ _| |___ / \ _ __ _ __ ___ | |
# | _ // _` | | / __| / /\ \ | '_ \| '_ \/ __| | |
# | | \ \ (_| | | \__ \/ ____ \| |_) | |_) \__ \ | |
# |_| \_\__,_|_|_|___/_/ \_\ .__/| .__/|___/ | |
# | | | | | |
# |_| |_| |