---
- name: Prepare server(s)
hosts: servers
gather_facts: False
tasks:
- debug:
msg: "wut"
I hereby claim:
- I am adis-io on github.
- I am adiso (https://keybase.io/adiso) on keybase.
- I have a public key ASD8EXUCFkqysD2V3MsYAfgXQ4WKQgZh_TXL0K62XSk0pAo
To claim this, I am signing this object:
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' |
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
Запуск тестов: | |
~ createdb text_vs_uuid | |
~ ruby text_vs_uuid.rb | |
Тесты: | |
MacBook i7 16 GB: | |
== WITHOUT INDEX == | |
NOTICE: extension "uuid-ossp" already exists, skipping |
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
begin | |
require 'pg' | |
require 'benchmark' | |
rescue LoadError | |
$stderr.puts "You don't have gem pg installed in your system. Please use `gem install pg` to install it" | |
raise | |
end | |
class TextVSUUID | |
DB_NAME = 'text_vs_uuid' |
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
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` | |
# Be sure to have rails and thin installed. | |
require "rubygems" | |
require "rails" | |
# Let's load only action controller. If you want | |
# to use active record, just require it as well. | |
require "action_controller/railtie" | |
class MyApp < Rails::Application |
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
#!/bin/sh | |
set -e | |
cmd="$@" | |
bundle check || bundle install | |
exec $cmd |
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 'rack' | |
require 'thin' | |
# Mock server for testing bad or heavyweight server responses; runs on localhost:4000 by default | |
# | |
# Example of use | |
# | |
# In setup method: | |
# | |
# @mock_server = MockServer.new # creating a new instance spawns a thread running the TCP server |