I hereby claim:
- I am maceto on github.
- I am maceto (https://keybase.io/maceto) on keybase.
- I have a public key ASD68mgabT_RewKud5ml_mR26sj9fFG8co-rXV7vG2d00go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
AWSTemplateFormatVersion: "2010-09-09" | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
your-api | |
SAM Template for your API | |
Globals: | |
Api: | |
Cors: |
require 'benchmark/ips' | |
# Counting of records with ORM or directly on MongoDB | |
# | |
# IncomingCall.where(:created_at.gte =>(Date.today-30)).count | |
# | |
# VS | |
# | |
# db[:incoming_calls].aggregate([ | |
# { "$match": { created_at: {"$gte": (Date.today-30)} } }, |
require 'rake/testtask' | |
task default: 'test:all' | |
namespace :test do | |
Rake::TestTask.new(:all) do |t| | |
t.pattern = "test/**/*_spec.rb" | |
t.verbose = true | |
end |
#!/bin/sh | |
set -e | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/var/www/apps/senddinero-im/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" | |
AS_USER=senddineroim | |
set -u |
require "minitest_helper" | |
describe Street do | |
it "must have a code" do | |
# No code | |
street = Street.new | |
# Invalid | |
street.valid?.must_equal false | |
# Code assignation (random 1000/10000) | |
street.code = rand(9000) + 1000 |
class TransactionRequest | |
def initializer(app) | |
@app = app | |
@regex = /Regex/ | |
end | |
def call(env) | |
if @regex.test env['REQUEST_URI'] | |
#proceso la transacción |
Cuba.define do | |
@message="" | |
# only GET requests | |
on get do | |
# / | |
on "" do | |
@players = Player.all(:order => [ :name.desc ]) | |
res.write render('views/index.haml') | |
end | |
end |
require "cuba/test" | |
scope do | |
test "load Homepage" do | |
visit "/" | |
assert has_content?("contenido") | |
end | |
end |