Sometimes I get frustrated when doing Integration tests, so I made the following list to keep myself entertained (feel free to add to the list):
- Alberto Verijas
- Antonio Constipado
- Benedicta Buduska
- Brenda Maceta
- Cabrón Figueroa
- Canalla Rivera
| require 'serialport' | |
| require 'eventmachine' | |
| sp = SerialPort.new "/dev/tty.linvor-DevB" | |
| EventMachine::run do | |
| EventMachine::defer do | |
| loop do | |
| temp = sp.gets | |
| next unless temp |
| require "csv" | |
| desc "Import CSV file into an Active Record table" | |
| task :csv_model_import, [:filename, :model] => :environment do |task,args| | |
| firstline=0 | |
| keys = {} | |
| CSV.foreach(args[:filename]) do |row| | |
| if (firstline==0) | |
| keys = row | |
| firstline=1 |
| # Old: | |
| module LinkShrink | |
| class Options < Hash | |
| def initialize(*args) | |
| super(*args) | |
| self.merge!(self.default) | |
| end | |
| def qr_code? | |
| self.fetch(:qr_code, false) |
| require 'rspec/core/rake_task' | |
| RSpec::Core::RakeTask.new(:spec) do |t| | |
| t.rspec_opts = '--format html --out reports/rspec_results.html' | |
| end | |
| namespace :rspec_report do | |
| desc 'Run all specs and generate RSpec report in HTML' | |
| task :html => :spec |
| require 'mail' | |
| module SpamBitch | |
| module Phone | |
| def self.carriers | |
| { claro: 'vtexto.com', att: 'txt.att.net', tmobile: 'sms.tmobile.net' } | |
| end | |
| def self.send_sms(telephone, msg, carrier) | |
| options = { |
| #!/usr/bin/env sh | |
| # | |
| # Description: | |
| # Allows you to run bin files for locally installed npm packages. | |
| # | |
| # Author: | |
| # jonahoffline (Jonah Ruiz) <[email protected]> | |
| # | |
| # Github: | |
| # https://github.com/jonahoffline/shell_stuff |
| # Copy paste this motherfucker after running $ ./bin/rails g migration AddUnaccentPgsqlExtension | |
| require_relative '20130921141716_add_unaccent_extension' | |
| class AddUnaccentPgsqlExtension < ActiveRecord::Migration | |
| def up | |
| revert AddUnaccentExtension | |
| enable_extension 'unaccent' | |
| end | |
| def down |
| require 'open-uri' | |
| require 'json' | |
| require 'ostruct' | |
| # Usage example: | |
| # require './usgs_data' | |
| # | |
| # quakes = Earthquake::Data.get_summary | |
| # quakes.metadata | |
| #=> {"generated"=>1380773976000, |
| #= require 'gateway' | |
| describe 'Gateway class', -> | |
| beforeEach (done) -> | |
| @subject = new window.meldd.Gateway() | |
| @name = 'foo' | |
| @value = $('body') | |
| done() |