I hereby claim:
- I am fgrehm on github.
- I am fgrehm (https://keybase.io/fgrehm) on keybase.
- I have a public key whose fingerprint is 3C39 3ABD 6DDE 83DF 66EA 245A DEAF 326E 2F12 76F2
To claim this, I am signing this object:
class Address # Our custom, embedded-value type | |
orm.map_type do |signature, types| | |
signature.from [self] | |
signature.typecast_left method(:__load__) | |
signature.to [types.string, types.string, types.string, types.string, types.string] | |
signature.typecast_right method(:__dump__) | |
end | |
end | |
class Zoo |
class Address # Our custom, embedded-value type | |
accessor :address => String | |
accessor :address_2 => String | |
accessor :city => String | |
accessor :state => String | |
accessor :zip_code => String | |
orm.map_type do |signature, types| | |
signature.from [self] | |
signature.typecast_left method(:__load__) |
orm.map(Exhibit, "exhibits") do |exhibits, type| | |
exhibits.field :id, type.serial | |
exhibits.field :name, type.string(200) | |
exhibits.field :zoo_id, type.integer | |
exhibits.key :id | |
end | |
orm.map(ZooKeeper, 'zoo_keepers') do |zoo_keepers, type| | |
zoo_keepers.field :id, type.serial |
I hereby claim:
To claim this, I am signing this object:
require 'rubygems' | |
require 'dm-core' | |
require 'dm-migrations' | |
DataMapper.setup(:default, 'sqlite::memory:') | |
class Product | |
include DataMapper::Resource | |
property :id, Serial |
require 'json' | |
Virtus::Coercion::String.class_eval do | |
def self.to_hash(value) | |
JSON.parse(value) | |
end | |
end | |
module MyApp | |
module Attributes |
Rehearsal ------------------------------------------------------------- | |
INSERTION STATIC : Tree 0.334000 0.000000 0.334000 ( 0.334000) | |
INSERTION STATIC : Regexp 0.244000 0.000000 0.244000 ( 0.244000) | |
MATCHING STATIC : Tree 1.297000 0.000000 1.297000 ( 1.297000) | |
MATCHING STATIC : Regexp 13.382000 0.000000 13.382000 ( 13.382000) | |
--------------------------------------------------- total: 15.257000sec | |
user system total real | |
INSERTION STATIC : Tree 0.045000 0.000000 0.045000 ( 0.045000) | |
INSERTION STATIC : Regexp 0.106000 0.000000 0.106000 ( 0.106000) |
jQuery ($) -> | |
$("div.control-group").focusout -> | |
$this = $(this) | |
if !$this.hasClass("error") | |
$this.addClass("success") | |
ClientSideValidations.formBuilders['SimpleForm::FormBuilder'].wrappers.bootstrap = | |
add: (element, settings, message) -> | |
wrapper = element.closest(".#{settings.wrapper_class}") | |
if element.data('valid') != false |
window.validarCnpj = (cnpj) -> | |
cnpj = cnpj.replace(/\/|\.|-/g,"") | |
allEqual = /^(.)\1+$/ | |
return if (cnpj.length < 14) || allEqual.test(cnpj) | |
a = [] | |
b = 0 | |
c = [6,5,4,3,2,9,8,7,6,5,4,3,2] |
guard 'rspec', :version => 2, :spec_paths => ["spec/models", 'spec/controllers'] do | |
watch(%r{^spec/(models|controllers).+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { ["spec/controllers", 'spec/models'] } | |
watch('spec/factories/*.rb') { ["spec/controllers", 'spec/models'] } | |
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } |